Skip to content

Commit

Permalink
Fix minor style and logic issues
Browse files Browse the repository at this point in the history
  • Loading branch information
trayhem committed Feb 6, 2017
1 parent bf7b1a6 commit fc7867f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export function getAllLeaderboardItems(keepAllNicks = false) {
if (typeof allItems[o] === "undefined") {
allItems[o] = {
responseTime: 0,
correctQuestions: tmpItems[o].correctQuestions
correctQuestions: []
};
}
allItems[o].responseTime += tmpItems[o].responseTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Template.memberlist.onRendered(function () {
}
});
if (localData.containsHashtag(Router.current().params.quizName)) {
Meteor.call("EventManagerCollection.setActiveQuestion", Router.current().params.quizName, 0);
const musicSettings = Session.get("questionGroup").getConfiguration().getMusicSettings();
let songTitle = musicSettings.getLobbyTitle();
if (songTitle === "Random") {
Expand Down
8 changes: 8 additions & 0 deletions arsnova.click/client/plugins/splashscreen/scripts/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,14 @@ export const parseMarkdown = {
}
return QuestionGroupCollection.findOne().questionList[parseInt(instance.data.questionIndex)].type === "FreeTextQuestion";
},
isSurveyQuestion: function () {
const instance = Template.instance();
const questionDoc = QuestionGroupCollection.findOne();
if (!questionDoc) {
return;
}
return QuestionGroupCollection.findOne().questionList[parseInt(instance.data.questionIndex)].type === "SurveyQuestion";
},
isRangedQuestion: function () {
const instance = Template.instance();
const questionDoc = QuestionGroupCollection.findOne();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h3 id="answerHeader" role="heading">{{_ "plugins.splashscreen.question_and_answ
<h3 id="answerHeader" role="heading">{{_ "plugins.splashscreen.question_and_answer.answeroption" count=2}}</h3>
{{#each getAnswerOptions}}
<div class="answerContentElementWrapper" role="listitem">
<div class="answerContentElementLetter {{#if revealCorrectAnswerValue}}{{#if isCorrectAnswer @index}}correctAnswer{{else}}wrongAnswer{{/if}}{{/if}}">
<div class="answerContentElementLetter {{#unless isSurveyQuestion}}{{#if revealCorrectAnswerValue}}{{#if isCorrectAnswer @index}}correctAnswer{{else}}wrongAnswer{{/if}}{{/if}}{{/unless}}">
<span>{{_ "plugins.splashscreen.question_and_answer.answeroption" count=1}} {{answerOptionLetter @index}}</span>
</div>
<div class="answerContentElementItem">
Expand Down

0 comments on commit fc7867f

Please sign in to comment.