|
Why has there been no response to this bug report? The issue is still present with my latest SCORM 1.2 packages on Moodle 1.8 latest daily build, including the simple JavaScript error.
Is it because the "bug fixes for Moodle 1.8.x" link at the top of this page doesn't actually reference this tracked issue? That's because the filter settings associated with request 10077 doesn't include "Affects version 1.8" or 1.8.1 Change the Component field to SCORM? Hi Peter, I have the same error. I think that the problem could be that the script stop after x seconds. When I try with a small course it works OK, but if the Packege is over 6 MB fails.
This issue does seem to be timeout related, since I produced a smaller 1.2 package and that imported okay (a very small package).
I found the following issue: http://tracker.moodle.org/browse/MDL-9557 This points things the way of the scorm_delete_files() function in mod\scorm\locallib.php where a set_time_limit(5) limits the maximum tree deletion ability for top nodes.. Hopefully someone will fix this bug (and the JavaScript form submission one), until then at least I have something to recommend to clients to adjust to avoid this issue in 1.8 I've fixed
Not sure about the JS one. Bob, can you look at the JS error here? Seems pretty basic.
ok
I'll take a look this evening. Bobo. The JS error is in libform generated javascript code.
By the way I get no problem during importing the big package on Moodle 1.8+. Hi,
we were also getting the same error in moodle 1.9 while uploading scorm 1.2 courses. we found the problem to be in mod/scorm/mod_form.php at the code: The error was occuring at the argument 'reference'. When we checked the source code of the page (Adding a new SCORM/AICC), we found the input box name of "Package file" as 'reference[value]'. We changed the argument to "reference[value]". That is, $mform->addRule('reference[value]', get_string('required'), 'required', null, 'client'); It works fine! Regards, CommLab India assigning to Piers - can you please check this out? - it doesn't happen 100% of the time, so I wonder if different versions of JS handle it differently? - or if reference is set differently under certain conditions?
Dan Hi Dan,
When ever we use to upload SCORM/AICC courses, we use to get this error both in offline and online versions. Line: 205 We changed the argument to "reference[value]" directly without any conditions. Regards, CommLab India Hi Dan/ CommLab India -
In STABLE18 I can recreate the problem with "Error: 'parentNode' is null or not an object" in IE7 (and only IE - it never happens in that FF3 that I can discern). But, in HEAD, I get a different problem that seems to be happening earlier. function validate_mod_scorm_mod_form(frm) throws an error at frm.elements['summary'].focus(); But this maybe happening for similar reasons to do with finding the parent form (I need to find a decent debugger for IE to really track this down). Changing the argument to "reference[value]" masks the problem as it removes the validation routine, which then never gets executed... problem goes away. It would great to get the maintainers of the core input form handling routines to comment on this (not sure who they are). Cheers, Hi - after some more debugging I have narrowed down the problem in STABLE18 to a mismatch in names of the form fields and the expected names in the associated validation javascript - it's looking for reference where the actual name is reference[value].
The attached patch file Would be good to have the right eyes on this one. Cheers, adding the formslib maintainer - Jamie would you mind reviewing the patch above from Piers? - any comments?
thanks!
Dan hi,
Sorry client side validation is not supported for this element type. I would suggest to remove the 'client' param from the call to addRule : $mform->addRule('reference', get_string('required'), 'required', null); Then the rule will be checked on the server side. If someone wanted to work through the js used for client side validation and suggest some solid patches that would be great. Most of the js is taken directly from the pear QuickForm library. Jamie After correcting the reference field JS validation problem, I stumbled upon another to do with validation (client, and server) of textarea fields that have an html editor attached. When the validation fails it attempts to set the focus() on the textarea which has been masked by the iframe of the html editor.
The attached patch This issue affects all forms that use the htmleditor. Cheers, Try again - get the right file this time -
I am linking these two issues together because there is a correlation between the form javascript errors and the how the htmleditor overwrites/masks DOM associated DOM elements. It is worthwhile observing the difference between testing with and without the htmleditor enabled in the user settings - it cures the textarea validation issue (htmleditor being disabled).
Cheers, thanks Piers - that patch doesn't cause the scorm package import failure, so I've copied your patch to MDL-15019 so we can close this bug off when your other patch goes into the stable trees.
btw - thanks Jamie! - Piers is going to move the validation so it runs server side!
Dan Hi Piers,
this patch looks fine: http://cvs.moodle.org/moodle/mod/scorm/mod_form.php?r1=1.12&r2=1.13 can you please apply this to 1.8stable and 1.9stable? - then we can close this bug. thanks,
Dan Changed the reference field validation to server side as described, and propagated the fix to 1.8, and 1.9.
Cheers. Closing - great! - good work Piers
Dan |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Try importing the package at:
(29.52Mb)
http://www.peterchamberlin.dsl.pipex.com/M2582801_C01-1.2.zip
This package imports fine in Moodle 1.7.2
I cannot get any error information, even when setting debugging mode to high and developer levels. Well, under 'developer' I can't even get to the import page due to XSL parser errors.