Moodle

"Continue" link jumps over items

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8, 1.9
  • Fix Version/s: 1.9.1
  • Component/s: SCORM
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

While reading scorm, you have links "< Previous Continue >" over the scorm area.
The link "Previous" is correct, but the "Continue" points not for the next item, but for next after the next one.

Say, you are reading page 10 of scorm. The link "previous" points to page 9 (correctly). But "Continue" points to 12, not to 11, as it would. So pressing "Continue" leads the student by odd or even course pages; in our example by 10 - 12 - 14 - 16 and so on.

I tested it by SCORM 1.2.

Probably, somewhere someone added redundant 1 when calculated the id of next page?

Issue Links

Activity

Hide
Kristof Neirynck added a comment -

The problem can be fixed by changing line 254 in
moodle\mod\scorm\datamodels\scorm_12lib.php

from:
$nextsco = next($scoes);

to:
$nextsco = current($scoes);
next($scoes);

I would have attached a patch, but can't seem to connect to the cvs server.

Show
Kristof Neirynck added a comment - The problem can be fixed by changing line 254 in moodle\mod\scorm\datamodels\scorm_12lib.php from: $nextsco = next($scoes); to: $nextsco = current($scoes); next($scoes); I would have attached a patch, but can't seem to connect to the cvs server.
Hide
Kristof Neirynck added a comment -

MDL-13093 is a duplicate of MDL-12679

Show
Kristof Neirynck added a comment - MDL-13093 is a duplicate of MDL-12679
Hide
Igor Plisco added a comment -

Thank you, Kristof.

This patch works well for me.

As far as I understand, scorm_13lib.php needs similar patching too?

Show
Igor Plisco added a comment - Thank you, Kristof. This patch works well for me. As far as I understand, scorm_13lib.php needs similar patching too?
Hide
Dan Marsden added a comment -

thanks for the good quality report!

I will test the fix and look at patching it!

thanks,

Dan

Show
Dan Marsden added a comment - thanks for the good quality report! I will test the fix and look at patching it! thanks, Dan
Hide
Kimberly Prewitt added a comment -

Still Broken

We are running the Module 1.9 Official Release (MOODLE_19 March 3, 2008). I used the fix provided by Kristof Neirynck in his 28/Jan/08 post, however this did not resolve the issue for us. Moodle still skips (navigates forward in twos instead of ones) when continue is pressed.

This same error can be seen on Moodle's own website. By visiting either of these two areas:

Moodle/ ? Features/ ? eXe package
http://moodle.org/mod/scorm/view.php?id=4342

Moodle/ ? Features/ ? RELOAD demo package
http://moodle.org/mod/scorm/view.php?id=4157

If anyone has a solution please e-mail me at kimberly.a.prewitt@lmco.com

Thank you

Show
Kimberly Prewitt added a comment - Still Broken We are running the Module 1.9 Official Release (MOODLE_19 March 3, 2008). I used the fix provided by Kristof Neirynck in his 28/Jan/08 post, however this did not resolve the issue for us. Moodle still skips (navigates forward in twos instead of ones) when continue is pressed. This same error can be seen on Moodle's own website. By visiting either of these two areas: Moodle/ ? Features/ ? eXe package http://moodle.org/mod/scorm/view.php?id=4342 Moodle/ ? Features/ ? RELOAD demo package http://moodle.org/mod/scorm/view.php?id=4157 If anyone has a solution please e-mail me at kimberly.a.prewitt@lmco.com Thank you
Hide
Dan Marsden added a comment -

hmmm - that 'fix' also seems to break the continue function for people using previous versions of PHP......

Show
Dan Marsden added a comment - hmmm - that 'fix' also seems to break the continue function for people using previous versions of PHP......
Hide
Petr Škoda (skodak) added a comment -

could somebody try the attached patch (against 1.9)?
I do not have any scorm here, did not test it, but it might work or somebody may complete it

Show
Petr Škoda (skodak) added a comment - could somebody try the attached patch (against 1.9)? I do not have any scorm here, did not test it, but it might work or somebody may complete it
Hide
Dan Marsden added a comment -

thanks Petr - I've tested in php 5.1.2 and php 5.2.5 in a Scorm 1.2 object and it looks good to me! - thanks!

Show
Dan Marsden added a comment - thanks Petr - I've tested in php 5.1.2 and php 5.2.5 in a Scorm 1.2 object and it looks good to me! - thanks!
Hide
Igor Plisco added a comment -

As I wrote, it worked well for me. I use PHP 5.2.4 and I have tested it on scorm 1.2

Show
Igor Plisco added a comment - As I wrote, it worked well for me. I use PHP 5.2.4 and I have tested it on scorm 1.2
Hide
Kimberly Prewitt added a comment -

Our courseware is SCORM 2004, 3rd Edition - the "fix" did not work for us.

Show
Kimberly Prewitt added a comment - Our courseware is SCORM 2004, 3rd Edition - the "fix" did not work for us.
Hide
Dan Marsden added a comment -

HI Kimberly, Igor,

Petr has attached a file " scorm_for_fix.patch" which is a patch file with details on changes for a range of files which is diffferent to Kristof's patch - did you try that? - or the fix posted by Kristof?

Kristof's patch breaks for users who have earlier versions of PHP.

Dan

Show
Dan Marsden added a comment - HI Kimberly, Igor, Petr has attached a file " scorm_for_fix.patch" which is a patch file with details on changes for a range of files which is diffferent to Kristof's patch - did you try that? - or the fix posted by Kristof? Kristof's patch breaks for users who have earlier versions of PHP. Dan
Hide
Kimberly Prewitt added a comment -

Dan, thank you for the swift response. I had tried Kristof's line 254 "fix" - we are using PHP 5.2.2 and it didn't work for us here.

Where can I download Petr's patch file and instructions for applying it?

Thank you again.

Show
Kimberly Prewitt added a comment - Dan, thank you for the swift response. I had tried Kristof's line 254 "fix" - we are using PHP 5.2.2 and it didn't work for us here. Where can I download Petr's patch file and instructions for applying it? Thank you again.
Hide
Dan Marsden added a comment -

the patch is available via the link at the top of this page, have a look here for details on using patches in windows:
http://moodle.org/mod/forum/discuss.php?d=61379#p286372

(I'll e-mail you a couple of files to overwrite your existing copies to see if that helps)

Show
Dan Marsden added a comment - the patch is available via the link at the top of this page, have a look here for details on using patches in windows: http://moodle.org/mod/forum/discuss.php?d=61379#p286372 (I'll e-mail you a couple of files to overwrite your existing copies to see if that helps)
Hide
Jennifer Brooks added a comment -

Kimberly, you could also try adding the following lines to SCORM_13lib.php:

$nextsco = current($scoes);
if($nextsco->id == $sco->id){ $nextsco = next($scoes); }

***The above code should replace the one line: $nextsco = next($scoes); that is in SCORM_13lib.php.

Although very similar to Kristof's fix, I think it's different enough to possibly work for you.

Show
Jennifer Brooks added a comment - Kimberly, you could also try adding the following lines to SCORM_13lib.php: $nextsco = current($scoes); if($nextsco->id == $sco->id){ $nextsco = next($scoes); } ***The above code should replace the one line: $nextsco = next($scoes); that is in SCORM_13lib.php. Although very similar to Kristof's fix, I think it's different enough to possibly work for you.
Hide
Petr Škoda (skodak) added a comment -

patch in cvs, reopen in case if there are more problems somewhere,
but please remember to attach sample package (or send it to me via email skodak at moodle dot org) so that I can try to replicate it

thanks everybody

Show
Petr Škoda (skodak) added a comment - patch in cvs, reopen in case if there are more problems somewhere, but please remember to attach sample package (or send it to me via email skodak at moodle dot org) so that I can try to replicate it thanks everybody
Hide
Igor Plisco added a comment -

Thank you, Petr.

Show
Igor Plisco added a comment - Thank you, Petr.
Hide
Eloy Lafuente (stronk7) added a comment -

tested here with 2 packages. Closing.

Show
Eloy Lafuente (stronk7) added a comment - tested here with 2 packages. Closing.

Dates

  • Created:
    Updated:
    Resolved: