Skip to content

Commit 3bf6929

Browse files
committed
Quiz feature - prepared code for initial review
1 parent ebac70b commit 3bf6929

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

client/templates/course/lesson/quiz/questions/partials/multipleChoice.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ Template.multipleChoiceTemplate.events({
9090
}
9191
question.options = options;
9292
},
93-
'keyup .js-option-title-input': function(event){
94-
var index = parseInt(event.target.id);
95-
var text = $(event.target).val();
96-
var question = Template.currentData().question;
97-
var option = question.options[index];
98-
option.title = text;
99-
},
93+
10094

10195
});

client/templates/course/lesson/quiz/questions/partials/multipleChoiceInputOption.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,11 @@ Template.multipleChoiceInputField.helpers({
2323
});
2424

2525
Template.multipleChoiceInputField.events({
26-
26+
'keyup .js-option-title-input': function(event){
27+
var index = parseInt(event.target.id);
28+
var text = $(event.target).val();
29+
var question = Template.currentData().question;
30+
var option = Template.currentData().option;
31+
option.title = text;
32+
},
2733
})

0 commit comments

Comments
 (0)