From d70066404d36960f8c32ceedd25ff2d14278247e Mon Sep 17 00:00:00 2001 From: bobopinna Date: Fri, 20 May 2005 15:20:49 +0000 Subject: [PATCH] Fixed a problem with credit/no-credit --- mod/scorm/api.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/scorm/api.php b/mod/scorm/api.php index 9a95ec8c42b..2bac0ecd923 100644 --- a/mod/scorm/api.php +++ b/mod/scorm/api.php @@ -47,16 +47,16 @@ if (isset($mode)) { $userdata->mode = $mode; } + if ($userdata->mode == 'normal') { + $userdata->credit = 'credit'; + } else { + $userdata->credit = 'no-credit'; + } if ($sco = get_record('scorm_scoes','id',$scoid)) { $userdata->datafromlms = $sco->datafromlms; $userdata->masteryscore = $sco->masteryscore; $userdata->maxtimeallowed = $sco->maxtimeallowed; $userdata->timelimitaction = $sco->timelimitaction; - if (!empty($sco->masteryscore)) { - $userdata->credit = 'credit'; - } else { - $userdata->credit = 'no-credit'; - } } else { error('Sco not found'); }