File Upload Error

File Upload Error

by Danny Wilson -
Number of replies: 0

Hello,

I've recently had to migrate a site for an old client that runs a Moodle system. I've never used moodle before but have experience with a large number of CMS and php frameworks so figured I'd probably be able to muddle through.

I have moved everything over and it's all working wonderfully except one thing, the editor page for the "file" resource has some issues. None of the scripts seem to be loading on this page, they load fine on the "folder" resource page and wherever else the editor/uploader/advance options are used they work as expected but the new/edit file page they are not being loaded.

I'm a little confused going through the modedit.php with the many variables there and trying to work out where folders and files differ is becoming a little difficult. The error is coming from the "initShowAdvanced" function on the page, I just can't work out where this is added in or whats wrong with it.

Y.use('mform', function(Y) { M.form.initShowAdvanced(Y); });

is the line causing the issues, getting an "Uncaught TypeError: undefined is not a function".

From what I can see on the forums/docs/code the

plugin_supports('mod', $data->modulename, FEATURE_MOD_INTRO, true)

I think this defines whether the editor is needed or not.

the next block down is

plugin_supports('mod', $data->modulename, FEATURE_ADVANCED_GRADING, false)
and has_capability('moodle/grade:managegradingforms', $context)

But I really have no idea what that is.

If anyone could point me in the direction of some docs for this or any closer to a solution that would be great.

To Summarise:

Adding course files page/Updating course files page doesn't seem to load the necessary scripts due to an error in the "advanced options" section.


Thanks again and really appreciate any advice.

Danny Wilson

Average of ratings: -