Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43222

New attempt not possible if SCORM attempt exited before finishing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.7, 2.5.3, 2.6, 2.7
    • Fix Version/s: 2.5.5, 2.6.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      Using the Fruit Quiz SCORM package (copy on MDL-37524 if you need it)

      Create SCORM activity with grading option "highest grade" and "unlimited attempts", make sure "force new attempt" setting is set to "No"
      As a student:
      1st attempt: Click "Enter" (Mode: normal), answer all questions correctly and, hit "finish" button on last page (won't do anything visible) - then hit "exit activity" in top right.

      Return to the SCORM activity
      2nd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer first question, then use navigation breadcrumbs to return to scorm/view.php page. (don't answer 2nd question)
      3rd attempt - "start new attempt" checkbox shouldn't be available - click "Enter" (Mode: normal, answer all questions correctly, hit "finish" button on last page (won't do anything visible) - then hit "exit activity" in top right.
      Return to the SCORM activity
      4th attempt: Make sure the "start new activity" option is available.

      NOTE: each time you enter the SCORM package you will start at the beginning/first question even if you are entering a previous attempt.

      Show
      Using the Fruit Quiz SCORM package (copy on MDL-37524 if you need it) Create SCORM activity with grading option "highest grade" and "unlimited attempts", make sure "force new attempt" setting is set to "No" As a student: 1st attempt: Click "Enter" (Mode: normal), answer all questions correctly and, hit "finish" button on last page (won't do anything visible) - then hit "exit activity" in top right. Return to the SCORM activity 2nd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer first question, then use navigation breadcrumbs to return to scorm/view.php page. (don't answer 2nd question) 3rd attempt - "start new attempt" checkbox shouldn't be available - click "Enter" (Mode: normal, answer all questions correctly, hit "finish" button on last page (won't do anything visible) - then hit "exit activity" in top right. Return to the SCORM activity 4th attempt: Make sure the "start new activity" option is available. NOTE: each time you enter the SCORM package you will start at the beginning/first question even if you are entering a previous attempt.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      master_MDL-43222

      Description

      Exiting a SCORM activity without finishing will cause successive attempts to be in review mode only regardless of the "Number of attempts" setting.

      The issue seems to affect all browsers and platforms. We did our tests with Firefox 25 on Linux.

      As a workaround for our teachers, we found out that after deleting the incomplete attempt and all attempts after that, it is possible to start new attempts again.

      Steps to reproduce (SCORM logs attached):
      Create SCORM activity with default settings (unlimited number of attempts). We made our tests with the SCORM package in MDL-37524.
      As a student:

      • 1st attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, finish attempt
      • Return to the SCORM activity
      • 2nd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, only this time don't finish attempt (just click any link).
      • Return to the SCORM activity
      • 3rd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, finish attempt
      • Return to the SCORM activity
      • 4th attempt: Notice the "Start a new attempt" option is missing. Clicking "Enter" starts the SCORM activity in review mode.

      Exiting a SCORM activity before completion creates an attempt with cmi.core.score.raw = 'empty' and cmi.core.lesson_status = 'incomplete'.
      All successive attempts will behave like the same next attempt with "Start a new attempt" not possible anymore. Attempts are stuck in review mode.

      Looking at the SCORM logs we noticed that when exiting an unfinished attempt, cmi.core.score.min, cmi.core.score.max and cmi.core.score.raw are not passed.
      Looks like the missing cmi.core.score.raw is what is causing trouble. In our tests, adding cmi.core.score.raw manually to the unfinished attempt via SCORM Debugging interface made successive attempts behave normally.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            danmarsden Dan Marsden added a comment -

            thanks for the report - I won't have time in the short-term to look at this as a volunteer but feel free to drop me an e-mail if you are able to fund my time to look at this. I am also happy to review any patches produced by another developer.

            Show
            danmarsden Dan Marsden added a comment - thanks for the report - I won't have time in the short-term to look at this as a volunteer but feel free to drop me an e-mail if you are able to fund my time to look at this. I am also happy to review any patches produced by another developer.
            Hide
            danmarsden Dan Marsden added a comment -

            also good to mention it's really unlikely that a patch for this will land in 2.4Stable - Bug fixes for general core bugs in 2.4.x ends this month.

            Show
            danmarsden Dan Marsden added a comment - also good to mention it's really unlikely that a patch for this will land in 2.4Stable - Bug fixes for general core bugs in 2.4.x ends this month.
            Hide
            schach Heiko Schach added a comment -

            Thanks for the info and raising the priority to major. Hope somebody finds the time to work on this.
            I did some tests with Moodle 2.5.3 and 2.6.0 and found the same bug. So this is not just a 2.4 issue.

            Show
            schach Heiko Schach added a comment - Thanks for the info and raising the priority to major. Hope somebody finds the time to work on this. I did some tests with Moodle 2.5.3 and 2.6.0 and found the same bug. So this is not just a 2.4 issue.
            Hide
            hughedwards Hugh Edwards added a comment -

            Hi guys

            I am suffering from the exact same issue. However after some pretty extensive testing I have found a workaround...at least in v2.6...which is the version I have installed.

            if you compile the course in articulate storyline in Scorm 2004 format, version 4, rather than scorm 1.2 format, it works and you don't get the review mode problem on resume.

            i know that moodle are no longer supporting this format in favour of Scorm 1.2 but it may well act as a workaround for those of us it is affecting until the dev's have time to take a look at the problem.

            With this though, I've noted several issues. these are:

            1. You have to delete the previous scorm attempts for those users who have not completed as its a different format. Actually I think moodle may even do this for you, so you might end up losing data if your course is already live like mine.....I've had to do a bit of messing around with the db to keep my completed users completed....

            2. iPad users. Oddly with this format, one fingered scrolling doesn't work ... But two fingered does. Weird! Just tell your users, because it means if you have navigation buttons at the bottom of your player they may not be able to see them.

            re point 1 it's just struck me that an easier way would be to make a new course and put those uncompleted users in there and leave the old one with the completed users intact!

            the good news is that in v2.6, the attempts management now works correctly with scorm packages so you can actually set users to just one attempt and it will track just one attempt with resume rather than incrementing it randomly.

            I hope that helps! Hugh.

            Show
            hughedwards Hugh Edwards added a comment - Hi guys I am suffering from the exact same issue. However after some pretty extensive testing I have found a workaround...at least in v2.6...which is the version I have installed. if you compile the course in articulate storyline in Scorm 2004 format, version 4, rather than scorm 1.2 format, it works and you don't get the review mode problem on resume. i know that moodle are no longer supporting this format in favour of Scorm 1.2 but it may well act as a workaround for those of us it is affecting until the dev's have time to take a look at the problem. With this though, I've noted several issues. these are: 1. You have to delete the previous scorm attempts for those users who have not completed as its a different format. Actually I think moodle may even do this for you, so you might end up losing data if your course is already live like mine.....I've had to do a bit of messing around with the db to keep my completed users completed.... 2. iPad users. Oddly with this format, one fingered scrolling doesn't work ... But two fingered does. Weird! Just tell your users, because it means if you have navigation buttons at the bottom of your player they may not be able to see them. re point 1 it's just struck me that an easier way would be to make a new course and put those uncompleted users in there and leave the old one with the completed users intact! the good news is that in v2.6, the attempts management now works correctly with scorm packages so you can actually set users to just one attempt and it will track just one attempt with resume rather than incrementing it randomly. I hope that helps! Hugh.
            Hide
            pnbowen@gmail.com Peter Bowen added a comment -

            I have just come across this issue - we recently upgraded from 2.4.3 to 2.6. I just rolled my DEV environment back to 2.4.3, and the issue does not exist.

            My testing is as follows:

            version 2.4.3 - you would start an attempt, pause part way, go back in, it would say preview mode however it would continue to mark.
            version 2.6 - you would start an attempt, pause part way, go back in, it would say preview mode, and it would not record any further progress.

            I have put a change through on all packages here to Force New Attempt at this stage.

            I hope this little bit of info is useful.

            Cheers
            Peter

            Show
            pnbowen@gmail.com Peter Bowen added a comment - I have just come across this issue - we recently upgraded from 2.4.3 to 2.6. I just rolled my DEV environment back to 2.4.3, and the issue does not exist. My testing is as follows: version 2.4.3 - you would start an attempt, pause part way, go back in, it would say preview mode however it would continue to mark. version 2.6 - you would start an attempt, pause part way, go back in, it would say preview mode, and it would not record any further progress. I have put a change through on all packages here to Force New Attempt at this stage. I hope this little bit of info is useful. Cheers Peter
            Hide
            hughedwards Hugh Edwards added a comment -

            Hi Chaps. Unfortunately my last post on here does not ring true. I've had two users so far using this scorm 2004 course who cannot complete their course. It doesn't go into review mode on-screen, but the net effect is the same - their course remains stationary, i.e., if they were at 60%, they carry on but their scores do not increase and they resume at the same place each time.

            This is a huge issue for us now as we are a commercial site and our users are quite rightly starting to complain.

            Any chance of a patch soon? It would really help....

            Thanks.

            Hugh.

            Show
            hughedwards Hugh Edwards added a comment - Hi Chaps. Unfortunately my last post on here does not ring true. I've had two users so far using this scorm 2004 course who cannot complete their course. It doesn't go into review mode on-screen, but the net effect is the same - their course remains stationary, i.e., if they were at 60%, they carry on but their scores do not increase and they resume at the same place each time. This is a huge issue for us now as we are a commercial site and our users are quite rightly starting to complain. Any chance of a patch soon? It would really help.... Thanks. Hugh.
            Hide
            pnbowen@gmail.com Peter Bowen added a comment -

            I have been having further issues (I might have to start working from home for safety reasons... )

            Another one I have started to see is it seems to at random skip some questions. We have a course set up where it will not let you passed a question without answering correctly, and yet in the results we are seeing people getting incorrect answers. I have managed to get it to skip questions once, so it seems to be very random.

            I have just deleted results for 189 users on my system. It seems to be improving, but I have certainly noticed a HUGE issue going from 2.4.3 to 2.6 with regards to SCORM. I know of another site in my organisation which is actually avoiding SCORM altogether because of these issues.

            It also appears that users of Mac's have more issues than Windows, and Firefox is definitely more reliable in this instance than Chrome.

            Thanks
            Peter

            Show
            pnbowen@gmail.com Peter Bowen added a comment - I have been having further issues (I might have to start working from home for safety reasons... ) Another one I have started to see is it seems to at random skip some questions. We have a course set up where it will not let you passed a question without answering correctly, and yet in the results we are seeing people getting incorrect answers. I have managed to get it to skip questions once, so it seems to be very random. I have just deleted results for 189 users on my system. It seems to be improving, but I have certainly noticed a HUGE issue going from 2.4.3 to 2.6 with regards to SCORM. I know of another site in my organisation which is actually avoiding SCORM altogether because of these issues. It also appears that users of Mac's have more issues than Windows, and Firefox is definitely more reliable in this instance than Chrome. Thanks Peter
            Hide
            danmarsden Dan Marsden added a comment -

            I think I've managed to reproduce this with the grading method "learning objects" - haven't been able to reproduce an issue with highest/average or sum grade options... yet - could anyone here confirm the grading method they are using when getting this issue? - eg "review" mode always being triggered and the option to generate a new attempt not appearing?

            Show
            danmarsden Dan Marsden added a comment - I think I've managed to reproduce this with the grading method "learning objects" - haven't been able to reproduce an issue with highest/average or sum grade options... yet - could anyone here confirm the grading method they are using when getting this issue? - eg "review" mode always being triggered and the option to generate a new attempt not appearing?
            Hide
            danmarsden Dan Marsden added a comment -

            ignore that - I've reproduced the issue with "highest attempt" - looking into the cause now.

            Show
            danmarsden Dan Marsden added a comment - ignore that - I've reproduced the issue with "highest attempt" - looking into the cause now.
            Hide
            danmarsden Dan Marsden added a comment -

            I've attached a patch here that seems to work.... this needs some good testing/peer-review though, especially related to grading as I haven't been able to work out why the code was ignoring some of those attempts. This patch will affect the Average Grade option - previously attempts with a raw_score of 0 will have been ignored from the calculations. Personally I think those attempts "should" be included when calculating the average grade - but other people may disagree.

            Matteo Scaramuccia do you have any thoughts?

            Show
            danmarsden Dan Marsden added a comment - I've attached a patch here that seems to work.... this needs some good testing/peer-review though, especially related to grading as I haven't been able to work out why the code was ignoring some of those attempts. This patch will affect the Average Grade option - previously attempts with a raw_score of 0 will have been ignored from the calculations. Personally I think those attempts "should" be included when calculating the average grade - but other people may disagree. Matteo Scaramuccia do you have any thoughts?
            Hide
            danmarsden Dan Marsden added a comment -

            modified the patch to prevent grade calculations from changing when using average attempts method - I think we need to avoid this in stable branches - I don't think it's correct behaviour to exclude them but I don't think it would be a good idea to change this in a stable branch and cause several peoples grades to change.

            Question - Ideally I'd like to make the code in 2.7 always include incomplete attempts in the calculations but if people think it's necessary we could add a new setting to turn it on/off - In the interest of getting this patch into core for people with the issue described above I think we should implement the patch as provided here and create a new tracker issue to decide if we need a new setting in 2.7 to control this or if we can just change the code in 2.7 to always include those attempts in the calculations.

            Show
            danmarsden Dan Marsden added a comment - modified the patch to prevent grade calculations from changing when using average attempts method - I think we need to avoid this in stable branches - I don't think it's correct behaviour to exclude them but I don't think it would be a good idea to change this in a stable branch and cause several peoples grades to change. Question - Ideally I'd like to make the code in 2.7 always include incomplete attempts in the calculations but if people think it's necessary we could add a new setting to turn it on/off - In the interest of getting this patch into core for people with the issue described above I think we should implement the patch as provided here and create a new tracker issue to decide if we need a new setting in 2.7 to control this or if we can just change the code in 2.7 to always include those attempts in the calculations.
            Hide
            fred Frédéric Massart added a comment -

            Hi Dan,

            I am far from a SCORM expert, but I took some time trying to understand the logic before/after and here are some comments:

            1. It seems that the part in if ($attemptscount) returns the objects, not the count.
            2. If if ($ignoremissingcompletion) is evaluated to true, then you do not set the condition element = 'cmi.core.score.raw', from my understanding that means that all the entries matching userid = X and scormid = Y will be returned. And this then looks like much more attempts have been made

            After diving a bit more in the code, I have identified something a bit strange in scorm_get_toc(). If we do not pass $attempt (and we don't), then we get it from scorm_get_attempt_count(), and then use this count as the attempt number. But if we were to leave it empty, then further down the track other functions would read it from scorm_get_last_attempt(), so there is a little inconsistency.

            Demonstration:

            • Attempt 1: has entry cmi.core.score.raw
            • Attempt 2: incomplete, no entry
            • Attempt 3: has entry cmi.core.score.raw

            Then

            • scorm_get_attempt_count() returns 2
            • scorm_get_last_attempt() returns 3
            • The logic uses 2, and so uses the track 2
            • As the track 2 is set as incomplete, the user is not offered to create a new attempt

            Attempt 2 was never completed because before starting the 3rd attempt, scorm_get_attempt_count() returned 1, which lead to the track 1, and therefore a new attempt could be created. Attempt 3 was born.

            diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php
            index 77d958f..0a4fe61 100644
            --- a/mod/scorm/locallib.php
            +++ b/mod/scorm/locallib.php
            @@ -1730,7 +1730,7 @@ function scorm_get_toc($user, $scorm, $cmid, $toclink=TOCJSLINK, $currentorg='',
                 global $CFG, $DB, $OUTPUT;
             
                 if (empty($attempt)) {
            -        $attempt = scorm_get_attempt_count($user->id, $scorm);
            +        $attempt = scorm_get_last_attempt($scorm->id, $user->id);
                 }
             
                 $result = new stdClass();
            

            Again, I'm not familiar with SCORM, so I might be totally wrong here, but maybe it helps.

            This issue could certainly benefit from PHP Unit and Behat tests!

            Fred

            Show
            fred Frédéric Massart added a comment - Hi Dan, I am far from a SCORM expert, but I took some time trying to understand the logic before/after and here are some comments: It seems that the part in if ($attemptscount) returns the objects, not the count. If if ($ignoremissingcompletion) is evaluated to true, then you do not set the condition element = 'cmi.core.score.raw' , from my understanding that means that all the entries matching userid = X and scormid = Y will be returned. And this then looks like much more attempts have been made After diving a bit more in the code, I have identified something a bit strange in scorm_get_toc() . If we do not pass $attempt (and we don't), then we get it from scorm_get_attempt_count() , and then use this count as the attempt number. But if we were to leave it empty, then further down the track other functions would read it from scorm_get_last_attempt() , so there is a little inconsistency. Demonstration: Attempt 1: has entry cmi.core.score.raw Attempt 2: incomplete, no entry Attempt 3: has entry cmi.core.score.raw Then scorm_get_attempt_count() returns 2 scorm_get_last_attempt() returns 3 The logic uses 2, and so uses the track 2 As the track 2 is set as incomplete, the user is not offered to create a new attempt Attempt 2 was never completed because before starting the 3rd attempt, scorm_get_attempt_count() returned 1, which lead to the track 1, and therefore a new attempt could be created. Attempt 3 was born. diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php index 77d958f..0a4fe61 100644 --- a/mod/scorm/locallib.php +++ b/mod/scorm/locallib.php @@ -1730,7 +1730,7 @@ function scorm_get_toc($user, $scorm, $cmid, $toclink=TOCJSLINK, $currentorg='', global $CFG, $DB, $OUTPUT; if (empty($attempt)) { - $attempt = scorm_get_attempt_count($user->id, $scorm); + $attempt = scorm_get_last_attempt($scorm->id, $user->id); } $result = new stdClass(); Again, I'm not familiar with SCORM, so I might be totally wrong here, but maybe it helps. This issue could certainly benefit from PHP Unit and Behat tests! Fred
            Hide
            danmarsden Dan Marsden added a comment -

            Thanks Fred!
            1 - badly named param there thanks, I've modified that to "$returnobject" which makes more sense - although the function names could probably be renamed at some point....

            2 - that is correct, the function was previously ignoring some attempts when it shouldn't have.

            great catch in scorm_get_toc - that is definitely an issue, wonder how long that's been causing problems!

            good work tracing all that code - unfortunately I don't have time to add php unit/behat tests (I shouldn't really be spending time on this at all with the large backlog of work and there isn't any funding for me to be working on this particular issue)

            Do you think it's ready for integration at this point? - thanks.

            Show
            danmarsden Dan Marsden added a comment - Thanks Fred! 1 - badly named param there thanks, I've modified that to "$returnobject" which makes more sense - although the function names could probably be renamed at some point.... 2 - that is correct, the function was previously ignoring some attempts when it shouldn't have. great catch in scorm_get_toc - that is definitely an issue, wonder how long that's been causing problems! good work tracing all that code - unfortunately I don't have time to add php unit/behat tests (I shouldn't really be spending time on this at all with the large backlog of work and there isn't any funding for me to be working on this particular issue) Do you think it's ready for integration at this point? - thanks.
            Hide
            danmarsden Dan Marsden added a comment -

            btw - I'm hoping that (on another tracker issue) we can completely remove the "$ignoremissing" stuff in master only. The other option is to include some form of global setting in master to turn that on/off.

            Show
            danmarsden Dan Marsden added a comment - btw - I'm hoping that (on another tracker issue) we can completely remove the "$ignoremissing" stuff in master only. The other option is to include some form of global setting in master to turn that on/off.
            Hide
            fred Frédéric Massart added a comment -

            Hi Dan,

            1. I find $returnobjects (plural) even less confusing
            2. I see, I was missing the DISTINCT, it makes sense now.

            Please, feel free to push for integration.

            Cheers,
            Fred

            Show
            fred Frédéric Massart added a comment - Hi Dan, I find $returnobjects (plural) even less confusing I see, I was missing the DISTINCT, it makes sense now. Please, feel free to push for integration. Cheers, Fred
            Hide
            danmarsden Dan Marsden added a comment -

            heh - good point - fixed and pushing for integration, thanks Fred!

            Show
            danmarsden Dan Marsden added a comment - heh - good point - fixed and pushing for integration, thanks Fred!
            Hide
            hughedwards Hugh Edwards added a comment -

            Hi Everyone

            I've been doing some testing on this based on Dan's new update.

            I have both good and bad news. The bad news is that your change hasn't fixed the problem I'm afraid. The good news is that I've done some pretty extensive testing and I think I've found something which may help.

            [BTW, just to double check, I copied the file as per your instructions into notepad, renamed it to the locallip.php and put it in the /test/moodle/mod/scorm folder in place of the old one which I renamed - I hope that's right... it seemed to work!)

            First, please see the attached XLS [I can't add an attachment here - but I sent Dan the XLS - and can forward to anyone else who wants it - just email me at hugh_edwards@high-score.co.uk]

            I've gone through one of my Scorm 1.2 courses 5 times until it failed and went back into review mode. Each time, I've copied the contents of the mdl_scorm_scoes_track table for my user. As you can see it grows each time - I had to do it that way because the cmi.suspend_data etc changes each time.

            As you can see from the sheet, I've gone 1 module at a time, then closed the scorm window and then logged out. Then logged back in and restarted the course for the next one.

            My main browser is Chrome Version 31.0.1650.63 m - but I also use Firefox V26.0.

            Worksheet 1 - Scorm1.2 V8 V1
            Worked fine up until Module 5 - up to here was done in Chrome, but Mod5 done in Firefox. Here once the module was completed, the cmi.core.lesson_status changed to failed instead of incomplete (cell G45), and went into review mode.

            Worksheet 2 - Scorm1.2 V8 V2
            Worked fine in Chrome up until I swapped to Firefox in Module 11 and here Firefox changed cmi.core.lesson_status to failed, cell G1241

            worksheet 3 - Scorm1.2 V8 V3
            By now I'd seen the Firefox link so I changed to Firefox from Chrome earlier, at Module 4. Firefox changed cmi.core.lesson_status to Failed, cell G10

            Worksheet 4 - Scorm1.2 V8 V4
            With this version, I started completely in Firefox and stayed in Firefox. The first time I took the course I went up until the end of Module 3, which is the first set, and the second time I went from Module 3-4 which is where Firefox changed the cmi.core.lesson_status to failed.

            Worksheet 5 - Scorm1.2 V8 V5
            With this version, I started in Chrome completely and didn't use firefox. I stayed logged in all the way until Module 11, and then logged out and then back into Chrome. When I had finished this one, Chrome had changed .core.lesson_status to failed. (Cell G1193.)

            So.....this means that it's not Chrome, nor firefox to blame (unless they both are) but the common thing is that it's happening when the user has logged out and then back in again.

            As to why this is happening? I have no idea! Over to you I'm afraid - but I do hope my testing helps!!!

            Please feel free to give me a call on +44 1295 738337 if you want to discuss in person.

            Hugh.

            Show
            hughedwards Hugh Edwards added a comment - Hi Everyone I've been doing some testing on this based on Dan's new update. I have both good and bad news. The bad news is that your change hasn't fixed the problem I'm afraid. The good news is that I've done some pretty extensive testing and I think I've found something which may help. [BTW, just to double check, I copied the file as per your instructions into notepad, renamed it to the locallip.php and put it in the /test/moodle/mod/scorm folder in place of the old one which I renamed - I hope that's right... it seemed to work!) First, please see the attached XLS [I can't add an attachment here - but I sent Dan the XLS - and can forward to anyone else who wants it - just email me at hugh_edwards@high-score.co.uk] I've gone through one of my Scorm 1.2 courses 5 times until it failed and went back into review mode. Each time, I've copied the contents of the mdl_scorm_scoes_track table for my user. As you can see it grows each time - I had to do it that way because the cmi.suspend_data etc changes each time. As you can see from the sheet, I've gone 1 module at a time, then closed the scorm window and then logged out. Then logged back in and restarted the course for the next one. My main browser is Chrome Version 31.0.1650.63 m - but I also use Firefox V26.0. Worksheet 1 - Scorm1.2 V8 V1 Worked fine up until Module 5 - up to here was done in Chrome, but Mod5 done in Firefox. Here once the module was completed, the cmi.core.lesson_status changed to failed instead of incomplete (cell G45), and went into review mode. Worksheet 2 - Scorm1.2 V8 V2 Worked fine in Chrome up until I swapped to Firefox in Module 11 and here Firefox changed cmi.core.lesson_status to failed, cell G1241 worksheet 3 - Scorm1.2 V8 V3 By now I'd seen the Firefox link so I changed to Firefox from Chrome earlier, at Module 4. Firefox changed cmi.core.lesson_status to Failed, cell G10 Worksheet 4 - Scorm1.2 V8 V4 With this version, I started completely in Firefox and stayed in Firefox. The first time I took the course I went up until the end of Module 3, which is the first set, and the second time I went from Module 3-4 which is where Firefox changed the cmi.core.lesson_status to failed. Worksheet 5 - Scorm1.2 V8 V5 With this version, I started in Chrome completely and didn't use firefox. I stayed logged in all the way until Module 11, and then logged out and then back into Chrome. When I had finished this one, Chrome had changed .core.lesson_status to failed. (Cell G1193.) So.....this means that it's not Chrome, nor firefox to blame (unless they both are) but the common thing is that it's happening when the user has logged out and then back in again. As to why this is happening? I have no idea! Over to you I'm afraid - but I do hope my testing helps!!! Please feel free to give me a call on +44 1295 738337 if you want to discuss in person. Hugh.
            Hide
            hughedwards Hugh Edwards added a comment -

            So, following on from my testing - One of the problems was that Dan couldn't recreate it and if I'm right and it's about logging off and back in then the original testing comments:

            1st attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, finish attempt
            Return to the SCORM activity
            2nd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, only this time don't finish attempt (just click any link).
            Return to the SCORM activity
            3rd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, finish attempt
            Return to the SCORM activity
            4th attempt: Notice the "Start a new attempt" option is missing. Clicking "Enter" starts the SCORM activity in review mode.

            ...were wrong as they contained no log in/out.

            I hope that helps.

            Show
            hughedwards Hugh Edwards added a comment - So, following on from my testing - One of the problems was that Dan couldn't recreate it and if I'm right and it's about logging off and back in then the original testing comments: 1st attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, finish attempt Return to the SCORM activity 2nd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, only this time don't finish attempt (just click any link). Return to the SCORM activity 3rd attempt: Click "Enter" (Mode: normal, "Start a new attempt"=yes), answer questions, finish attempt Return to the SCORM activity 4th attempt: Notice the "Start a new attempt" option is missing. Clicking "Enter" starts the SCORM activity in review mode. ...were wrong as they contained no log in/out. I hope that helps.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Dan, your code looks ok, no matter of that... do you want to give it another try based on the comments from Hugh ? Holding this for some hours...

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Dan, your code looks ok, no matter of that... do you want to give it another try based on the comments from Hugh ? Holding this for some hours...
            Hide
            danmarsden Dan Marsden added a comment -

            Thanks Eloy - Hugh's issue looks like a different problem than the original report - ill look at his issue separately - please go ahead and integrate - Hugh if you haven't already can you please send me the scorm debug logs during the failure? - I wonder if it is trying to store more than it is allowed in the suspend_data for scorm 1.2

            Show
            danmarsden Dan Marsden added a comment - Thanks Eloy - Hugh's issue looks like a different problem than the original report - ill look at his issue separately - please go ahead and integrate - Hugh if you haven't already can you please send me the scorm debug logs during the failure? - I wonder if it is trying to store more than it is allowed in the suspend_data for scorm 1.2
            Hide
            hughedwards Hugh Edwards added a comment -

            Hi Everyone.

            Further to Eloy's and my comments earlier, I've just been reading the entire tracker again. I'm wondering if there are actually two problems here, or maybe there is a slight issue with the use of the word 'attempts'?

            Reading the original description on here:

            "Exiting a SCORM activity without finishing will cause successive attempts to be in review mode only regardless of the "Number of attempts" setting.
            The issue seems to affect all browsers and platforms. We did our tests with Firefox 25 on Linux.
            As a workaround for our teachers, we found out that after deleting the incomplete attempt and all attempts after that, it is possible to start new attempts again."

            The error I am facing is that Moodle is going into Review mode randomly and not coming out of it...but I'm talking about that being within the same attempt. I.e., in Attempts Management if you have that set to 6 allowed attempts for example, I am on attempt 1, then logging off, then logging in (a random amount of times), then resuming the course....and then the course is in review mode. At no point have I yet selected Start New Attempt.

            (In fact, our users never go to attempt number 2 because the structure of our courses forces them to get every question right before continuing - so attempt number 1 will be 100% correct for all users once completed.)

            In actual fact this problem does occur for me still, if I do start a new attempt, but I wanted to let you guys know, that the Review Mode bug for me (and it looks like a couple of other posters at least on here) is within the same one Moodle attempt.

            I thought this might be a relevant thing to say because I was confused by the need for Average Grading with just 1 attempt, and since I'm still on the first attempt with this problem, Deleting the current attempt and any future attempts doesn't work as a workaround! My users have to go back to the start of the course no matter what - by deleting this first attempt or moving to a new one.

            Anyway I hope that helps..and that I haven't just confused things more!

            Hugh.

            Show
            hughedwards Hugh Edwards added a comment - Hi Everyone. Further to Eloy's and my comments earlier, I've just been reading the entire tracker again. I'm wondering if there are actually two problems here, or maybe there is a slight issue with the use of the word 'attempts'? Reading the original description on here: "Exiting a SCORM activity without finishing will cause successive attempts to be in review mode only regardless of the "Number of attempts" setting. The issue seems to affect all browsers and platforms. We did our tests with Firefox 25 on Linux. As a workaround for our teachers, we found out that after deleting the incomplete attempt and all attempts after that, it is possible to start new attempts again." The error I am facing is that Moodle is going into Review mode randomly and not coming out of it...but I'm talking about that being within the same attempt. I.e., in Attempts Management if you have that set to 6 allowed attempts for example, I am on attempt 1, then logging off, then logging in (a random amount of times), then resuming the course....and then the course is in review mode. At no point have I yet selected Start New Attempt. (In fact, our users never go to attempt number 2 because the structure of our courses forces them to get every question right before continuing - so attempt number 1 will be 100% correct for all users once completed.) In actual fact this problem does occur for me still, if I do start a new attempt, but I wanted to let you guys know, that the Review Mode bug for me (and it looks like a couple of other posters at least on here) is within the same one Moodle attempt. I thought this might be a relevant thing to say because I was confused by the need for Average Grading with just 1 attempt, and since I'm still on the first attempt with this problem, Deleting the current attempt and any future attempts doesn't work as a workaround! My users have to go back to the start of the course no matter what - by deleting this first attempt or moving to a new one. Anyway I hope that helps..and that I haven't just confused things more! Hugh.
            Hide
            hughedwards Hugh Edwards added a comment -

            Hi Dan,

            We crossed posts.

            I'll email you separately.

            Thanks!

            Hugh.

            Show
            hughedwards Hugh Edwards added a comment - Hi Dan, We crossed posts. I'll email you separately. Thanks! Hugh.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (25, 26 & master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (25, 26 & master), thanks!
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Hi guys,

            While testing this, I don't get the 'Start a new attempt' options selection. So on attempt#2, after I answered the first question, select the link to the course page (via breadcrumbs) and visit the scorm page again, I didn't direct me to the second question. Instead, it displayed the first question again, just like starting a new attempt.

            I used 'fruit scorm' package and set the scorm settings to use "highest grade" and "unlimited attempts".

            Test failed.

            Show
            rwijaya Rossiani Wijaya added a comment - Hi guys, While testing this, I don't get the 'Start a new attempt' options selection. So on attempt#2, after I answered the first question, select the link to the course page (via breadcrumbs) and visit the scorm page again, I didn't direct me to the second question. Instead, it displayed the first question again, just like starting a new attempt. I used 'fruit scorm' package and set the scorm settings to use "highest grade" and "unlimited attempts". Test failed.
            Hide
            danmarsden Dan Marsden added a comment -

            HI Rosie - "start new attempt" checkbox will only appear if you get all questions correct and hit "finish" at the end and the next time you view the form on the view.php page it should show a checkbox with the button when entering the SCORM for a second time.

            Each time you enter the fruit quiz (even if entering a previous "attempt") it will start from the beginning of the package - asking the first question again even if answered before - this is just how this particular package operates.

            Show
            danmarsden Dan Marsden added a comment - HI Rosie - "start new attempt" checkbox will only appear if you get all questions correct and hit "finish" at the end and the next time you view the form on the view.php page it should show a checkbox with the button when entering the SCORM for a second time. Each time you enter the fruit quiz (even if entering a previous "attempt") it will start from the beginning of the package - asking the first question again even if answered before - this is just how this particular package operates.
            Hide
            danmarsden Dan Marsden added a comment -

            updated testing instructions to be more clear - "start new attempt" doesn't appear on first load as you haven't previously generated an attempt - it will only appear if you have an attempt and have "completed" that attempt.

            Show
            danmarsden Dan Marsden added a comment - updated testing instructions to be more clear - "start new attempt" doesn't appear on first load as you haven't previously generated an attempt - it will only appear if you have an attempt and have "completed" that attempt.
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Hi Dan,

            I did as you commented above:
            1. Correctly answer the questions, hit "finish" at the end and click on 'exit activity' on top right link.
            2. Then when I revisit the scorm page again (view.php), all I get is mode options (preview and normal) and enter button. Selecting enter button goes to the scorm package page. Is this correct?

            So does the attempt options depend on the scorm package? And if I'm using the fruit file, the attempt options will not be displayed at all?

            Show
            rwijaya Rossiani Wijaya added a comment - Hi Dan, I did as you commented above: 1. Correctly answer the questions, hit "finish" at the end and click on 'exit activity' on top right link. 2. Then when I revisit the scorm page again (view.php), all I get is mode options (preview and normal) and enter button. Selecting enter button goes to the scorm package page. Is this correct? So does the attempt options depend on the scorm package? And if I'm using the fruit file, the attempt options will not be displayed at all?
            Hide
            danmarsden Dan Marsden added a comment -

            Thanks - 2 sounds wrong - make sure the page isn't cached in browser and you don't have "force new attempt" set to "Yes" in the SCORM settings (have added that detail to the testing instructions too)
            after the attempt is complete it should show a checkbox by the enter button titled "start new attempt" - which won't show if you have "force new attempt" setting set to Yes. Let me know if that makes more sense!

            Show
            danmarsden Dan Marsden added a comment - Thanks - 2 sounds wrong - make sure the page isn't cached in browser and you don't have "force new attempt" set to "Yes" in the SCORM settings (have added that detail to the testing instructions too) after the attempt is complete it should show a checkbox by the enter button titled "start new attempt" - which won't show if you have "force new attempt" setting set to Yes. Let me know if that makes more sense!
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Yes, I have "Force new attempt" set to no for the above testing.

            I will have other developer to re-test this issue, in case there's some setting I missed.

            Thank you Dan for your help.

            Show
            rwijaya Rossiani Wijaya added a comment - Yes, I have "Force new attempt" set to no for the above testing. I will have other developer to re-test this issue, in case there's some setting I missed. Thank you Dan for your help.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Rosie asked me to test this. Just following the testing instructions am not able to get the 'start new attempts' checkbox in current integration as admin/student.

            Show
            ankit_frenz Ankit Agarwal added a comment - Rosie asked me to test this. Just following the testing instructions am not able to get the 'start new attempts' checkbox in current integration as admin/student.
            Hide
            danmarsden Dan Marsden added a comment -

            arg - dodgy sql there.... Sorry guys...
            WHERE 'userid' = ? AND 'scormid' = ?";

            should be
            WHERE userid = ? AND scormid = ?";

            fixing that now..

            Show
            danmarsden Dan Marsden added a comment - arg - dodgy sql there.... Sorry guys... WHERE 'userid' = ? AND 'scormid' = ?"; should be WHERE userid = ? AND scormid = ?"; fixing that now..
            Hide
            danmarsden Dan Marsden added a comment -

            branches updated with correct sql. - thanks for the help testing this guys - apologies for the extra effort required!

            Show
            danmarsden Dan Marsden added a comment - branches updated with correct sql. - thanks for the help testing this guys - apologies for the extra effort required!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Wow, blind me... sorry!

            Fixes integrated, back to testing...

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Wow, blind me... sorry! Fixes integrated, back to testing...
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Ooops, I forgot to click on "start testing" button.

            I re-test this again and it works as expected.

            Tested for 2.5, 2.6 and master.

            Test passed.

            Show
            rwijaya Rossiani Wijaya added a comment - Ooops, I forgot to click on "start testing" button. I re-test this again and it works as expected. Tested for 2.5, 2.6 and master. Test passed.
            Hide
            danmarsden Dan Marsden added a comment -

            phew - thanks!

            Show
            danmarsden Dan Marsden added a comment - phew - thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Well done is better than well said.

            Closing, big thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Well done is better than well said. Closing, big thanks!

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Mar/14