|
I tested your changes and it seems that works fine only for items in an unique organization :
If item prerequisites for another item is in the same organization it is not accessible while the first item isn't completed I hope i was comprehensible, my english is far from being perfect.. Thanks for this first patch! Sorry my comment is not really exact !!!
In fact, it's not exactly when item prerequisites is in another organisation that it's without effect, it's when the package uses item as organisation (with items under it in the tree view)..... Hello Antoine,
I am not sure that I understand you..... What I would like to have is the same functionality that used to be in version 1.6. Can you confirm that your SCORM package works the same in 1.6 as in 1.8? Or are there still differences? Kind regards, Hans de Zwart Hello Hans
First, sorry for my fuzzy explanations...I will try to be clearer ;o) I confirm, with the patch integration, the prerequisites management by the Scorm player works fine in these case :
But in this case prerequisites are not working :
It isn't very important, i just remake all my Scorm packages... Thanks for your help Cordially, A.F So you mean that things like & and | do not work?
This is known problem which, it seems, has never worked... Thanks for getting back! Aïe !!
In fact, pre-requisite block items without problem but ... when the required item is completed others items are always blocked.... Have you the same problem? Hi, I just started using SCORM packages for Moodle a few days ago and I went in with the reload editor to add prerequisite tags to all of the SCOs to prevent accessing the next SCO until you had viewed the previous. I'm using Moodle 1.8.x and writing the SCORM as 1.2 compliant, everything else about the SCORM works fine but it just refuses to recognize the prerequisites, I double checked the XML in the manifest and it looks fine, does this pertain to this bug or is there something that I'm missing? All of my items are under a single organization if that clarifies the structure of what i'm talking about.
Hello Eric,
Yes it seems that that is the problem... Have you tried the above mentioned patch? Hi Hans, Yeah, I just tried the patch, the results essentially were that any SCORM that i was testing without prerequisites(1.2 or 2004) was perfectly fine and was unaffected, but 1.2 SCORM with prereqs ended up breaking (the SCOs didn't show up anymore) and the 2004 SCORM with sequencing just ended up the same (sequencing not working) so I guess maybe I'll just have to give up on it for now but thanks for the help though.
Hi, I checked the patch, it works fine, thanks. One thing: if the aicc_script contains quotation marks (for example sco="completed"), it will not work, because the returned string contain the escape slashes (added by addslashes()). After I have added the stripslashes() call, it worked:
Kind regards, Szazo Hi,
I continued debugging, I guess I found why the complex prerequisites (containing | or &) doesn't work. In the scorm_eval_prerequisites() function there are some statements like this: The $usertracks contain data only about scoes that have been visited. If one of the sco of the formula never been seen, the above statement will be true, and the whole prerequisites function returns false. For example, the following formula always returns false (false means the sco is locked) if one of the scoes never been seen, even if one of the scoes is "complete": (sco1="complete" | sco2="complete") In the following patch a parallel $usertracks array is created with name $prerequsertracks. It contains all of the data of $usertracks and also contains an object with status 'notattempted'. So the scorm_eval_prerequisites() will continue running, even if there are scoes in formula that have never been seen. It seems to work (but perhaps not the most nice solution), please check it. (I also found that '&' signs are not imported correctly if they are in CDATA section, I submitted this bug about this: http://tracker.moodle.org/browse/MDL-12342 The patch includes Hans's patch (thanks Hans): — scorm_12lib_old.php Fri Nov 16 11:08:16 2007
assigning to me - will test fix(es) and look at patching
Dan I need to try this for my setup, but no time to mess with code. Does anyone have a complete and updated version of the above code that has been corrected in the scorm_12lib.php module. Basically just need the updated / corrected version of scorm_12lib.php
Please attach here wit the Attach File option in the top left of this page. Thanks Joe C. Dear Joseph!
I have attached my version of the patch and patched files. It also includes the bugfix for http://tracker.moodle.org/browse/MDL-12342 Note that Moodle 1.8.3+ version required to use this bug fix. The patch can be found in .zip under the bugfix\patch directory with name prereqfix.patch. Applying this patch: Instead of patching, you can copy the already patched files. These files can be found in .zip, under the bugfix\patchedfiles directory. Just copy these files into the moodle/mod/scorm/datamodels directory of the installed Moodle (please create backup, before overwriting files). Regards we really need a test scorm object that contains pre-requisites that we can use to reproduce this bug, can someone please either upload an object to this tracker item, or e-mail myself or Piers with a scorm object to use for testing?
thanks,
Dan Hey Dan,
Thanks for going through all these SCORM bugs! I am still watching them all (good that the missing database field will be picked up). I am on a holiday but have asked one of my co-worker to find one of the SCORM objects that used this functionality and post it to you. Thanks again, Hans great! - thanks Hans, we're slowly making some headway!
Dan Basic SCORM for testing functionality described in this bug-report
Dan: fyi, I'm a colleague of Hans and I uploaded a SCORM object containing pre-requisites so you can reproduce the bug. I think it works pretty straight-forward; if you upload the scorm you shouldn't be able to do Item 2 and Item 3. Item 2 should become available only after completing item 1, item 3 after item 2.
Hope this helps Thanks Arjen!
We really need more objects to be added to the Scorm Repository here: Piers - can you please have a look at this one? thanks!
Dan Hi Arjen - thanks for attaching the test SCORM - I have taken this and created a couple of other prerequisite tests based on it (2*{...} and && and || etc), are you OK with me uploading these and your SCORM object attached to this issue, in the database here: http://moodle.org/mod/data/view.php?d=50
Cheers, Please feel free to add it to the repository. I just uploaded it myself but I'm not sure whether you need more descriptive data.
Hans -
Patch file It would be very helpfull if you could test this independently for me, before I proceed with committing to STABLE19 and STABLE18. Thanks. This has been fixed in HEAD, 1.9 and 1.8.
Hello Piers,
I only now see your request to me (back from holidays). Is testing still relevant? Or can I just try it whenever next one of our clients uses the functionality? Thank you very much for your efforts! Kind regards, Hans Hi Hans - this should have made it into the weekly downloadable update for Moodle, so if you upgrade to that then it should be possible to test it.
Cheers, Piers Harding. closing - thanks for everyones help getting this sorted!
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Based on his changes I have created the following (I cannot upload) an attachment! patch. I would appreciate it if somebody could check the patch, commit it to CVS and then close the bug.
Thanks!
— scorm_12lib.php 2007-06-21 04:29:31.000000000 +0200
+++ scorm_12lib_new.php 2007-09-17 15:37:14.000000000 +0200
@@ -252,8 +252,8 @@
}
$nextsco = next($scoes);
$nextisvisible = false;
+ if (($nextsco !== false) && ($nextoptionaldatas = scorm_get_sco($nextsco->id, SCO_DATA)))
@@ -325,7 +325,7 @@
$previd = $sco->id;
}
}
+ if (empty($optionaldatas->prerequisites) || scorm_eval_prerequisites($optionaldatas->prerequisites,$usertracks)) {
if ($sco->id == $scoid) { $result->prerequisites = true; }