-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
2.9
-
None
-
MOODLE_29_STABLE
We have a problem where the drop down to display Submission comments in the gradebook won't work for one or more random assignment: it just bring the browser at the page top instead of displaying the ajax loader. Refreshing the page change which assignment having the problem.
I found out that the problematic comments get the same id as its predecessor, so based on Damyon comment in https://tracker.moodle.org/browse/MDL-40096, I edited \comment\lib.php and changed the call from uniqid() to html_writer:random_id() in the constructor. So far so good, it seem to have resolved the problem.
public function __construct(stdClass $options) {
|
$this->viewcap = false;
|
$this->postcap = false;
|
|
// setup client_id
|
if (!empty($options->client_id)) {
|
$this->cid = $options->client_id;
|
} else {
|
$this->cid = html_writer::random_id(); //uniqid(); <-- change here
|
}
|
[...]
|