mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-52683-master' of git://github.com/s-cenni/moodle
This commit is contained in:
commit
0b8be05caf
@ -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