ndunand / moodle-mod_choicegroup

Moodle "Group Choice" plugin
https://moodle.org/plugins/mod_choicegroup
35 stars 64 forks source link

alert messages on defaultcompletion.php #214

Open Amrita1991 opened 3 months ago

Amrita1991 commented 3 months ago

The plugin is sending alert messages on the Default activity completion page on Moodle 4.3. image

t-schroeder commented 1 month ago

I've added a pull request that fixes this.

jheenan commented 3 weeks ago

We have found another issue that appears this page, apologies if I should have created a new issue. Moodle 4.4.4 mod_choicegroup 1.46 for Moodle 4.3-4.4 (Build: 2024080800) 2024080800 The error below causes issues on most of the activities on the course/defaultcompletion.php?id=1 eg unable to unset 'Any grade'

web console javascript error: Uncaught TypeError: serializedSelectedGroupsListNode is null init https://site/theme/yui_combo.php?m/1729841975/mod_choicegroup/form/form-min.js:233

https://site/course/defaultcompletion.php?id=1:15308 _notify https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:2 use https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:2 _notify https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:2 T https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:2 _notify https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:2 T https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:2 _finish https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:9 _onSuccess https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:9 p https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:10 onSuccess https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:10 _finish https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:5 _next https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:5 _progress https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:6 h https://site/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple-min.js:5 Our dev has offered the following: mod/choicegroup/mod_form.php The form that is constructed in mod_choicegroup_mod_form->definition() requires javascript that is loaded in mod_choicegroup_mod_form->js_call() which all works great when rendering the page: /course/modedit.php?add=choicegroup&type&course=10980§ion=0&return=0&beforemod=9171 But mod_choicegroup_mod_form->definition() is also called during the rendering of the page: /course/defaultcompletion.php?id=1 which does not contain the same html form but the javascript init is run which results in a critical JS error messing up the expand/collapse of the forms on this page. Thank you Jackie
jheenan commented 2 weeks ago

I'll create a new issue for the above