Save and Display returns to course

Save and Display returns to course

by Shaun T -
Number of replies: 3

I recently upgraded to 3.10.4 and when editing a module such as a page clicking save and display returns you to the course page instead of the module page. 

I have 2nd site running mostly unmodified moodle code that doesn't have the issue. 

From what I can tell the $fromform->submitbutton isn't set on about line 173 of the course\modedit.php cause it to use a different redirect URL
I haven't made any modifications to the modedit.php or modlib.php. Most changes are just additional plugins. 

Any ideas or suggestions would be greatly appreciated. 

Average of ratings: -
In reply to Shaun T

Re: Save and Display returns to course

by Shaun T -
The issue was caused by the unicheck plagiarism plugin not returning the data when plagiarism_unicheck_coursemodule_edit_post_actions is called. 
I added the data to the return. I've also noted this on the bug report here: https://github.com/unicheck/moodle-plagiarism_unicheckcorp/issues/102

function plagiarism_unicheck_coursemodule_edit_post_actions($data, $course) {
    if (!plagiarism_unicheck::is_support_mod($data->modulename)) {
        return $data;
    }
Average of ratings: Useful (2)
In reply to Shaun T

Re: Save and Display returns to course

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Many thanks Shaun for posting the solution that you found for the problem of Save and display returning you to the course page.

I shared a link to your post in the tracker issue MDL-72401 for it to help others with the same problem. smile