-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix JS error - incorrect questionid #13
base: master
Are you sure you want to change the base?
Conversation
@@ -16,7 +16,7 @@ YUI.add('moodle-qtype_ddmatch-dragdrop', function(Y, NAME) { | |||
return; | |||
} | |||
|
|||
var containerid = 'div#q' + this.get('questionid'), | |||
var containerid = 'div#' + this.get('questionid'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new question div ids for 3.7 are compound of 'question-' . $this->usageid . '-' . $this->slot; see
/**
* When the question is rendered, this unique id is added to the
* outer div of the question. It can be used to uniquely reference
* the question from JavaScript.
*
* @return string id added to the outer <div class="que ..."> when the question is rendered.
*/
public function get_outer_question_div_unique_id() {
return 'question-' . $this->usageid . '-' . $this->slot;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update! (@nexterday )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s still working in Moodle 3.9.
Thanks a lot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’re welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, sorry but I am now retired and stopped all programming work. Feel free to fork this repository and make any change you want.
Make this question type work in Moodle 3.7