mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 05:54:19 +02:00
MDL-52683 mod_scorm: Fix for Last completed attempt error with Oracle
This commit is contained in:
parent
e8d5100212
commit
ee8a2e2ed9
@ -812,8 +812,9 @@ function scorm_get_last_completed_attempt($scormid, $userid) {
|
||||
$sql = "SELECT MAX(attempt)
|
||||
FROM {scorm_scoes_track}
|
||||
WHERE userid = ? AND scormid = ?
|
||||
AND (value='completed' OR value='passed')";
|
||||
$lastattempt = $DB->get_field_sql($sql, array($userid, $scormid));
|
||||
AND (".$DB->sql_compare_text('value')." = ".$DB->sql_compare_text('?')." OR ".
|
||||
$DB->sql_compare_text('value')." = ".$DB->sql_compare_text('?').")";
|
||||
$lastattempt = $DB->get_field_sql($sql, array($userid, $scormid, 'completed', 'passed'));
|
||||
if (empty($lastattempt)) {
|
||||
return '1';
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user