-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JI-3168 Fix when user has selected the work mark it as answered (#88)
- Loading branch information
1 parent
c694f08
commit 453b94c
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,6 +232,7 @@ H5P.MarkTheWords = (function ($, Question, Word, KeyboardNav, XapiGenerator) { | |
// Add keyboard navigation to this element | ||
var selectableWord = new Word($(this), self.params); | ||
if (selectableWord.isAnswer()) { | ||
self.isAnswered = true; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ravimajithia
Author
Contributor
|
||
self.answers += 1; | ||
} | ||
self.selectableWords.push(selectableWord); | ||
|
@ravimajithia I do not understand why this line was added. It is called whenever the task is instantiated and contains at least one word that needs to be chosen (so virtually always unless the user forgot to add a word). That means the task will always be considered to have been answered by the user.
Check out https://h5p.org/node/1315679 or https://otacke.h5p.com/content/1291795364813009417 for instance. The fourth exercise in that QuestionSet is already marked as answered in the navigation bar at the bottom when you open the content.
Normally, I'd say, well, a bug. But in this commit this single line was added deliberately, so I am not sure what it was supposed to do as it doesn't match the commit message.