Commit 7ebbad15 authored by Curtis Adam's avatar Curtis Adam

Add an option to rate all transcripts

parent 4ac68361
......@@ -1712,10 +1712,6 @@ $themes: (
border: 1px solid $primary !important;
}
.bs-callout-info {
border-left-color: $primary !important;
}
.learnLeitner, .learnWozniak, .learnSelect {
cursor: pointer;
color: $primary !important;
......@@ -2556,6 +2552,7 @@ $themes: (
.bs-callout-info {
background-color: $white !important;
border-left-color: $thm_orange !important;
}
#publishKind, #publishKindAdmin {
......
......@@ -123,8 +123,8 @@
"card_counter_text": white,
"transcript_counter_background": $thm_orange,
"transcript_counter_text": white,
"transcript_rating_label_background": indigo,
"transcript_rating_label_text": white,
"transcript_rating_label_background": white,
"transcript_rating_label_text": black,
"transcript_rating_pending_icon": $thm_orange,
"transcript_rating_accepted_icon": $thm_green,
"transcript_rating_denied_icon": $thm_red,
......
......@@ -740,6 +740,16 @@
"bonus": "Erhaltene Bonuspunkte",
"export": "Statistik exportieren",
"exportName": "Mitschriften_Statistik"
},
"submissions": {
"button": {
"review": "Mitschriften bewerten"
},
"info": {
"nothing": "Es gibt derzeit keine unbewerteten Mitschriften.",
"found": "Es gibt __count__ Mitschriften mit abgelaufener digitaler Nachbearbeitungsfrist, die eine Bewertung benötigen.",
"next": "Die nächsten Mitschriften können am __date__ bewertet werden."
}
}
}
},
......@@ -1210,6 +1220,22 @@
"pending": "Die Mitschrift wurde noch nicht bewertet",
"accepted": "Die Mitschrift wurde akzeptiert",
"denied": "Die Mitschrift wurde abgelehnt"
},
"navigation": {
"rate": "Mitschrift bewerten",
"skip": "Überspringen",
"accept": "Akzeptieren",
"deny": "Ablehnen"
},
"notification": {
"accept": "Die Mitschrift wurde akzeptiert",
"deny": "Die Mitschrift wurde abgelehnt"
},
"finished": {
"text": "Alle Mitschriften wurden bewertet",
"button": {
"back": "Zurück zur Übersicht"
}
}
}
},
......@@ -1775,7 +1801,11 @@
"leitner": "Noch eine Karte",
"leitner_plural": "Noch __count__ Karten",
"leitnerShort": "1 Karte",
"leitnerShort_plural": "__count__ Karten"
"leitnerShort_plural": "__count__ Karten",
"review": "Noch eine Mitschrift",
"review_plural": "Noch __count__ Mitschriften",
"reviewShort": "1 Mitschrift",
"reviewShort_plural": "__count__ Mitschriften"
},
"permission": "Kein Zugang",
"nocards": "Keine Karten vorhanden",
......
......@@ -742,6 +742,16 @@
"bonus": "Erhaltene Bonuspunkte",
"export": "Statistik exportieren",
"exportName": "Mitschriften_Statistik"
},
"submissions": {
"button": {
"review": "Mitschriften bewerten"
},
"info": {
"nothing": "Es gibt derzeit keine unbewerteten Mitschriften.",
"found": "Es gibt __count__ Mitschriften mit abgelaufener digitaler Nachbearbeitungsfrist, die eine Bewertung benötigen.",
"next": "Die nächsten Mitschriften können am __date__ bewertet werden."
}
}
}
},
......@@ -1212,6 +1222,22 @@
"pending": "Die Mitschrift wurde noch nicht bewertet",
"accepted": "Die Mitschrift wurde akzeptiert",
"denied": "Die Mitschrift wurde abgelehnt"
},
"navigation": {
"rate": "Mitschrift bewerten",
"skip": "Überspringen",
"accept": "Akzeptieren",
"deny": "Ablehnen"
},
"notification": {
"accept": "Die Mitschrift wurde akzeptiert",
"deny": "Die Mitschrift wurde abgelehnt"
},
"finished": {
"text": "Alle Mitschriften wurden bewertet",
"button": {
"back": "Zurück zur Übersicht"
}
}
}
},
......@@ -1776,7 +1802,11 @@
"leitner": "Noch eine Karte zu lernen",
"leitner_plural": "Noch __count__ Karten zu lernen",
"leitnerShort": "Noch eine Karte",
"leitnerShort_plural": "Noch __count__ Karten"
"leitnerShort_plural": "Noch __count__ Karten",
"review": "Noch eine Mitschrift",
"review_plural": "Noch __count__ Mitschriften",
"reviewShort": "1 Mitschrift",
"reviewShort_plural": "__count__ Mitschriften"
},
"permission": "Kein Zugang",
"nocards": "Keine Karten vorhanden",
......
......@@ -8,6 +8,7 @@ import {CardType} from "./cardTypes";
import {CardNavigation} from "./cardNavigation";
import {CardVisuals} from "./cardVisuals";
import {Utilities} from "./utilities";
import {TranscriptBonus} from "./transcriptBonus";
let cardIndex = [];
......@@ -65,7 +66,15 @@ export let CardIndex = class CardIndex {
let indexCards = [];
let cardset;
if (!Meteor.isServer && Route.isTranscript()) {
return 0;
if (Route.isPresentationTranscriptReview()) {
let indexCards = TranscriptBonus.find({cardset_id: Router.current().params._id, rating: 0},{sort: {date: 1, user_id: 1}, fields: {card_id: 1}}).fetch();
indexCards.forEach(function (indexCard) {
cardIndex.push(indexCard.card_id);
});
return cardIndex;
} else {
return 0;
}
} else {
if (!Meteor.isServer && Route.isDemo()) {
cardset = Cardsets.findOne({kind: 'demo', name: 'DemoCardset', shuffled: true});
......@@ -209,6 +218,13 @@ export let CardIndex = class CardIndex {
let query = "";
if (Route.isPresentationTranscript()) {
return Cards.find(Router.current().params.card_id).fetch();
} else if (Route.isPresentationTranscriptReview()) {
let cardIndexFilter = this.getCardIndexFilter();
query = Cards.find({
_id: {$in: cardIndexFilter},
cardset_id: "-1"
}).fetch();
return this.sortQueryResult(cardIndexFilter, query);
} else {
let cardIndexFilter = this.getCardIndexFilter();
if (Session.get('activeCardset').shuffled) {
......@@ -328,7 +344,7 @@ export let CardIndex = class CardIndex {
}
static getActiveCardIndex (card_id) {
if (Route.isTranscript()) {
if (Route.isTranscript() && !Route.isPresentationTranscriptReview()) {
return 0;
} else {
let cardIndex = this.getCardIndex();
......
......@@ -183,6 +183,8 @@ export let CardNavigation = class CardNavigation {
Meteor.call('updateLeitner', Router.current().params._id, answeredCard, answer);
} else if (updateLearningMode === 2) {
Meteor.call("updateWozniak", Router.current().params._id, answeredCard, answer);
} else if (updateLearningMode === 3) {
Meteor.call("rateTranscript", Router.current().params._id, answeredCard, answer);
}
setTimeout(function () {
CardNavigation.toggleVisibility(true);
......@@ -289,6 +291,8 @@ export let CardNavigation = class CardNavigation {
Meteor.call('updateLeitner', Router.current().params._id, answeredCard, answer);
} else if (updateLearningMode === 2) {
Meteor.call("updateWozniak", Router.current().params._id, answeredCard, answer);
} else if (updateLearningMode === 3) {
Meteor.call("rateTranscript", Router.current().params._id, answeredCard, answer);
}
} else {
this.toggleVisibility(false);
......@@ -300,6 +304,10 @@ export let CardNavigation = class CardNavigation {
this.answerCard(1, answer);
}
static rateTranscript (answer) {
this.answerCard(3, answer);
}
static fullscreenExitEvents () {
if (screenfull.enabled) {
screenfull.on('change', () => {
......@@ -402,8 +410,11 @@ export let CardNavigation = class CardNavigation {
if (CardNavigation.isVisible()) {
if (Route.isCardset() || Route.isPresentationOrDemo()) {
if (CardNavigation.getCardSideNavigationIndex() < CardNavigation.getCardSideNavigationLength()) {
if (Route.isPresentationTranscriptReview() && CardNavigation.getCardSideNavigationIndex() === CardNavigation.getCardSideNavigationLength() - 1) {
Session.set('isQuestionSide', false);
}
CardNavigation.cardSideNavigation();
} else if (!CardNavigation.isLastCard()) {
} else if (!CardNavigation.isLastCard() && !Route.isPresentationTranscriptReview()) {
CardNavigation.skipAnswer();
}
} else if ((Route.isBox() || Route.isMemo()) && Session.get('isQuestionSide')) {
......@@ -481,14 +492,26 @@ export let CardNavigation = class CardNavigation {
break;
case 78:
if (!Session.get('isQuestionSide')) {
$('#notknown').click();
if (Route.isTranscript()) {
$('#denyTranscript').click();
} else {
$('#notknown').click();
}
}
break;
case 89:
if (!Session.get('isQuestionSide')) {
$('#known').click();
if (Route.isTranscript()) {
$('#acceptTranscript').click();
} else {
$('#known').click();
}
} else {
$('#learnShowAnswer').click();
if (Route.isTranscript()) {
$('#rateTranscript').click();
} else {
$('#learnShowAnswer').click();
}
}
break;
case 90:
......
......@@ -131,7 +131,7 @@ export let CardVisuals = class CardVisuals {
flashcardBody.css('height', newHeight - flashcardHeaderHeight);
if (AspectRatio.scaleCardNavigationWidth()) {
let cardNavigation = $('.cardNavigation');
let answerOptions = $('#answerOptions');
let answerOptions = $('.answerOptions');
cardNavigation.css('width', newWidth);
cardNavigation.css('margin-left', leftOffset);
if (answerOptions.length) {
......@@ -183,6 +183,7 @@ export let CardVisuals = class CardVisuals {
static resizeFlashcard3D () {
let offsetBottom = 45;
let cardNavigation = $('.cardNavigation');
let answerOptions = $('.answerOptions');
let availableHeight = $(window).height() - (cardNavigation.outerHeight() + cardNavigation.offset().top) - offsetBottom;
let flashcard = $('.flashcard');
let flashcardHeader = $('.cardHeader');
......@@ -217,6 +218,9 @@ export let CardVisuals = class CardVisuals {
leftMargin -= parseInt($('.cardNavigation').parent().css('padding-left'));
}
$('.cardNavigation').attr('style', 'max-width: ' + flashcard.width() + 'px !important; margin-left: ' + leftMargin + 'px !important;');
if (answerOptions.length) {
answerOptions.attr('style', 'max-width: ' + flashcard.width() + 'px !important; margin-left: ' + leftMargin + 'px !important;');
}
}
}
}
......@@ -312,7 +316,7 @@ export let CardVisuals = class CardVisuals {
flashcardBody.removeAttr('style');
contentEditor.removeAttr('style');
$('.cardNavigation').removeAttr('style');
$('#answerOptions').removeAttr('style');
$('.answerOptions').removeAttr('style');
if (AspectRatio.isEnabled()) {
aspectRatioEnabled = true;
}
......
......@@ -109,6 +109,38 @@ if (Meteor.isServer) {
this.ready();
}
});
Meteor.publish("cardsetTranscriptBonusCardsReview", function (cardset_id, activeFilter) {
if (this.userId) {
let cardset = Cardsets.findOne({_id: cardset_id}, {fields: {_id: 1, owner: 1}});
if (UserPermissions.isAdmin() || UserPermissions.isOwner(cardset.owner)) {
let latestExpiredDeadline = TranscriptBonusList.getLatestExpiredDeadline(cardset._id);
if (latestExpiredDeadline !== undefined) {
let bonusTranscripts = TranscriptBonus.find({cardset_id: cardset._id, date: {$lt: latestExpiredDeadline}, rating: 0}, {fields: {card_id: 1}}).fetch();
let cardFilter = [];
for (let i = 0; i < bonusTranscripts.length; i++) {
cardFilter.push(bonusTranscripts[i].card_id);
}
let query = {};
if (activeFilter !== undefined && activeFilter !== null) {
if (activeFilter.transcriptDate !== undefined) {
query.date = new Date(activeFilter.transcriptDate);
}
if (activeFilter.owner !== undefined) {
query.owner = activeFilter.owner;
}
}
query._id = {$in: cardFilter};
return Cards.find({_id: {$in: cardFilter}, cardType: 2, cardset_id: "-1"});
} else {
this.ready();
}
} else {
this.ready();
}
} else {
this.ready();
}
});
Meteor.publish("transcriptCard", function (card_id) {
if (UserPermissions.isAdmin()) {
return Cards.find({_id: card_id, cardType: 2, cardset_id: "-1"});
......
......@@ -54,7 +54,7 @@ export let Route = class Route {
}
static isTranscript () {
return this.isMyTranscripts() || this.isMyBonusTranscripts() || this.isNewTranscript() || this.isEditTranscript() || this.isPresentationTranscript() || this.isPresentationTranscriptBonus() || this.isPresentationTranscriptBonusCardset();
return this.isMyTranscripts() || this.isMyBonusTranscripts() || this.isNewTranscript() || this.isEditTranscript() || this.isPresentationTranscript() || this.isPresentationTranscriptBonus() || this.isPresentationTranscriptBonusCardset() || this.isPresentationTranscriptReview();
}
static isPresentationTranscript () {
......@@ -65,6 +65,10 @@ export let Route = class Route {
return Router.current().route.getName() === "presentationTranscriptPersonal";
}
static isPresentationTranscriptReview () {
return Router.current().route.getName() === "presentationTranscriptReview";
}
static isPresentationTranscriptBonus () {
return Router.current().route.getName() === "presentationTranscriptBonus";
}
......@@ -102,7 +106,7 @@ export let Route = class Route {
* @return {Boolean} Return true, when route is a presentation view.
*/
static isPresentation () {
return (this.isDefaultPresentation() || this.isPresentationList() || this.isPresentationTranscript());
return (this.isDefaultPresentation() || this.isPresentationList() || this.isPresentationTranscript() || this.isPresentationTranscriptReview());
}
static isDefaultPresentation () {
......
......@@ -10,58 +10,6 @@ import * as icons from "../config/icons.js";
export const TranscriptBonus = new Mongo.Collection("transcriptBonus");
if (Meteor.isServer) {
Meteor.publish("cardsetTranscriptBonus", function (cardset_id) {
if (this.userId) {
let cardset = Cardsets.findOne({_id: cardset_id}, {fields: {_id: 1, owner: 1}});
if (UserPermissions.isAdmin() || UserPermissions.isOwner(cardset.owner)) {
return TranscriptBonus.find({cardset_id: cardset._id});
} else {
this.ready();
}
} else {
this.ready();
}
});
Meteor.publish("myTranscriptBonus", function () {
if (this.userId) {
return TranscriptBonus.find({user_id: this.userId});
} else {
this.ready();
}
});
}
const TranscriptBonusSchema = new SimpleSchema({
cardset_id: {
type: String
},
card_id: {
type: String
},
user_id: {
type: String
},
date: {
type: Date
},
lectureEnd: {
type: String
},
deadline: {
type: Number
},
deadlineEditing: {
type: Number
},
rating: {
type: Number,
optional: true
}
});
TranscriptBonus.attachSchema(TranscriptBonusSchema);
export let TranscriptBonusList = class TranscriptBonusList {
static addLectureEndTime (transcriptBonus, date) {
let hours = Number(transcriptBonus.lectureEnd.substring(0, 2));
......@@ -69,6 +17,18 @@ export let TranscriptBonusList = class TranscriptBonusList {
return moment(date).add(hours, 'hours').add(minutes, 'minutes');
}
static getLatestExpiredDeadline (cardset_id) {
let query = {cardset_id: cardset_id, rating: 0};
let lastSubmission = TranscriptBonus.findOne(query, {sort: {date: -1}});
if (lastSubmission !== undefined) {
let hours = Number(lastSubmission.lectureEnd.substring(0, 2));
let minutes = Number(lastSubmission.lectureEnd.substring(3, 5));
return moment().add(hours, 'hours').add(minutes, 'minutes').subtract(lastSubmission.deadlineEditing, 'hours').toDate();
} else {
return undefined;
}
}
static isDeadlineExpired (transcriptBonus, isEditingDeadline = false) {
let deadline;
if (isEditingDeadline) {
......@@ -138,11 +98,15 @@ export let TranscriptBonusList = class TranscriptBonusList {
}
}
static getDeadlineEditing (transcriptBonus, date_id) {
static getDeadlineEditing (transcriptBonus, date_id, reviewMode = false) {
if (transcriptBonus.lectureEnd !== undefined) {
let deadlineEditing = this.addLectureEndTime(transcriptBonus, date_id);
deadlineEditing.add(transcriptBonus.deadlineEditing, 'hours');
return TAPi18n.__('transcriptForm.deadline.editing') + ": " + Utilities.getMomentsDate(deadlineEditing, true, true);
if (reviewMode) {
return Utilities.getMomentsDate(deadlineEditing, true, false);
} else {
return TAPi18n.__('transcriptForm.deadline.editing') + ": " + Utilities.getMomentsDate(deadlineEditing, true, true);
}
}
}
......@@ -201,6 +165,71 @@ export let TranscriptBonusList = class TranscriptBonusList {
}
};
if (Meteor.isServer) {
Meteor.publish("cardsetTranscriptBonus", function (cardset_id) {
if (this.userId) {
let cardset = Cardsets.findOne({_id: cardset_id}, {fields: {_id: 1, owner: 1}});
if (UserPermissions.isAdmin() || UserPermissions.isOwner(cardset.owner)) {
return TranscriptBonus.find({cardset_id: cardset._id});
} else {
this.ready();
}
} else {
this.ready();
}
});
Meteor.publish("cardsetTranscriptBonusReview", function (cardset_id) {
if (this.userId) {
let cardset = Cardsets.findOne({_id: cardset_id}, {fields: {_id: 1, owner: 1}});
if (UserPermissions.isAdmin() || UserPermissions.isOwner(cardset.owner)) {
let latestExpiredDeadline = TranscriptBonusList.getLatestExpiredDeadline(cardset._id);
return TranscriptBonus.find({cardset_id: cardset._id, date: {$lt: latestExpiredDeadline}, rating: 0});
} else {
this.ready();
}
} else {
this.ready();
}
});
Meteor.publish("myTranscriptBonus", function () {
if (this.userId) {
return TranscriptBonus.find({user_id: this.userId});
} else {
this.ready();
}
});
}
const TranscriptBonusSchema = new SimpleSchema({
cardset_id: {
type: String
},
card_id: {
type: String
},
user_id: {
type: String
},
date: {
type: Date
},
lectureEnd: {
type: String
},
deadline: {
type: Number
},
deadlineEditing: {
type: Number
},
rating: {
type: Number,
optional: true
}
});
TranscriptBonus.attachSchema(TranscriptBonusSchema);
Meteor.methods({
addTranscriptBonus: function (card_id, cardset_id, user_id, date_id) {
......@@ -285,5 +314,22 @@ Meteor.methods({
}
return content;
}
},
rateTranscript: function (cardset_id, card_id, answer) {
check(cardset_id, String);
check(card_id, String);
check(answer, Boolean);
let cardset = Cardsets.findOne({_id: cardset_id});
if (UserPermissions.gotBackendAccess() || (UserPermissions.isOwner(cardset.owner) || cardset.editors.includes(Meteor.userId()))) {
let rating = 1;
if (answer === false) {
rating = 2;
}
TranscriptBonus.update({cardset_id: cardset_id, card_id: card_id}, {
$set: {
rating: rating
}
});
}
}
});
......@@ -84,9 +84,9 @@ export let Utilities = class Utilities {
sameDay: this.getCalendarString("today", minutes),
lastDay: this.getCalendarString("yesterday", minutes),
nextDay: this.getCalendarString("nextDay", minutes),
nextWeek: dateFormat,
lastWeek: dateFormat,
sameElse: dateFormat
nextWeek: this.getCalendarString(dateFormat, minutes),
lastWeek: this.getCalendarString(dateFormat, minutes),
sameElse: this.getCalendarString(dateFormat, minutes)
});
}
}
......
......@@ -256,7 +256,7 @@ Template.registerHelper('isMyBonusTranscriptsRoute', function () {
Template.registerHelper('isBonusTranscriptsRoute', function () {
return Route.isMyBonusTranscripts() || Route.isTranscriptBonus();
return Route.isMyBonusTranscripts() || Route.isTranscriptBonus() || Route.isPresentationTranscriptBonusCardset() || Route.isPresentationTranscriptReview();
});
Template.registerHelper('isPersonalTranscriptsRoute', function () {
......@@ -432,7 +432,7 @@ Template.registerHelper("getWordcloudLabel", function (cardset) {
});
Template.registerHelper("getTranscriptBonusLabel", function (cardset) {
if ((cardset.transcriptBonus !== undefined && cardset.transcriptBonus.enabled) || Route.isMyBonusTranscripts() || Route.isTranscriptBonus() || Route.isPresentationTranscriptBonus() || Route.isPresentationTranscriptBonusCardset()) {
if ((cardset.transcriptBonus !== undefined && cardset.transcriptBonus.enabled) || Route.isMyBonusTranscripts() || Route.isTranscriptBonus() || Route.isPresentationTranscriptBonus() || Route.isPresentationTranscriptBonusCardset() || Route.isPresentationTranscriptReview()) {
return '<span class="label label-transcript-bonus" title="' + TAPi18n.__('cardset.transcriptBonus.long') + '">' + TAPi18n.__('cardset.transcriptBonus.short') + '</span>';
}
});
......@@ -560,6 +560,14 @@ Template.registerHelper("isCardsetTranscriptBonusRoute", function () {
return Route.isTranscriptBonus();
});
Template.registerHelper("isPresentationTranscriptCardsetRoute", function () {
return Route.isPresentationTranscriptReview() || Route.isPresentationTranscriptBonusCardset();
});
Template.registerHelper("isPresentationTranscriptReviewRoute", function () {
return Route.isPresentationTranscriptReview();
});
Template.registerHelper("gotAllUnfilteredCardsetsVisible", function () {
return Session.get('cardsetIndexResults') <= Session.get('maxItemsCounter') || Session.get('cardsetIndexResults') <= FilterConfig.itemStartingValue;
});
......
......@@ -447,6 +447,29 @@ Router.route('/cardset/:_id/editshuffle', {
}
});
Router.route('/cardset/:_id/transcripts/review', {
name: 'presentationTranscriptReview',
template: 'presentation',
subscriptions: function () {
return [Meteor.subscribe('cardsetTranscriptBonusReview', this.params._id), Meteor.subscribe('cardsetTranscriptBonusCardsReview', this.params._id, Filter.getActiveFilter(10)), Meteor.subscribe('cardset', this.params._id), Meteor.subscribe('paidCardset', this.params._id), Meteor.subscribe('userDataTranscriptBonus', this.params._id)];
},
data: function () {
MarkdeepEditor.changeMobilePreview(true);
Filter.resetMaxItemCounter();
Session.set('helpFilter', "cardset");
Session.set('isNewCardset', false);
Session.set('cardsetIndexResults', Cards.find().count());
return Cardsets.findOne({_id: this.params._id});
},
action: function () {
if (this.ready()) {
this.render();
} else {
this.render(loadingScreenTemplate);
}
}
});
Router.route('/cardset/:_id/transcripts', {
name: 'transcriptBonus',
template: 'cardsetIndexTranscript',
......
......@@ -86,6 +86,26 @@
</div>
</template>
<template name="flashcardsReviewEnd">
<div class="card-container">
<div>
<div id="cardCarousel" class="carousel slide" data-interval="false">
<div class="carousel-inner">
<div class="item active">
<div class="box flashcard emptyCard">
<h4>{{_ "cardset.transcriptBonusRating.finished.text"}}</h4>
<br>
<button class="btn btn-block btn-raised btn-danger" id="backToSubmissions">
<span class="pull-left"><i class="fas fa-arrow-left"></i>&nbsp;{{_ "cardset.transcriptBonusRating.finished.button.back"}}</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<template name="cardSubject">
{{#if gotBonusTranscript}}<a class="cardHeaderLink"
href="{{#unless isEditMode}}/cardset/{{getBonusLecture}}{{/unless}}">{{getSubject}}</a>{{else}}{{#unless this.subject}}
......
......@@ -42,6 +42,7 @@ function isActiveCard(card, resetData) {
}
}
}
/*
* ############################################################################
* flashcards
......@@ -128,7 +129,7 @@ Template.flashcardsCarouselContent.helpers({
return CardIndex.getCards();
},
setCardStatus: function () {
this.isActive = isActiveCard(this,true);
this.isActive = isActiveCard(this, true);
return this;
}
});
......@@ -149,11 +150,11 @@ Template.flashcardsCarouselContent3D.helpers({
return CardIndex.getCards();
},
setCardStatus: function () {
this.isActive = isActiveCard(this,true);
this.isActive = isActiveCard(this, true);
return this;
},
isActiveCard: function () {
return isActiveCard(this,false);
return isActiveCard(this, false);
}
});
......@@ -247,3 +248,15 @@ Template.cardSubject.helpers({
return Session.get('transcriptBonus').cardset_id;
}
});
/*
* ############################################################################
* flashcardsReviewEnd
* ############################################################################
*/
Template.flashcardsReviewEnd.events({
"click #backToSubmissions": function () {
Router.go('transcriptBonus', {_id: Router.current().params._id});
}
});
<template name="cardNavigationItemReview">