// Message template.
$mform->addElement('editor', 'template', get_string('messagetemplate', 'tool_monitor'), $editoroptions);
- $mform->setDefault('template', get_string('defaultmessagetemplate', 'tool_monitor'));
+ $mform->setDefault('template', array('text' => get_string('defaultmessagetemplate', 'tool_monitor'),
+ 'format' => FORMAT_HTML));
$mform->addRule('template', get_string('required'), 'required');
$mform->addHelpButton('template', 'messagetemplate', 'tool_monitor');
$string['areatomonitor'] = 'Area to monitor';
$string['core'] = 'Core';
$string['currentsubscriptions'] = 'Your current subscriptions';
-$string['defaultmessagetemplate'] = 'The rule "{rulename}" you have subscribed to has occurred - please find further details at {link}';
+$string['defaultmessagetemplate'] = 'Rule name: {rulename}<br />Description: {description}<br />Event name: {eventname}';
$string['deleterule'] = 'Delete rule';
$string['deletesubscription'] = 'Delete subscription';
$string['description'] = 'Description:';
* Rule name {rulename}<br />
* Description {description}<br />
* Event {eventname}';
+$string['messagetemplate_link'] = 'admin/tool/monitor/managerules';
$string['moduleinstance'] = 'Instance';
$string['monitor:managerules'] = 'Manage event monitor rules';
$string['monitor:subscribe'] = 'Subscribe to event monitor rules';
if (json.op !== undefined &&
node.one('select[name=op] > option[value=' + json.op + ']')) {
node.one('select[name=op]').set('value', json.op);
+ if (json.op === 'isempty' || json.op === 'isnotempty') {
+ node.one('input[name=value]').set('disabled', true);
+ }
}
if (json.v !== undefined) {
node.one('input').set('value', json.v);
$data->$field = empty($grade) ? $null : $grade->finalgrade;
$data->{"old$field"} = $data->$field;
+
+ preg_match('/_(\d+)_(\d+)/', $field, $oldoverride);
+ $oldoverride = 'oldoverride' . $oldoverride[0];
+ if (empty($data->$oldoverride)) {
+ $data->$field = (!isset($grade->rawgrade)) ? $null : $grade->rawgrade;
+ }
}
}
$userid = $this->item->id;
foreach ($this->items as $gradeitemid => $gradeitem) {
$null = $gradeitem->gradetype == GRADE_TYPE_SCALE ? -1 : '';
- $field = "finalgrade_{$gradeitem->id}_{$gradeitemid}";
+ $field = "finalgrade_{$gradeitem->id}_{$this->itemid}";
if (isset($data->$field)) {
continue;
}
$grade = grade_grade::fetch(array(
- 'itemid' => $gradeitem->id,
+ 'itemid' => $this->itemid,
'userid' => $userid
));
$data->$field = empty($grade) ? $null : $grade->finalgrade;
$data->{"old$field"} = $data->$field;
+
+ preg_match('/_(\d+)_(\d+)/', $field, $oldoverride);
+ $oldoverride = 'oldoverride' . $oldoverride[0];
+ if (empty($data->$oldoverride)) {
+ $data->$field = (!isset($grade->rawgrade)) ? $null : $grade->rawgrade;
+ }
+
}
foreach ($data as $varname => $value) {
if (preg_match('/override_(\d+)_(\d+)/', $varname, $matches)) {
$data->$matches[0] = '1';
}
- if (!preg_match('/^finalgrade_(\d+)_/', $varname, $matches)) {
+ if (!preg_match('/^finalgrade_(\d+)_(\d+)/', $varname, $matches)) {
continue;
}
// Remove all grades from gradebook.
require_once($CFG->dirroot.'/mod/assign/lib.php');
assign_reset_gradebook($data->courseid);
+
+ // Reset revealidentities if both submissions and grades have been reset.
+ if ($this->get_instance()->blindmarking && $this->get_instance()->revealidentities) {
+ $DB->set_field('assign', 'revealidentities', 0, array('id' => $this->get_instance()->id));
+ }
}
}
// Updating dates - shift may be negative too.
///then we generate strings to replace
foreach ($possiblefields as $eachfield){
$field = data_get_field($eachfield, $data);
- $patterns[]="[[".$field->field->name."]]";
- $replacements[] = $field->display_add_field($rid);
- $patterns[]="[[".$field->field->name."#id]]";
+
+ // To skip unnecessary calls to display_add_field().
+ if (strpos($data->addtemplate, "[[".$field->field->name."]]") !== false) {
+ $patterns[] = "[[".$field->field->name."]]";
+ $replacements[] = $field->display_add_field($rid);
+ }
+ $patterns[] = "[[".$field->field->name."#id]]";
$replacements[] = 'field_'.$field->field->id;
}
$newtext = str_ireplace($patterns, $replacements, $data->{$mode});
$html .= '</fieldset>';
$html .= '</div>';
- $module = array(
- 'name'=>'form_filemanager',
- 'fullpath'=>'/lib/form/filemanager.js',
- 'requires' => array('core_filepicker', 'base', 'io-base', 'node',
- 'json', 'core_dndupload', 'panel', 'resize-plugin', 'dd-plugin'),
- 'strings' => array(
- array('error', 'moodle'), array('info', 'moodle'), array('confirmdeletefile', 'repository'),
- array('draftareanofiles', 'repository'), array('entername', 'repository'), array('enternewname', 'repository'),
- array('invalidjson', 'repository'), array('popupblockeddownload', 'repository'),
- array('unknownoriginal', 'repository'), array('confirmdeletefolder', 'repository'),
- array('confirmdeletefilewithhref', 'repository'), array('confirmrenamefolder', 'repository'),
- array('confirmrenamefile', 'repository'), array('edit', 'moodle')
- )
- );
-
- $PAGE->requires->js_init_call('M.form_filemanager.init', array($fm->options), true, $module);
-
return $html;
}
$str .= '</fieldset>';
$str .= '</div>';
- $module = array(
- 'name'=>'form_filemanager',
- 'fullpath'=>'/lib/form/filemanager.js',
- 'requires' => array('core_filepicker', 'base', 'io-base', 'node',
- 'json', 'core_dndupload', 'panel', 'resize-plugin', 'dd-plugin'),
- 'strings' => array(
- array('error', 'moodle'), array('info', 'moodle'), array('confirmdeletefile', 'repository'),
- array('draftareanofiles', 'repository'), array('entername', 'repository'), array('enternewname', 'repository'),
- array('invalidjson', 'repository'), array('popupblockeddownload', 'repository'),
- array('unknownoriginal', 'repository'), array('confirmdeletefolder', 'repository'),
- array('confirmdeletefilewithhref', 'repository'), array('confirmrenamefolder', 'repository'),
- array('confirmrenamefile', 'repository'), array('edit', 'moodle')
- )
- );
-
- $PAGE->requires->js_init_call('M.form_filemanager.init', array($fm->options), true, $module);
-
return $str;
}
}
if ($can_subscribe) {
- if (!\mod_forum\subscriptions::subscription_disabled($forum)) {
- $row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
- 'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
- 'cantsubscribe' => '-'), false, false, true);
- } else {
- $row[] = '-';
- }
+ $row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
+ 'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
+ 'cantsubscribe' => '-'), false, false, true);
$digestoptions_selector->url->param('id', $forum->id);
if ($forum->maildigest === null) {
}
if ($can_subscribe) {
- if (!\mod_forum\subscriptions::subscription_disabled($forum)) {
- $row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
- 'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
- 'cantsubscribe' => '-'), false, false, true);
- } else {
- $row[] = '-';
- }
+ $row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
+ 'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
+ 'cantsubscribe' => '-'), false, false, true);
$digestoptions_selector->url->param('id', $forum->id);
if ($forum->maildigest === null) {
$string['deleteddiscussion'] = 'The discussion topic has been deleted';
$string['deletedpost'] = 'The post has been deleted';
$string['deletedposts'] = 'Those posts have been deleted';
+$string['deleteoriginalonreply'] = 'If replying directly to this via email, please do not include a quoted copy of the post you are responding to';
$string['deletesure'] = 'Are you sure you want to delete this post?';
$string['deletesureplural'] = 'Are you sure you want to delete this post and all replies? ({$a} posts)';
$string['digestmailheader'] = 'This is your daily digest of new posts from the {$a->sitename} forums. To change your default forum email preferences, go to {$a->userprefs}.';
$string['repliesone'] = '{$a} reply so far';
$string['reply'] = 'Reply';
$string['replyforum'] = 'Reply to forum';
-$string['replytoforumpost'] = 'Reply via email to {$a}';
-$string['replytoforumpost_html'] = '<a href="mailto:{$a}">Reply via email</a>';
+$string['replytoforumpost'] = 'You can reply to this forum post by email.';
$string['replytouser'] = 'Use email address in reply';
$string['reply_handler'] = 'Reply to forum posts via email';
$string['reply_handler_name'] = 'Reply to forum posts';
$string['unreadpostsnumber'] = '{$a} unread posts';
$string['unreadpostsone'] = '1 unread post';
$string['unsubscribe'] = 'Unsubscribe from this forum';
+$string['unsubscribediscussion'] = 'Unsubscribe from this discussion';
$string['unsubscribeall'] = 'Unsubscribe from all forums';
$string['unsubscribeallconfirm'] = 'You are currently subscribed to {$a->forums} forums, and {$a->discussions} discussions. Do you really want to unsubscribe from all forums and discussions, and disable discussion auto-subscription?';
$string['unsubscribeallconfirmforums'] = 'You are currently subscribed to {$a->forums} forums. Do you really want to unsubscribe from all forums and disable discussion auto-subscription?';
$strforums = get_string('forums', 'forum');
- $canunsubscribe = ! \mod_forum\subscriptions::is_forcesubscribed($forum);
+ $canunsubscribe = !\mod_forum\subscriptions::is_forcesubscribed($forum);
$posttext = '';
+ if ($replyaddress) {
+ $posttext .= "--" . get_string('deleteoriginalonreply', 'mod_forum') . "--\n";
+ }
+
if (!$bare) {
$shortname = format_string($course->shortname, true, array('context' => context_course::instance($course->id)));
$posttext = "$shortname -> $strforums -> ".format_string($forum->name,true);
$posttext .= "\n\n";
$posttext .= forum_print_attachments($post, $cm, "text");
- if (!$bare && $canreply) {
- $posttext .= "---------------------------------------------------------------------\n";
- $posttext .= get_string("postmailinfo", "forum", $shortname)."\n";
- $posttext .= "$CFG->wwwroot/mod/forum/post.php?reply=$post->id\n";
- }
- if (!$bare && $canunsubscribe) {
- $posttext .= "\n---------------------------------------------------------------------\n";
- $posttext .= get_string("unsubscribe", "forum");
- $posttext .= ": $CFG->wwwroot/mod/forum/subscribe.php?id=$forum->id\n";
+ if (!$bare) {
+ if ($canreply) {
+ $posttext .= "---------------------------------------------------------------------\n";
+ $posttext .= get_string("postmailinfo", "forum", $shortname)."\n";
+ $posttext .= "$CFG->wwwroot/mod/forum/post.php?reply=$post->id\n";
+ }
+
+ if ($canunsubscribe) {
+ if (\mod_forum\subscriptions::is_subscribed($userto->id, $forum, null, $cm)) {
+ // If subscribed to this forum, offer the unsubscribe link.
+ $posttext .= "\n---------------------------------------------------------------------\n";
+ $posttext .= get_string("unsubscribe", "forum");
+ $posttext .= ": $CFG->wwwroot/mod/forum/subscribe.php?id=$forum->id\n";
+ }
+ // Always offer the unsubscribe from discussion link.
+ $posttext .= "\n---------------------------------------------------------------------\n";
+ $posttext .= get_string("unsubscribediscussion", "forum");
+ $posttext .= ": $CFG->wwwroot/mod/forum/subscribe.php?d=$discussion->id\n";
+ }
}
$posttext .= "\n---------------------------------------------------------------------\n";
$posttext .= ": {$CFG->wwwroot}/mod/forum/index.php?id={$forum->course}\n";
if ($replyaddress) {
- $posttext .= "\n\n" . get_string('replytoforumpost', 'mod_forum', $replyaddress);
+ $posttext .= "\n\n" . get_string('replytoforumpost', 'mod_forum');
}
return $posttext;
$posthtml .= '</head>';
$posthtml .= "\n<body id=\"email\">\n\n";
+ if ($replyaddress) {
+ $posttext .= "<p><em>--" . get_string('deleteoriginalonreply', 'mod_forum') . "--</em></p>";
+ }
+
$posthtml .= '<div class="navbar">'.
'<a target="_blank" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$shortname.'</a> » '.
'<a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/index.php?id='.$course->id.'">'.$strforums.'</a> » '.
$posthtml .= forum_make_mail_post($course, $cm, $forum, $discussion, $post, $userfrom, $userto, false, $canreply, true, false);
if ($replyaddress) {
- $posthtml .= "<p>" . get_string('replytoforumpost_html', 'mod_forum', $replyaddress) . "</p>";
+ $posthtml .= html_writer::tag('p', get_string('replytoforumpost', 'mod_forum'));
}
$footerlinks = array();
if ($canunsubscribe) {
- $footerlinks[] = '<a href="' . $CFG->wwwroot . '/mod/forum/subscribe.php?id=' . $forum->id . '">' . get_string('unsubscribe', 'forum') . '</a>';
+ if (\mod_forum\subscriptions::is_subscribed($userto->id, $forum, null, $cm)) {
+ // If subscribed to this forum, offer the unsubscribe link.
+ $unsublink = new moodle_url('/mod/forum/subscribe.php', array('id' => $forum->id));
+ $footerlinks[] = html_writer::link($unsublink, get_string('unsubscribe', 'mod_forum'));
+ }
+ // Always offer the unsubscribe from discussion link.
+ $unsublink = new moodle_url('/mod/forum/subscribe.php', array('d' => $discussion->id));
+ $footerlinks[] = html_writer::link($unsublink, get_string('unsubscribediscussion', 'mod_forum'));
+
$footerlinks[] = '<a href="' . $CFG->wwwroot . '/mod/forum/unsubscribeall.php">' . get_string('unsubscribeall', 'forum') . '</a>';
}
$footerlinks[] = "<a href='{$CFG->wwwroot}/mod/forum/index.php?id={$forum->course}'>" . get_string('digestmailpost', 'forum') . '</a>';
} else {
$groupmode = $course->groupmode;
}
-if ($groupmode && !\mod_forum\subscriptions::is_subscribed($user->id, $forum, null, $cm) && !has_capability('moodle/site:accessallgroups', $context)) {
+
+$issubscribed = \mod_forum\subscriptions::is_subscribed($user->id, $forum, $discussionid, $cm);
+
+// For a user to subscribe when a groupmode is set, they must have access to at least one group.
+if ($groupmode && !$issubscribed && !has_capability('moodle/site:accessallgroups')) {
if (!groups_get_all_groups($course->id, $USER->id)) {
print_error('cannotsubscribe', 'forum');
}
$info->name = fullname($user);
$info->forum = format_string($forum->name);
-if (\mod_forum\subscriptions::is_subscribed($user->id, $forum, $discussionid, $cm)) {
+if ($issubscribed) {
if (is_null($sesskey)) { // we came here via link in email
$PAGE->set_title($course->shortname);
$PAGE->set_heading($course->fullname);
$string['thatsthewronganswer'] = 'That\'s the wrong answer';
$string['thefollowingpagesjumptothispage'] = 'The following pages jump to this page';
$string['thispage'] = 'This page';
+$string['timeisup'] = 'Time is up';
$string['timeremaining'] = 'Time remaining';
$string['timespenterror'] = 'Spend at least {$a} minutes in the lesson';
$string['timespentminutes'] = 'Time spent (minutes)';
return null;
}
- $content = '<div class="jshidewhenenabled">';
+ $content = '<div id="lesson-timer">';
$content .= $lesson->time_remaining($timer->starttime);
$content .= '</div>';
$clocksettings = array('starttime'=>$timer->starttime, 'servertime'=>time(),'testlength'=>($lesson->maxtime * 60));
- $page->requires->data_for_js('clocksettings', $clocksettings);
+ $page->requires->data_for_js('clocksettings', $clocksettings, true);
+ $page->requires->strings_for_js(array('timeisup'), 'lesson');
$page->requires->js('/mod/lesson/timer.js');
- $page->requires->js_function_call('show_clock');
+ $page->requires->js_init_call('show_clock');
$bc = new block_contents();
$bc->title = get_string('timeremaining', 'lesson');
.path-mod-lesson.dir-rtl .standardtable,
.path-mod-lesson.dir-rtl .mform .box.contents,
.path-mod-lesson.dir-rtl .invisiblefieldset.fieldsetfix tr {text-align: right;}
+
+/* Countdown timer. */
+#lesson-timer {
+ text-align: center;
+}
//
//////////////////////////////////////////////////////////*/
- var myfont_face = "Arial";
- var myfont_size = "12";
- var myfont_color = "#000000";
- var myback_color = "#FFFFFF";
- var mywidth = 80;
- var my12_hour = 1;
var stopclock = 0;
var myclock = '';
var timeleft, hours, minutes, secs;
var javatimeDate = new Date();
var javatime = javatimeDate.getTime();
- javatime = Math.floor(javatime/1000);
+ javatime = Math.floor(javatime / 1000);
- var dn = "";
- var old = "";
-
- if (document.all||document.getElementById) {
- document.write('<span id="LiveClockIE" style="width:'+mywidth+'px;"></span>');
- } else if (document.layers) {
- document.write('<ilayer id="ClockPosNS"><layer width="'+mywidth+'" id="LiveClockNS"></layer></ilayer>');
- } else {
- old = "true"; show_clock();
+ if (typeof(clocksettings) != 'undefined') {
+ if (clocksettings.starttime) {
+ starttime = parseInt(clocksettings.starttime);
+ }
+ if (clocksettings.servertime) {
+ servertime = parseInt(clocksettings.servertime);
+ }
+ if (clocksettings.testlength) {
+ testlength = parseInt(clocksettings.testlength);
+ }
}
+ difference = javatime - servertime;
+ starttime = starttime + difference;
+
/*function leave() { // feable attempt to run a script when someone leaves a timed test early, failed so far
window.onunload = window.open('http://www.google.com','','toolbar=no,menubar=no,location=no,height=500,width=500');
}
function show_clock() {
- if (typeof(clocksettings) != 'undefined') {
- if (clocksettings.starttime) {
- starttime = parseInt(clocksettings.starttime);
- }
- if (clocksettings.servertime) {
- servertime = parseInt(clocksettings.servertime);
- }
- if (clocksettings.testlength) {
- testlength = parseInt(clocksettings.testlength);
- }
- }
-
- difference = javatime - servertime;
- starttime = starttime + difference;
-
- //show clock in NS 4
- if (document.layers)
- document.ClockPosNS.visibility="show";
- if (old == "die") { return; }
-
currentDate = new Date();
current = currentDate.getTime();
- current = Math.floor(current/1000);
+ current = Math.floor(current / 1000);
- var myclock = '<font style="color:'+myfont_color+'; font-family:'+myfont_face+'; font-size:'+myfont_size+'pt;">';
+ var mytime = '',
+ myclock = document.getElementById("lesson-timer");
if (current > starttime + testlength) {
- myclock += "Time is up";
+ mytime += M.util.get_string('timeisup', 'lesson');
stopclock = 1;
} else {
timeleft = starttime + testlength - current;
- hours = Math.floor(timeleft/3600);
+ if (timeleft < 60) {
+ myclock.className = "timeleft1";
+ }
+ hours = Math.floor(timeleft / 3600);
timeleft = timeleft - (hours * 3600);
- minutes = Math.floor(timeleft/60);
+ minutes = Math.floor(timeleft / 60);
secs = timeleft - (minutes * 60);
if (secs < 10) {
- secs = "0"+secs;
+ secs = "0" + secs;
}
if (minutes < 10) {
- minutes = "0"+minutes;
+ minutes = "0" + minutes;
}
- myclock += hours+":"+minutes+":"+secs;
+ mytime += hours + ":" + minutes + ":" + secs;
}
- myclock += '</font>';
- if (old == "true") {
- document.write(myclock);
- old = "die"; return;
- }
-
- if (document.layers) {
- clockpos = document.ClockPosNS;
- liveclock = clockpos.document.LiveClockNS;
- liveclock.document.write(myclock);
- liveclock.document.close();
- } else if (document.all) {
- LiveClockIE.innerHTML = myclock;
- } else if (document.getElementById) {
- document.getElementById("LiveClockIE").innerHTML = myclock;
- }
+ myclock.innerHTML = mytime;
if (stopclock == 0) {
- setTimeout("show_clock()",1000);
+ setTimeout("show_clock()", 1000);
}
}
-
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2014101600; // The current module version (Date: YYYYMMDDXX)
+$plugin->version = 2014110400; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2014050800; // Requires this Moodle version
$plugin->component = 'mod_lesson'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 0;
if (storetotaltime) {
if (cmi.mode == 'normal') {
if (cmi.credit == 'credit') {
- if ((cmi.completion_threshold != null) && (cmi.progress_measure != null)) {
+ if ((cmi.completion_threshold) && (cmi.progress_measure)) {
if (cmi.progress_measure >= cmi.completion_threshold) {
cmi.completion_status = 'completed';
} else {
$def['cmi.exit'] = scorm_isset($userdata, 'cmi.exit');
$def['cmi.credit'] = scorm_isset($userdata, 'credit');
$def['cmi.completion_status'] = scorm_isset($userdata, 'cmi.completion_status', 'unknown');
- $def['cmi.completion_threshold'] = scorm_isset($userdata, 'threshold', 'null');
- $def['cmi.learner_preference.audio_level'] = scorm_isset($userdata, 'cmi.learner_preference.audio_level', "'1'");
- $def['cmi.learner_preference.language'] = scorm_isset($userdata, 'cmi.learner_preference.language', "''");
- $def['cmi.learner_preference.delivery_speed'] = scorm_isset($userdata, 'cmi.learner_preference.delivery_speed', "'1'");
- $def['cmi.learner_preference.audio_captioning'] = scorm_isset($userdata, 'cmi.learner_preference.audio_captioning', "'0'");
- $def['cmi.location'] = scorm_isset($userdata, 'cmi.location', 'null');
- $def['cmi.max_time_allowed'] = scorm_isset($userdata, 'attemptAbsoluteDurationLimit', 'null');
- $def['cmi.progress_measure'] = scorm_isset($userdata, 'cmi.progress_measure', 'null');
- $def['cmi.scaled_passing_score'] = scorm_isset($userdata, 'cmi.scaled_passing_score', 'null');
- $def['cmi.score.scaled'] = scorm_isset($userdata, 'cmi.score.scaled', 'null');
- $def['cmi.score.raw'] = scorm_isset($userdata, 'cmi.score.raw', 'null');
- $def['cmi.score.min'] = scorm_isset($userdata, 'cmi.score.min', 'null');
- $def['cmi.score.max'] = scorm_isset($userdata, 'cmi.score.max', 'null');
+ $def['cmi.completion_threshold'] = scorm_isset($userdata, 'threshold');
+ $def['cmi.learner_preference.audio_level'] = scorm_isset($userdata, 'cmi.learner_preference.audio_level', 1);
+ $def['cmi.learner_preference.language'] = scorm_isset($userdata, 'cmi.learner_preference.language');
+ $def['cmi.learner_preference.delivery_speed'] = scorm_isset($userdata, 'cmi.learner_preference.delivery_speed');
+ $def['cmi.learner_preference.audio_captioning'] = scorm_isset($userdata, 'cmi.learner_preference.audio_captioning', 0);
+ $def['cmi.location'] = scorm_isset($userdata, 'cmi.location');
+ $def['cmi.max_time_allowed'] = scorm_isset($userdata, 'attemptAbsoluteDurationLimit');
+ $def['cmi.progress_measure'] = scorm_isset($userdata, 'cmi.progress_measure');
+ $def['cmi.scaled_passing_score'] = scorm_isset($userdata, 'cmi.scaled_passing_score');
+ $def['cmi.score.scaled'] = scorm_isset($userdata, 'cmi.score.scaled');
+ $def['cmi.score.raw'] = scorm_isset($userdata, 'cmi.score.raw');
+ $def['cmi.score.min'] = scorm_isset($userdata, 'cmi.score.min');
+ $def['cmi.score.max'] = scorm_isset($userdata, 'cmi.score.max');
$def['cmi.success_status'] = scorm_isset($userdata, 'cmi.success_status', 'unknown');
- $def['cmi.suspend_data'] = scorm_isset($userdata, 'cmi.suspend_data', 'null');
- $def['cmi.time_limit_action'] = scorm_isset($userdata, 'timelimitaction', 'null');
+ $def['cmi.suspend_data'] = scorm_isset($userdata, 'cmi.suspend_data');
+ $def['cmi.time_limit_action'] = scorm_isset($userdata, 'timelimitaction');
$def['cmi.total_time'] = scorm_isset($userdata, 'cmi.total_time', 'PT0H0M0S');
return $def;
$content .= html_writer::end_tag('div');
$content .= html_writer::end_tag('div');
- $content .= html_writer::tag('div', ' ');
+ $content .= html_writer::tag('div', ' ');
$content .= html_writer::end_tag('form');
return $content;