Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.8.9, 2.9.3, 3.0.1
-
Component/s: SCORM
-
Database:Oracle
-
Testing Instructions:
- Use Oracle
- Add a SCORM package
- Set in Attempts management Last completed attempt
- Push Save and Display
- (Regressions) Test the above steps with all the other supported DBs
-
Affected Branches:MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
-
Fixed Branches:MOODLE_29_STABLE, MOODLE_30_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-52683-master -
Pull Master Diff URL:
Description
Steps
1) Add a SCORM package
2) Set in Attempts management “Last completed attempt”
3) Push Save and Display
Using Oracle you’ll get “Error reading from database”.
This error is due to this query in mod/scorm/locallib.php (function scorm_get_last_completed_attempt):
$sql = "SELECT MAX(attempt)
FROM
WHERE userid = ? AND scormid = ?
AND (value='completed' OR value='passed')";
because value is a CLOB.
The solution is to correct the query in this way
- AND (value='completed' OR value='passed')";
+ AND (".$DB->sql_order_by_text('value')."='completed' OR ".$DB->sql_order_by_text('value')."='passed')";
Attachments
Issue Links
- has been marked as being related by
-
MDLSITE-3758 CiBoT produces weird response when branch name is incorrectly specified
-
- Resolved
-