Skip to content
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

alert messages on defaultcompletion.php #214

Open
Amrita1991 opened this issue Aug 1, 2024 · 3 comments
Open

alert messages on defaultcompletion.php #214

Amrita1991 opened this issue Aug 1, 2024 · 3 comments

Comments

@Amrita1991
Copy link

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

@t-schroeder
Copy link

I've added a pull request that fixes this.

@jheenan
Copy link

jheenan commented Oct 31, 2024

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&section=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
Copy link

jheenan commented Nov 5, 2024

I'll create a new issue for the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants