Skip to content
Snippets Groups Projects
Commit 2308025c authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Include values for deleted sessions and users in statistics

parent b9d57ad0
No related merge requests found
......@@ -3,7 +3,7 @@
"language":"javascript",
"views":{
"statistics":{
"map":"function(doc) {\n switch (doc.type) {\n case 'session':\n if (doc.active == 1) { emit('openSessions', 1); }\n else { emit('closedSessions', 1); }\n break;\n case 'skill_question':\n if (doc.questionType === 'flashcard') {\n emit('flashcards', 1);\n } else {\n if (doc.questionVariant === 'lecture') { emit('lectureQuestions', 1); }\n else if (doc.questionVariant === 'preparation') { emit('preparationQuestions', 1); }\n if (doc.piRound == 2) { emit('conceptQuestions', 1); }\n }\n break;\n case 'skill_question_answer':\n emit('answers', 1);\n break;\n case 'interposed_question':\n emit ('interposedQuestions', 1);\n break;\n }\n}",
"map":"function(doc) {\n switch (doc.type) {\n case 'session':\n if (doc.active == 1) { emit('openSessions', 1); }\n else { emit('closedSessions', 1); }\n break;\n case 'skill_question':\n if (doc.questionType === 'flashcard') {\n emit('flashcards', 1);\n } else {\n if (doc.questionVariant === 'lecture') { emit('lectureQuestions', 1); }\n else if (doc.questionVariant === 'preparation') { emit('preparationQuestions', 1); }\n if (doc.piRound == 2) { emit('conceptQuestions', 1); }\n }\n break;\n case 'skill_question_answer':\n emit('answers', 1);\n break;\n case 'interposed_question':\n emit ('interposedQuestions', 1);\n break;\n case 'log':\n if (['cleanup', 'delete'].indexOf(doc.event) !== -1) {\n if (doc.payload.type === 'session') {\n emit('deletedSessions', 1);\n } else if (doc.payload.type === 'user') {\n emit('deletedUsers', 1);\n }\n }\n break;\n }\n}",
"reduce":"_count"
},
"unique_session_creators":{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment