Moodle

Regression: A forcedownload error caused SCORM mod not works.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Component/s: SCORM
  • Labels:
    None
  • Environment:
    Linux, MySQL, Moodle 1.9.5
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Some moodle security codes in file.php:

if (!$forcedownload) {
require_once("$CFG->dirroot/mod/$mod/lib.php");
$trustedfunction = $mod.'_is_moddata_trusted';
if (function_exists($trustedfunction)) { // force download of all attachments that are not trusted $forcedownload = !$trustedfunction(); } else { $forcedownload = 1; }
}

Caused SCORM module always force user to download the scorm content instead of display it.

After check mod/scorm/lib.php, there was no "scorm_is_moddata_trusted" function. After add such function and make it always return true(trusted scorm data because it only can be uploaded by tutor/admin), it works.

Activity

Hide
Dan Marsden added a comment -

assigning to Petr - can you please check this out? - it appears to be related to your recent changes?

thanks!

Show
Dan Marsden added a comment - assigning to Petr - can you please check this out? - it appears to be related to your recent changes? thanks!
Hide
Dan Marsden added a comment -

btw - I haven't tested this

Show
Dan Marsden added a comment - btw - I haven't tested this
Hide
Petr Škoda (skodak) added a comment -

strange, there sure is scorm_is_moddata_trusted() in mod/scorm/lib.php, did you upgrade properly?

Show
Petr Škoda (skodak) added a comment - strange, there sure is scorm_is_moddata_trusted() in mod/scorm/lib.php, did you upgrade properly?
Hide
Petr Škoda (skodak) added a comment -

I am sorry, I can not reproduce this, please reopen if needed...

Show
Petr Škoda (skodak) added a comment - I am sorry, I can not reproduce this, please reopen if needed...
Hide
Dan Marsden added a comment -

I haven't seen this either - closing - thanks Petr.

Show
Dan Marsden added a comment - I haven't seen this either - closing - thanks Petr.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: