MDL-65029 questions: change question div id to acutally be unique
This is largely based on Simey Lameze's work.
This commit is contained in:
@@ -359,6 +359,17 @@ class question_attempt {
|
||||
return 'q' . $this->usageid . ':' . $this->slot . '_';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get one of the steps in this attempt.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user