Commit 3b022138 authored by Curtis Adam's avatar Curtis Adam

Further calculation for bonus transcripts: "Ø number of transcripts per date

parent 92037cdf
......@@ -648,6 +648,7 @@
"participants": "Teilnehmer/innen",
"submissions": "Eingereichte Mitschriften",
"median": "Ø Mitschriften pro Teilnehmer/in",
"medianPerDate": "Ø Mitschriften pro Termin",
"tooltip": {
"lecture": {
"past": "Der Termin für die Foto-Abgabefrist ist bereits abgelaufen.",
......
......@@ -651,6 +651,7 @@
"participants": "Number of participants in the bonus procedure",
"submissions": "Number of all submitted transcripts",
"median": "Average number of transcripts per participant",
"medianPerDate": "Ø number of transcripts per date",
"tooltip": {
"lecture": {
"past": "Der Termin für die Foto-Abgabefrist ist bereits abgelaufen.",
......
......@@ -17,6 +17,7 @@
{{> cardsetInfoBoxItemTranscriptParticipants}}
{{> cardsetInfoBoxItemTranscriptSubmissions}}
{{> cardsetInfoBoxItemTranscriptMedian}}
{{> cardsetInfoBoxItemTranscriptMedianPerDate}}
</tbody>
</table>
</div>
......
......@@ -10,6 +10,7 @@ import "./item/transcript/lectureEnd.js";
import "./item/transcript/participants.js";
import "./item/transcript/submissions.js";
import "./item/transcript/median.js";
import "./item/transcript/medianPerDate.js";
import "./item/transcript/minimumSubmissions.js";
import "./bonusTranscript.html";
......
<template name="cardsetInfoBoxItemTranscriptMedianPerDate">
<tr>
<td>{{_ "transcriptForm.info.medianPerDate"}}:</td>
<td>{{getMedian this}}</td>
</tr>
</template>
//------------------------ IMPORTS
import {Template} from "meteor/templating";
import {TranscriptBonusList} from "../../../../../../api/transcriptBonus";
import "./medianPerDate.html";
/*
* ############################################################################
* cardsetInfoBoxItemTranscriptMedianPerDate
* ############################################################################
*/
Template.cardsetInfoBoxItemTranscriptMedianPerDate.helpers({
getMedian: function (cardset) {
if (cardset.transcriptBonus !== undefined && cardset.transcriptBonus.stats !== undefined) {
return TranscriptBonusList.transformMedian(cardset.transcriptBonus.stats.submissions / cardset.transcriptBonus.dates.length);
} else {
return 0;
}
}
});
Markdown is supported
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