studentquiz / moodle-mod_studentquiz

Moodle-Plugin
GNU General Public License v3.0
38 stars 37 forks source link

Wip660748 #446

Closed vuvanhieu143 closed 1 year ago

vuvanhieu143 commented 1 year ago

Hi @timhunt , I have scanned all the actions in StudentQuiz: This is the summary: Only Preview, Attempt don't have sesskey check Start quiz also doesn't have sesskey check(but they are just redirects) but still count as form submission, so I also add sesskey check. All actions in the filter form are extended moodle form Hide, Change state in student quiz view, Pin already has sesskey check. Report comment is extended from moodle form. Create/Edit/Delete comment is using core/ajax Change state in attempt page is using core/ajax

timhunt commented 1 year ago

All the changes look OK, except the cron_setup_user but. I feel there must be a better solution to that, but I don't know what it is, so I created MDL-77837. Hopefully that will give us an explanation.

timhunt commented 1 year ago

OK, so the cron_setup_user code done here was basically right, except that since it is not a static method, it should be $this->, not self::. Also, ->cron_setup_user would be a better name. I will amend the commit to fix that up, after merging.