mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Fixed problem with scorm_get_sco to connect with the API when there is no data in the scorm_scoes_data table.
This commit is contained in:
parent
1670305df4
commit
9d759a0e85
@ -210,8 +210,11 @@ function scorm_get_sco($id,$what=SCO_ALL) {
|
||||
$sco = ($what == SCO_DATA) ? new stdClass() : $sco;
|
||||
if (($what != SCO_ONLY) && ($scodatas = get_records('scorm_scoes_data','scoid',$id))) {
|
||||
foreach ($scodatas as $scodata) {
|
||||
$sco->{$scodata->name} = $scodata->value;
|
||||
$sco->{$scodata->name} = $scodata->value;
|
||||
}
|
||||
}
|
||||
elseif (($what != SCO_ONLY) && (!($scodatas = get_records('scorm_scoes_data','scoid',$id)))){
|
||||
$sco->parameters = '';
|
||||
}
|
||||
return $sco;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user