$string['defaultexpiration'] = 'Default address expiry period';
$string['defaultexpiration_help'] = 'When an email address is generated by the handler, it can be set to automatically expire after a period of time, so that it can no longer be used. It is advisable to set an expiry period.';
$string['description'] = 'Description';
-$string['domain'] = 'Email Domain';
+$string['domain'] = 'Email domain';
$string['edit'] = 'Edit';
$string['edithandler'] = 'Edit settings for the {$a} handler';
$string['editinghandler'] = 'Editing {$a}';
$string['invalid_recipient_handler_name'] = 'Invalid recipient handler';
$string['invalidrecipientdescription'] = 'The message "{$a->subject}" could not be authenticated, since it was sent from a different email address than in your user profile. For the message to be authenticated, you need to reply to this message.';
$string['invalidrecipientdescriptionhtml'] = 'The message "{$a->subject}" could not be authenticated, since it was sent from a different email address than in your user profile. For the message to be authenticated, you need to reply to this message.';
-$string['invalidrecipientfinal'] = 'The message you sent with subject "{$a->subject}" could not be authenticated. Please check that you are sending your message from the e-mail account listed in your Moodle profile.';
+$string['invalidrecipientfinal'] = 'The message "{$a->subject}" could not be authenticated. Please check that you are sending your message from the same email address as in your profile.';
$string['mailbox'] = 'Mailbox name';
$string['mailboxconfiguration'] = 'Mailbox configuration';
$string['mailboxdescription'] = '[mailbox]+subaddress@[domain]';
$string['mailsettings'] = 'Mail settings';
$string['message_handlers'] = 'Message handlers';
-$string['messageprocessingerror'] = 'You recently sent an e-mail to Moodle with the subject "{$a->subject}" but Moodle was unable to process it.
+$string['messageprocessingerror'] = 'You recently sent an email "{$a->subject}" but unfortunately it could not be processed.
The details of the error are shown below.
{$a->error}';
-$string['messageprocessingerrorhtml'] = '<p>You recently sent an e-mail to Moodle with the subject "{$a->subject}" but Moodle was unable to process it.</p>
+$string['messageprocessingerrorhtml'] = '<p>You recently sent an email "{$a->subject}" but unfortunately it could not be processed.</p>
<p>The details of the error are shown below.</p>
<p>{$a->error}</p>';
-$string['messageprocessingfailed'] = 'Moodle was unable to process the e-mail you sent with subject "{$a->subject}". The following error was given: "{$a->message}".';
-$string['messageprocessingfailedunknown'] = 'Moodle was unable to process the e-mail you sent with subject "{$a->subject}". Contact your system administrator for further information.';
+$string['messageprocessingfailed'] = 'The email "{$a->subject}" could not be processed. The error is as follows: "{$a->message}".';
+$string['messageprocessingfailedunknown'] = 'The email "{$a->subject}" could not be processed. Contact your administrator for further information.';
$string['messageprocessingsuccess'] = '{$a->plain}
If you do not wish to receive these notifications in the future, you can edit your personal messaging preferences by opening {$a->messagepreferencesurl} in your browser.';
$string['messageinboundgeneralconfiguration_desc'] = 'Inbound message processing allows you to receive and process email within Moodle. This has applications such as sending email replies to forum posts or adding files to a user\'s private files.';
$string['messageinboundhost'] = 'Incoming Mail Server';
$string['messageinboundhostpass'] = 'Password';
-$string['messageinboundhostpass_desc'] = 'This is the password your service provider will have provided to log into your e-mail account with.';
+$string['messageinboundhostpass_desc'] = 'This is the password your service provider will have provided to log in to your email account with.';
$string['messageinboundhostssl'] = 'Use SSL';
$string['messageinboundhostssl_desc'] = 'Some mail servers support an additional level of security by encrypting communication between Moodle and your server. We recommend using this SSL encryption if your server supports it.';
$string['messageinboundhosttype'] = 'Server type';
$string['messageinboundhostuser'] = 'Username';
-$string['messageinboundhostuser_desc'] = 'This is the username your service provider will have provided to log into your e-mail account with.';
+$string['messageinboundhostuser_desc'] = 'This is the username your service provider will have provided to log in to your email account with.';
$string['messageinboundmailboxconfiguration_desc'] = 'When messages are sent out, they fit into the format address+data@example.com. To reliably generate addresses from Moodle, please specify the address that you would normally use before the @ sign, and the domain after the @ sign separately. For example, the Mailbox name in the example would be "address", and the E-mail domain would be "example.com". You should use a dedicated e-mail account for this purpose.';
-$string['messageprovider:invalidrecipienthandler'] = 'Messages to confirm that an inbound messages came from you';
+$string['messageprovider:invalidrecipienthandler'] = 'Message to confirm that an inbound message came from you';
$string['messageprovider:messageprocessingerror'] = 'Warning when an inbound message could not be processed';
$string['messageprovider:messageprocessingsuccess'] = 'Confirmation that a message was successfully processed';
$string['noencryption'] = 'Off - No encryption';
// 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['contactadmin'] = 'Contact your administrator to enable it.';
$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['monitorenabled'] = 'Event monitoring is currently enabled. ';
$string['monitordisabled'] = 'Event monitoring is currently disabled.';
$string['auth_ldap_passtype_key'] = 'Password format';
$string['auth_ldap_passwdexpire_settings'] = 'LDAP password expiration settings.';
$string['auth_ldap_preventpassindb'] = 'Select yes to prevent passwords from being stored in Moodle\'s DB.';
-$string['auth_ldap_preventpassindb_key'] = 'Hide passwords';
+$string['auth_ldap_preventpassindb_key'] = 'Cache passwords';
$string['auth_ldap_search_sub'] = 'Search users from subcontexts.';
$string['auth_ldap_search_sub_key'] = 'Search subcontexts';
$string['auth_ldap_server_settings'] = 'LDAP server settings';
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;
+ }
}
}
foreach ($data as $varname => $value) {
+ if (preg_match('/override_(\d+)_(\d+)/', $varname, $matches)) {
+ $data->$matches[0] = '1';
+ }
if (!preg_match('/^finalgrade_(\d+)_/', $varname, $matches)) {
continue;
}
$fields = $this->definition();
+ // Avoiding execution timeouts when updating
+ // a large amount of grades.
+ $progress = 0;
+ $progressbar = new \core\progress\display_if_slow();
+ $progressbar->start_html();
+ $progressbar->start_progress(get_string('savegrades', 'gradereport_singleview'), count((array) $data) - 1);
+ $changecount = array();
+
foreach ($data as $varname => $throw) {
+ $progressbar->progress($progress);
+ $progress++;
if (preg_match("/(\w+)_(\d+)_(\d+)/", $varname, $matches)) {
$itemid = $matches[2];
$userid = $matches[3];
if (preg_match('/^old[oe]{1}/', $varname)) {
$elementname = preg_replace('/^old/', '', $varname);
if (!isset($data->$elementname)) {
+ // Decrease the progress because we've increased the
+ // size of the array we are iterating through.
+ $progress--;
$data->$elementname = false;
}
}
if (!empty($msg)) {
$warnings[] = $msg;
}
+ if (preg_match('/_(\d+)_(\d+)/', $varname, $matchelement)) {
+ $changecount[$matchelement[0]] = 1;
+ }
}
// Some post-processing.
$eventdata->warnings = $warnings;
$eventdata->post_data = $data;
$eventdata->instance = $this;
+ $eventdata->changecount = $changecount;
+
+ $progressbar->end_html();
- return $eventdata->warnings;
+ return $eventdata;
}
/**
return $this;
}
- /**
- * Get the tabindex for the table in the page.
- *
- * @return int
- */
- public function get_tabindex() {
- return (count($this->definition()) * $this->total) + $this->index;
- }
-
/**
* Get a element to generate the HTML for this table row
* @param array $line This is a list of lines in the table (modified)
$save = html_writer::empty_tag('input', array(
'type' => 'submit',
'value' => get_string('update'),
- 'tabindex' => $this->get_tabindex(),
));
return array($save);
if ($bulk->is_applied($data)) {
$filter = $bulk->get_type($data);
$insertvalue = $bulk->get_insert_value($data);
- // Appropriately massage data that may not exist.
$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('/^finalgrade_(\d+)_/', $varname, $matches)) {
+ if (preg_match('/override_(\d+)_(\d+)/', $varname, $matches)) {
+ $data->$matches[0] = '1';
+ }
+ if (!preg_match('/^finalgrade_(\d+)_(\d+)/', $varname, $matches)) {
continue;
}
}
}
}
-
return parent::process($data);
}
}
/** @var bool $ischecked Is it checked? */
private $ischecked;
- /** @var int $tabindex The tab index for this form element. */
- private $tabindex;
-
/**
* Constructor
*
* @param string $name The element name
* @param string $label The label for the form element
* @param bool $ischecked Is this thing on?
- * @param int $tabindex The tab index for the form element.
* @param int $locked Is this element locked either 0 or a time.
*/
- public function __construct($name, $label, $ischecked = false, $tabindex = null, $locked=0) {
+ public function __construct($name, $label, $ischecked = false, $locked=0) {
$this->ischecked = $ischecked;
- $this->tabindex = $tabindex;
$this->locked = $locked;
parent::__construct($name, 1, $label);
}
'name' => 'old' . $this->name
);
- if (!empty($this->tabindex)) {
- $attributes['tabindex'] = $this->tabindex;
- }
-
if ($this->ischecked) {
$attributes['checked'] = 'CHECKED';
$hidden['value'] = 1;
* @param string $label The form label for this input.
* @param string $selected The name of the selected item in this input.
* @param bool $isdisabled Are we disabled?
- * @param int $tabindex The tab index for this field
*/
- public function __construct($name, $options, $label, $selected = '', $isdisabled = false, $tabindex = null) {
+ public function __construct($name, $options, $label, $selected = '', $isdisabled = false) {
$this->selected = $selected;
$this->options = $options;
- $this->tabindex = $tabindex;
$this->isdisabled = $isdisabled;
parent::__construct($name, $selected, $label);
}
);
$attributes = array();
- if (!empty($this->tabindex)) {
- $attributes['tabindex'] = $this->tabindex;
- }
if (!empty($this->isdisabled)) {
$attributes['disabled'] = 'DISABLED';
$this->get_name(),
$this->get_value(),
$this->get_label(),
- $this->is_disabled(),
- $this->get_tabindex()
+ $this->is_disabled()
);
}
$options,
$this->get_label(),
$this->get_value(),
- $this->is_disabled(),
- $this->get_tabindex()
+ $this->is_disabled()
);
} else {
return new text_attribute(
$this->get_name(),
$this->get_value(),
$this->get_label(),
- $this->is_disabled(),
- $this->get_tabindex()
+ $this->is_disabled()
);
}
}
* @copyright 2014 Moodle Pty Ltd (http://moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-abstract class grade_attribute_format extends attribute_format implements unique_name, tabbable {
+abstract class grade_attribute_format extends attribute_format implements unique_name {
/** @var string $name The first part of the name attribute of the form input */
public $name;
/** @var grade_grade $grade The grade_grade of the input */
public $grade;
- /** @var int $tabindex The tabindex of the input */
- public $tabindex;
-
/**
* Constructor
*
* @param grade_grade $grade The grade_grade we are editing.
- * @param int $tabindex The tabindex for the input.
*/
- public function __construct($grade = 0, $tabindex = 1) {
-
+ public function __construct($grade = 0) {
$this->grade = $grade;
- $this->tabindex = $tabindex;
}
/**
return "{$this->name}_{$this->grade->itemid}_{$this->grade->userid}";
}
- /**
- * Get the tabindex for this form input
- *
- * @return int The tab index
- */
- public function get_tabindex() {
- return isset($this->tabindex) ? $this->tabindex : null;
- }
-
/**
* Should be overridden by the child class to save the value returned in this input.
*
$this->get_name(),
$this->get_label(),
$this->is_checked(),
- null,
$this->is_disabled()
);
}
+++ /dev/null
-<?php
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * The gradebook simple view - UI factory
- *
- * @package gradereport_singleview
- * @copyright 2014 Moodle Pty Ltd (http://moodle.com)
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace gradereport_singleview\local\ui;
-
-defined('MOODLE_INTERNAL') || die;
-
-/**
- * This element has a tabindex
- *
- * @package gradereport_singleview
- * @copyright 2014 Moodle Pty Ltd (http://moodle.com)
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-interface tabbable {
- /**
- * Get the tabindex for this element
- * @return int
- */
- public function get_tabindex();
-}
-
/** @var bool $isdisabled Is this input disabled? */
private $isdisabled;
- /** @var int $tabindex Tabindex value for this input. */
- private $tabindex;
-
/**
* Constructor
*
* @param string $value The input initial value.
* @param string $label The label for this input field.
* @param bool $isdisabled Is this input disabled.
- * @param int $tabindex Tab index for this input.
*/
- public function __construct($name, $value, $label, $isdisabled = false, $tabindex = null) {
+ public function __construct($name, $value, $label, $isdisabled = false) {
$this->isdisabled = $isdisabled;
- $this->tabindex = $tabindex;
parent::__construct($name, $value, $label);
}
'id' => $this->name
);
- if (!empty($this->tabindex)) {
- $attributes['tabindex'] = $this->tabindex;
- }
if ($this->isdisabled) {
$attributes['disabled'] = 'DISABLED';
}
}
require_login($course);
-$PAGE->set_pagelayout('report');
if (!in_array($itemtype, gradereport_singleview::valid_screens())) {
print_error('notvalid', 'gradereport_singleview', '', $itemtype);
$currentpage = new moodle_url('/grade/report/singleview/index.php', $pageparams);
if ($data = data_submitted()) {
+ $PAGE->set_pagelayout('redirect');
+ $PAGE->set_title(get_string('savegrades', 'gradereport_singleview'));
+ echo $OUTPUT->header();
+
require_sesskey(); // Must have a sesskey for all actions.
- $warnings = $report->process_data($data);
+ $result = $report->process_data($data);
- if (empty($warnings)) {
- redirect($currentpage);
- die();
+ if (!empty($result->warnings)) {
+ foreach ($result->warnings as $warning) {
+ echo $OUTPUT->notification($warning);
+ }
}
+ echo $OUTPUT->notification(get_string('savegradessuccess', 'gradereport_singleview', count ((array)$result->changecount)));
+ echo $OUTPUT->continue_button($currentpage);
+ echo $OUTPUT->footer();
+ die();
}
+$PAGE->set_pagelayout('report');
print_grade_page_head($course->id, 'report', 'singleview', $reportname);
$graderrightnav = $graderleftnav = null;
echo $report->group_selector;
}
-if (!empty($warnings)) {
- foreach ($warnings as $warning) {
- echo $OUTPUT->notification($warning);
- }
-}
-
echo $report->output();
if ($report->screen->supports_paging()) {
$string['overridefor'] = 'Override for {$a}';
$string['overridenone'] = 'Override no grades';
$string['pluginname'] = 'Single view';
+$string['savegrades'] = 'Saving grades';
+$string['savegradessuccess'] = 'Grades were set for {$a} items';
$string['singleview:view'] = 'View report';
$string['summarygrade'] = 'A table of users, with columns for range, grade, feedback, and whether to override or exclude a particular grade.';
$string['summaryuser'] = 'A table of grade items, with columns for grade category, range, grade, feedback, and whether to override or exclude a particular grade.';
| Feedback for Test assignment one | test data |
And I click on "Exclude for Test assignment four" "checkbox"
And I press "Update"
- Then the following should exist in the "generaltable" table:
+ Then I should see "Grades were set for 2 items"
+ And I press "Continue"
+ And the following should exist in the "generaltable" table:
| Test assignment four |
| excluded |
And the following should exist in the "generaltable" table:
| Feedback for james (Student) 1 | test data2 |
And I click on "Exclude for holly (Student) 2" "checkbox"
And I press "Update"
+ Then I should see "Grades were set for 2 items"
+ And I press "Continue"
And the following should exist in the "generaltable" table:
| Test assignment three |
| 12.05 |
And I click on "new grade item 1" "option"
And I click on "Very good" "option"
And I press "Update"
+ Then I should see "Grades were set for 1 items"
+ And I press "Continue"
And the following should exist in the "generaltable" table:
| Grade for james (Student) 1 | "Very good" |
$string['configthemedesignermode'] = 'Normally all theme images and style sheets are cached in browsers and on the server for a very long time, for performance. If you are designing themes or developing code then you probably want to turn this mode on so that you are not served cached versions. Warning: this will make your site slower for all users! Alternatively, you can also reset the theme caches manually from the Theme selection page.';
$string['configthemelist'] = 'Leave this blank to allow any valid theme to be used. If you want to shorten the theme menu, you can specify a comma-separated list of names here (Don\'t use spaces!).
For example: standard,orangewhite.';
-$string['configtimezone'] = 'You can set the default timezone here. This is the only the DEFAULT timezone for displaying dates - each user can override this by setting their own in their profile. "Server time" here will make Moodle default to the server\'s operating system setting, but "Server time" in the user profile will make the user default to this timezone setting. Cronjobs that depend on a time of day to run will use this timezone.';
+$string['configtimezone'] = 'This is the default timezone for displaying dates - each user can override this setting in their profile. "Server timezone" here will make Moodle default to the server setting in PHP, but "Server timezone" in the user profile will make the user default to this timezone setting. It is recommended that you update timezones then select a named timezone specific to your region.';
$string['configuseblogassociations'] = 'Should users be able to organize their blog by associating entries with courses and course modules?';
$string['configuseexternalyui'] = 'Instead of using local files, use online files available on Yahoo‘s servers. WARNING: This requires an internet connection, or no AJAX will work on your site. This setting is not compatible with sites using https.';
$string['configusesitenameforsitepages'] = 'If enabled the site\'s shortname will be used for the site pages node in the navigation rather than the string \'Site pages\'';
$string['loginpageautofocus'] = 'Autofocus login page form';
$string['loginpageautofocus_help'] = 'Enabling this option improves usability of the login page, but automatically focusing fields may be considered an accessibility issue.';
$string['loginpasswordautocomplete'] = 'Prevent password autocompletion on login form';
-$string['loginpasswordautocomplete_help'] = 'Having this off will let users save their account password in their browser. Switching this setting on will result in your site no longer following XHTML strict validation rules.';
+$string['loginpasswordautocomplete_help'] = 'If enabled, users are not allowed to save their account password in their browser.';
$string['loglifetime'] = 'Keep logs for';
$string['logstorenotrequired'] = 'Log store not required';
$string['logstoressupported'] = 'Log stores that support this report';
$string['cachesession'] = 'Session cache';
$string['cachesessionhelp'] = 'User specific cache that expires when the user\'s session ends. Designed to alleviate session bloat/strain.';
$string['cacheapplication'] = 'Application cache';
-$string['cacheapplicationhelp'] = ' Cached items are shared amoung all users and expire by a determined ttl.';
+$string['cacheapplicationhelp'] = 'Cached items are shared among all users and expire by a determined time to live (ttl).';
$string['filereferencesincluded'] = 'File references to external contents included in backup package, they won\'t work on other sites.';
$string['filereferencessamesite'] = 'Backup is from the same site, file references can be restored';
$string['filereferencesnotsamesite'] = 'Backup is from other site, file references cannot be restored';
-$string['generalactivities'] = 'Include activities';
+$string['generalactivities'] = 'Include activities and resources';
$string['generalanonymize'] = 'Anonymise information';
$string['generalbackdefaults'] = 'General backup defaults';
$string['generalbadges'] = 'Include badges';
$string['rootsettingusers'] = 'Include enrolled users';
$string['rootsettinganonymize'] = 'Anonymize user information';
$string['rootsettingroleassignments'] = 'Include user role assignments';
-$string['rootsettingactivities'] = 'Include activities';
+$string['rootsettingactivities'] = 'Include activities and resources';
$string['rootsettingbadges'] = 'Include badges';
$string['rootsettingblocks'] = 'Include blocks';
$string['rootsettingfilters'] = 'Include filters';
$string['aggregation_link'] = 'grade/aggregation';
$string['aggregationcoef'] = 'Aggregation coefficient';
$string['aggregationcoefextra'] = 'Extra credit'; // for the header of the table at Edit categories and items page
-$string['aggregationcoefextra_help'] = 'If the aggregation is Natural or Simple weighted mean and the extra credit checkbox is ticked, the grade item\'s maximum grade is not added to the category\'s maximum grade, resulting in the possibility of achieving the maximum grade (or grades over the maximum if enabled by the site administrator) in the category without having the maximum grade in all the grade items.
+$string['aggregationcoefextra_help'] = 'If the aggregation is \'Natural\' or \'Simple weighted mean\' and the extra credit checkbox is ticked, the grade item\'s maximum grade is not added to the category\'s maximum grade. This will result in the possibility of achieving the maximum grade in the category without having the maximum grade in all the grade items. If the site administrator has enabled grades over the maximum, there might be grades over the maximum.
-If the aggregation is Mean of grades (with extra credits) and the extra credit is set to a value greater than zero, the extra credit is the factor by which the grade is multiplied before adding it to the total after the computation of the mean.';
+If the aggregation is \'Mean of grades (with extra credits)\' and the extra credit is set to a value greater than zero, the extra credit is the factor by which the grade is multiplied before adding it to the total after the computation of the mean.';
$string['aggregationcoefextra_link'] = 'grade/aggregation';
$string['aggregationcoefextrasum'] = 'Extra credit'; // for the form with checkboxes: Natural or Simple weighted mean
$string['aggregationcoefextrasumabbr'] = '+';
(you will see errors when you look at pages) so you\'ll have to remove the .htaccess file.</p></li>
</ol>';
$string['mssqlextensionisnotpresentinphp'] = 'PHP has not been properly configured with the MSSQL extension so that it can communicate with SQL*Server. Please check your php.ini file or recompile PHP.';
-$string['mysqliextensionisnotpresentinphp'] = 'PHP has not been properly configured with the MySQLi extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP. MySQLi extension is not available for PHP 4.';
+$string['mysqliextensionisnotpresentinphp'] = 'PHP has not been properly configured with the MySQLi extension for it to communicate with MySQL. Please check your php.ini file or recompile PHP.';
$string['nativemariadb'] = 'MariaDB (native/mariadb)';
$string['nativemariadbhelp'] = '<p>The database is where most of the Moodle settings and data are stored and must be configured here.</p>
<p>The database name, username, and password are required fields; table prefix is optional.</p>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['h3'] = 'Heading 1';
-$string['h4'] = 'Heading 2';
-$string['h5'] = 'Heading 3';
+$string['h3'] = 'Heading (large)';
+$string['h4'] = 'Heading (medium)';
+$string['h5'] = 'Heading (small)';
$string['p'] = 'Paragraph';
$string['pluginname'] = 'Paragraph styles';
$string['pre'] = 'Pre-formatted';
// 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.
$string['timerestrict'] = 'Restrict answering to this time period';
$string['viewallresponses'] = 'View {$a} responses';
$string['withselected'] = 'With selected';
-$string['userchoosethisoption'] = 'User choose this option';
+$string['userchoosethisoption'] = 'Users who chose this option';
$string['yourselection'] = 'Your selection';
$string['skipresultgraph'] = 'Skip result graph';
///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;
}
// use <noscript> to print button in case javascript is not enabled
$link .= '<noscript>';
}
- $url = new moodle_url('/mod/forum/settracking.php', array('id'=>$forum->id));
+ $url = new moodle_url('/mod/forum/settracking.php', array(
+ 'id' => $forum->id,
+ 'sesskey' => sesskey(),
+ ));
$link .= $OUTPUT->single_button($url, $linktext, 'get', array('title'=>$linktitle));
if ($fakelink) {
var elementid = "trackinglink";
var subs_link = document.getElementById(elementid);
if(subs_link){
- subs_link.innerHTML = "<a title='"+ltitle+"' href='"+M.cfg.wwwroot+"/mod/forum/settracking.php?id="+forumid+"'>"+ltext+"<\/a>";
+ subs_link.innerHTML = "<a title='"+ltitle+"' href='"+M.cfg.wwwroot+"/mod/forum/settracking.php?id="+forumid+"&sesskey="+M.cfg.sesskey+"'>"+ltext+"<\/a>";
}
}
} else if ($forum->trackingtype === FORUM_TRACKING_OFF || ($USER->trackforums == 0)) {
$trackedlink = '-';
} else {
- $aurl = new moodle_url('/mod/forum/settracking.php', array('id'=>$forum->id));
+ $aurl = new moodle_url('/mod/forum/settracking.php', array(
+ 'id' => $forum->id,
+ 'sesskey' => sesskey(),
+ ));
if (!isset($untracked[$forum->id])) {
$trackedlink = $OUTPUT->single_button($aurl, $stryes, 'post', array('title'=>$strnotrackforum));
} else {
}
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['discussionname'] = 'Discussion name';
$string['discussionnownotsubscribed'] = '{$a->name} will NOT be notified of new posts in \'{$a->discussion}\' of \'{$a->forum}\'';
$string['discussionnowsubscribed'] = '{$a->name} will be notified of new posts in \'{$a->discussion}\' of \'{$a->forum}\'';
-$string['discussionsubscribestop'] = 'I don\'t want email copies of posts to this discussion';
-$string['discussionsubscribestart'] = 'Send me email copies of posts to this discussion';
+$string['discussionsubscribestop'] = 'I don\'t want to be notified of new posts in this discussion';
+$string['discussionsubscribestart'] = 'Send me notifications of new posts in this discussion';
$string['discussionsubscription'] = 'Discussion subscription';
$string['discussionsubscription_help'] = 'Subscribing to a discussion means you will receive notifications of new posts to that discussion.';
$string['discussions'] = 'Discussions';
$string['nopostsmadebyyou'] = 'You haven\'t made any posts';
$string['noquestions'] = 'There are no questions yet in this forum';
$string['nosubscribers'] = 'There are no subscribers yet for this forum';
-$string['notsubscribed'] = 'Not subscribed';
+$string['notsubscribed'] = 'Subscribe';
$string['notexists'] = 'Discussion no longer exists';
$string['nothingnew'] = 'Nothing new for {$a}';
$string['notingroup'] = 'Sorry, but you need to be part of a group to see this forum.';
$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['subscribenone'] = 'Unsubscribe everyone from this forum';
$string['subscribers'] = 'Subscribers';
$string['subscribersto'] = 'Subscribers to \'{$a}\'';
-$string['subscribestart'] = 'Send me email copies of posts to this forum';
-$string['subscribestop'] = 'I don\'t want email copies of posts to this forum';
+$string['subscribestart'] = 'Send me notifications of new posts in this forum';
+$string['subscribestop'] = 'I don\'t want to be notified of new posts in this forum';
$string['subscription'] = 'Subscription';
-$string['subscription_help'] = 'If you are subscribed to a forum it means you will receive email copies of forum posts. Usually you can choose whether you wish to be subscribed, though sometimes subscription is forced so that everyone receives email copies of forum posts.';
+$string['subscription_help'] = 'If you are subscribed to a forum it means you will receive notification of new forum posts. Usually you can choose whether you wish to be subscribed, though sometimes subscription is forced so that everyone receives notifications.';
$string['subscriptionandtracking'] = 'Subscription and tracking';
$string['subscriptionmode'] = 'Subscription mode';
$string['subscriptionmode_help'] = 'When a participant is subscribed to a forum it means they will receive forum post notifications. There are 4 subscription mode options:
$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>';
'd' => $discussionid,
'returnurl' => $returnurl,
));
+
+ if ($includetext) {
+ $o .= $subscriptionstatus ? get_string('subscribed', 'mod_forum') : get_string('notsubscribed', 'mod_forum');
+ }
+
if ($subscriptionstatus) {
- $o .= html_writer::link($subscriptionlink,
- $OUTPUT->pix_icon('t/subscribed', get_string('clicktounsubscribe', 'forum'), 'mod_forum'),
- array(
+ $output = $OUTPUT->pix_icon('t/subscribed', get_string('clicktounsubscribe', 'forum'), 'mod_forum');
+ if ($includetext) {
+ $output .= get_string('subscribed', 'mod_forum');
+ }
+
+ return html_writer::link($subscriptionlink, $output, array(
'title' => get_string('clicktounsubscribe', 'forum'),
'class' => 'discussiontoggle iconsmall',
'data-forumid' => $forum->id,
'data-discussionid' => $discussionid,
'data-includetext' => $includetext,
- ));
+ ));
+
} else {
- $o .= html_writer::link($subscriptionlink,
- $OUTPUT->pix_icon('t/unsubscribed', get_string('clicktosubscribe', 'forum'), 'mod_forum'),
- array(
+ $output = $OUTPUT->pix_icon('t/unsubscribed', get_string('clicktosubscribe', 'forum'), 'mod_forum');
+ if ($includetext) {
+ $output .= get_string('notsubscribed', 'mod_forum');
+ }
+
+ return html_writer::link($subscriptionlink, $output, array(
'title' => get_string('clicktosubscribe', 'forum'),
'class' => 'discussiontoggle iconsmall',
'data-forumid' => $forum->id,
'data-discussionid' => $discussionid,
'data-includetext' => $includetext,
- ));
+ ));
}
-
- if ($includetext) {
- $o .= $subscriptionstatus ? get_string('subscribed', 'mod_forum') : get_string('notsubscribed', 'mod_forum');
- }
-
- return $o;
}
/**
} else {
$linktext = get_string('trackforum', 'forum');
}
- $url = new moodle_url('/mod/forum/settracking.php', array('id'=>$forumobject->id));
+ $url = new moodle_url('/mod/forum/settracking.php', array(
+ 'id' => $forumobject->id,
+ 'sesskey' => sesskey(),
+ ));
$forumnode->add($linktext, $url, navigation_node::TYPE_SETTING);
}
}
$id = required_param('id',PARAM_INT); // The forum to subscribe or unsubscribe to
$returnpage = optional_param('returnpage', 'index.php', PARAM_FILE); // Page to return to.
-$url = new moodle_url('/mod/forum/settracking.php', array('id'=>$id));
-if ($returnpage !== 'index.php') {
- $url->param('returnpage', $returnpage);
-}
-$PAGE->set_url($url);
+require_sesskey();
if (! $forum = $DB->get_record("forum", array("id" => $id))) {
print_error('invalidforumid', 'forum');
if (! $cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) {
print_error('invalidcoursemodule');
}
-
-require_course_login($course, false, $cm);
+require_login($course, false, $cm);
$returnto = forum_go_back_to($returnpage.'?id='.$course->id.'&f='.$forum->id);
float: left;
}
-.path-mod-forum .discussiontoggle {
- display: inline-block;
- width: 12px;
-}
-
.path-mod-forum .discussionsubscription {
margin-top: -10px;
text-align: right;
margin-bottom: 10px;
}
-.path-mod-forum .discussionsubscription > a {
+.path-mod-forum .discussionsubscription > a > img {
+ width: 12px;
padding: 0 4px;
}
} 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;
$string['action'] = 'Action';
$string['active'] = 'Active';
$string['activity'] = 'Activity';
-$string['addnewapp'] = 'Enable External Application';
+$string['addnewapp'] = 'Enable external application';
$string['addserver'] = 'Add new trusted server';
$string['addtype'] = 'Add external tool configuration';
$string['allow'] = 'Allow';
$string['allowinstructorcustom'] = 'Allow teachers to add custom parameters';
$string['allowsetting'] = 'Allow tool to store 8K of settings in Moodle';
$string['always'] = 'Always';
-$string['automatic'] = 'Automatic, based on Launch URL';
-$string['baseurl'] = 'Base URL/Tool Registration Name';
+$string['automatic'] = 'Automatic, based on launch URL';
+$string['baseurl'] = 'Base URL/tool registration name';
$string['basiclti'] = 'LTI';
-$string['basiclti_base_string'] = 'LTI OAuth Base String';
-$string['basiclti_endpoint'] = 'LTI Launch Endpoint';
+$string['basiclti_base_string'] = 'LTI OAuth base string';
+$string['basiclti_endpoint'] = 'LTI launch endpoint';
$string['basiclti_in_new_window'] = 'Your activity has opened in a new window';
-$string['basiclti_parameters'] = 'LTI Launch Parameters';
-$string['basicltiactivities'] = 'LTI Activities';
+$string['basiclti_parameters'] = 'LTI launch parameters';
+$string['basicltiactivities'] = 'LTI activities';
$string['basicltifieldset'] = 'Custom example fieldset';
-$string['basicltiintro'] = 'Activity Description';
-$string['basicltiname'] = 'Activity Name';
-$string['basicltisettings'] = 'Basic Learning Tool Interoperability Settings';
+$string['basicltiintro'] = 'Activity description';
+$string['basicltiname'] = 'Activity name';
+$string['basicltisettings'] = 'Basic Learning Tool Interoperability (LTI) settings';
$string['cancel'] = 'Cancel';
$string['cancelled'] = 'Cancelled';
$string['cannot_delete'] = 'You may not delete this tool configuration.';
$string['capabilities_help'] = 'Select those capabilities which you wish to offer to the tool provider. More than one capability can be selected.';
$string['click_to_continue'] = '<a href="{$a->link}" target="_top">Click to continue</a>';
$string['comment'] = 'Comment';
-$string['configpassword'] = 'Default Remote Tool Password';
+$string['configpassword'] = 'Default remote tool password';
$string['configpreferheight'] = 'Default preferred height';
$string['configpreferwidget'] = 'Set widget as default launch';
$string['configpreferwidth'] = 'Default preferred width';
-$string['configresourceurl'] = 'Default Resource URL';
-$string['configtoolurl'] = 'Default Remote Tool URL';
-$string['configtypes'] = 'Enable LTI Applications';
+$string['configresourceurl'] = 'Default resource URL';
+$string['configtoolurl'] = 'Default remote tool URL';
+$string['configtypes'] = 'Enable LTI applications';
$string['configured'] = 'Configured';
$string['course_tool_types'] = 'Course tool types';
-$string['courseid'] = 'Course id number';
+$string['courseid'] = 'Course ID number';
$string['coursemisconf'] = 'Course is misconfigured';
-$string['createdon'] = 'Created On';
+$string['createdon'] = 'Created on';
$string['curllibrarymissing'] = 'PHP Curl library must be installed to use LTI';
$string['custom'] = 'Custom parameters';
$string['custom_config'] = 'Using custom tool configuration.';
It is safe to leave this field unchanged unless directed by the tool provider.';
$string['custominstr'] = 'Custom parameters';
-$string['debuglaunch'] = 'Debug Option';
+$string['debuglaunch'] = 'Debug option';
$string['debuglaunchoff'] = 'Normal launch';
$string['debuglaunchon'] = 'Debug launch';
$string['default'] = 'Default';
-$string['default_launch_container'] = 'Default Launch Container';
+$string['default_launch_container'] = 'Default launch container';
$string['default_launch_container_help'] = 'The launch container affects the display of the tool when launched from the course. Some launch containers provide more screen
real estate to the tool, and others provide a more integrated feel with the Moodle environment.
* **New window** - The tool opens in a new window, occupying all the available space.
Depending on the browser, it will open in a new tab or a popup window.
It is possible that browsers will prevent the new window from opening.';
-$string['delegate'] = 'Delegate to Teacher';
+$string['delegate'] = 'Delegate to teacher';
$string['delete'] = 'Delete';
$string['delete_confirmation'] = 'Are you sure you want to delete this external tool configuration?';
$string['deletetype'] = 'Delete external tool configuration';
$string['enableemailnotification_help'] = 'If enabled, students will receive email notification when their tool submissions are graded.';
$string['errormisconfig'] = 'Misconfigured tool. Please ask your Moodle administrator to fix the configuration of the tool.';
$string['existing_window'] = 'Existing window';
-$string['extensions'] = 'LTI Extension Services';
+$string['extensions'] = 'LTI extension services';
$string['external_tool_type'] = 'External tool type';
$string['external_tool_type_help'] = 'The main purpose of a tool configuration is to set up a secure communication channel between Moodle and the tool provider.
It also provides an opportunity for configuration defaults and setting up additional services provided by the tool.
* **Add** - Create a course level tool configuration. All External Tool instances in this course may use the tool configuration.
* **Edit** - Select a course level tool type from the dropdown, then click this icon. The details of the tool configuration may be edited.
* **Delete** - Remove the selected course level tool type.';
-$string['external_tool_types'] = 'External Tool Types';
+$string['external_tool_types'] = 'External tool types';
$string['failedtoconnect'] = 'Moodle was unable to communicate with the "{$a}" system';
$string['filter_basiclti_configlink'] = 'Configure your preferred sites and their passwords';
$string['filter_basiclti_password'] = 'Password is mandatory';
$string['filterconfig'] = 'LTI administration';
$string['filtername'] = 'LTI';
$string['fixexistingconf'] = 'Use an existing configuration for the misconfigured instance';
-$string['fixnew'] = 'New Configuration';
+$string['fixnew'] = 'New configuration';
$string['fixnewconf'] = 'Define a new configuration for the misconfigured instance';
-$string['fixold'] = 'Use Existing';
+$string['fixold'] = 'Use existing';
$string['forced_help'] = 'This setting has been forced in a course or site level tool configuration. You may not change it from this interface.';
$string['force_ssl'] = 'Force SSL';
$string['force_ssl_help'] = 'Selecting this option forces all launches to this tool provider to use SSL.
If using this option, confirm that this Moodle site and the tool provider support SSL.';
$string['generaltool'] = 'General tool';
$string['global_tool_types'] = 'Global tool types';
-$string['grading'] = 'Grade Routing';
+$string['grading'] = 'Grade routing';
$string['icon_url'] = 'Icon URL';
$string['icon_url_help'] = 'The icon URL allows the icon that shows up in the course listing for this activity to be modified. Instead of using the default
LTI icon, an icon which conveys the type of activity may be specified.';
If you have selected a specific tool type, you may not need to enter a Launch URL. If the tool link is used to just launch
into the tool provider\'s system, and not go to a specific resource, this will likely be the case.';
-$string['launchinpopup'] = 'Launch Container';
+$string['launchinpopup'] = 'Launch container';
$string['launchinpopup_help'] = 'The launch container affects the display of the tool when launched from the course. Some launch containers provide more screen
real estate to the tool, and others provide a more integrated feel with the Moodle environment.
* **New window** - The tool opens in a new window, occupying all the available space.
Depending on the browser, it will open in a new tab or a popup window.
It is possible that browsers will prevent the new window from opening.';
-$string['launchoptions'] = 'Launch Options';
+$string['launchoptions'] = 'Launch options';
$string['lti'] = 'LTI';
$string['lti:addinstance'] = 'Add new external tool activities';
$string['lti:addcoursetool'] = 'Add course-specific tool configurations';
$string['lti:requesttooladd'] = 'Request a tool is configured site-wide';
$string['lti:view'] = 'Launch external tool activities';
$string['ltisettings'] = 'LTI settings';
-$string['lti_administration'] = 'LTI Administration';
+$string['lti_administration'] = 'LTI administration';
$string['lti_errormsg'] = 'The tool returned the following error message: "{$a}"';
$string['lti_launch_error'] = 'An error occurred when launching the external tool:';
$string['lti_launch_error_tool_request'] = '<p>
Teachers may still use tools from these providers if they have a consumer key and shared secret, or if none is required.
* **Rejected** - These tools providers are flagged as ones which an administrator has no intention of making available to the entire
Moodle instance. Teachers may still use tools from these providers if they have a consumer key and shared secret, or if none is required.';
-$string['manage_tools'] = 'Manage External Tool Types';
-$string['manage_tool_proxies'] = 'Manage External Tool Registrations';
+$string['manage_tools'] = 'Manage external tool types';
+$string['manage_tool_proxies'] = 'Manage external tool registrations';
$string['miscellaneous'] = 'Miscellaneous';
$string['misconfiguredtools'] = 'Misconfigured tool instances were detected';
$string['missingparameterserror'] = 'The page is misconfigured: "{$a}"';
$string['module_class_type'] = 'Moodle module type';
-$string['modulename'] = 'External Tool';
+$string['modulename'] = 'External tool';
$string['modulename_help'] = 'The external tool activity module enables students to interact with learning resources and activities on other web sites. For example, an external tool could provide access to a new activity type or learning materials from a publisher.
To create an external tool activity, a tool provider which supports LTI (Learning Tools Interoperability) is required. A teacher can create an external tool activity or make use of a tool configured by the site administrator.
* External tools support reading, updating, and deleting grades associated with the activity instance
* External tool configurations create a trust relationship between your site and the tool provider, allowing secure communication between them';
$string['modulename_link'] = 'mod/lti/view';
-$string['modulenameplural'] = 'External Tools';
+$string['modulenameplural'] = 'External tools';
$string['modulenamepluralformatted'] = 'LTI Instances';
$string['name'] = 'Name';
$string['never'] = 'Never';
$string['new_window'] = 'New window';
-$string['no_lti_configured'] = 'There are no active External Tools configured.';
-$string['no_lti_pending'] = 'There are no pending External Tools.';
-$string['no_lti_rejected'] = 'There are no rejected External Tools.';
-$string['no_tp_accepted'] = 'There are no accepted External Tool Registrations.';
-$string['no_tp_cancelled'] = 'There are no cancelled External Tool Registrations .';
-$string['no_tp_configured'] = 'There are no unregistered External Tool Registrations configured.';
-$string['no_tp_pending'] = 'There are no pending External Tool Registrations .';
-$string['no_tp_rejected'] = 'There are no rejected External Tool Registrations .';
+$string['no_lti_configured'] = 'There are no active external tools configured.';
+$string['no_lti_pending'] = 'There are no pending external tools.';
+$string['no_lti_rejected'] = 'There are no rejected external tools.';
+$string['no_tp_accepted'] = 'There are no accepted external tool registrations.';
+$string['no_tp_cancelled'] = 'There are no cancelled external tool registrations.';
+$string['no_tp_configured'] = 'There are no unregistered external tool registrations configured.';
+$string['no_tp_pending'] = 'There are no pending external tool registrations.';
+$string['no_tp_rejected'] = 'There are no rejected external tool registrations.';
$string['noattempts'] = 'No attempts have been made on this tool instance';
-$string['noltis'] = 'There are no lti instances';
+$string['noltis'] = 'There are no external tool instances';
$string['noprofileservice'] = 'Profile service not found';
$string['noservers'] = 'No servers found';
-$string['notypes'] = 'There are currently no LTI tools setup in Moodle. Click the Install link above to add some.';
+$string['notypes'] = 'There are currently no LTI tools set up in Moodle. Click the Install link above to add some.';
$string['noviewusers'] = 'No users were found with permissions to use this tool';
$string['optionalsettings'] = 'Optional settings';
$string['organization'] = 'Organization details';
-$string['organizationdescr'] = 'Organization Description';
+$string['organizationdescr'] = 'Organization description';
$string['organizationid'] = 'Organization ID';
$string['organizationid_help'] = 'A unique identifier for this Moodle instance. Typically, the DNS name of the organization is used.
$string['pagesize'] = 'Submissions shown per page';
$string['parameter'] = 'Tool parameters';
$string['parameter_help'] = 'Tool parameters are settings requested to be passed by the tool provider in the accepted tool proxy.';
-$string['password'] = 'Shared Secret';
-$string['password_admin'] = 'Shared Secret';
+$string['password'] = 'Shared secret';
+$string['password_admin'] = 'Shared secret';
$string['password_admin_help'] = 'The shared secret can be thought of as a password used to authenticate access to the tool. It should be provided
along with the consumer key from the tool provider.
$string['pending'] = 'Pending';
$string['pluginadministration'] = 'LTI administration';
$string['pluginname'] = 'LTI';
-$string['preferheight'] = 'Preferred Height';
-$string['preferwidget'] = 'Prefer Widget Launch';
-$string['preferwidth'] = 'Preferred Width';
+$string['preferheight'] = 'Preferred height';
+$string['preferwidget'] = 'Prefer widget launch';
+$string['preferwidth'] = 'Preferred width';
$string['press_to_submit'] = 'Press to launch this activity';
$string['privacy'] = 'Privacy';
$string['quickgrade'] = 'Allow quick grading';
$string['redirect'] = 'You will be redirected in few seconds. If you are not, press the button.';
$string['register'] = 'Register';
$string['register_warning'] = 'The registration page seems to be taking a while to open. If it does not appear, check that you entered the correct URL in the configuration settings.';
-$string['registertype'] = 'Configure a new External Tool Registration';
-$string['registration_options'] = 'Registration Options';
-$string['registrationname'] = 'Tool Provider name';
+$string['registertype'] = 'Configure a new external tool registration';
+$string['registration_options'] = 'Registration options';
+$string['registrationname'] = 'Tool provider name';
$string['registrationname_help'] = 'Enter the name of the tool provider being registered.';
$string['registrationurl'] = 'Registration URL';
$string['registrationurl_help'] = 'The registration URL should be available from the tool provider as the location to which registration requests should be sent.';
$string['reject'] = 'Reject';
$string['rejected'] = 'Rejected';
$string['resource'] = 'Resource';
-$string['resourcekey'] = 'Consumer Key';
-$string['resourcekey_admin'] = 'Consumer Key';
+$string['resourcekey'] = 'Consumer key';
+$string['resourcekey_admin'] = 'Consumer key';
$string['resourcekey_admin_help'] = 'The consumer key can be thought of as a username used to authenticate access to the tool.
It can be used by the tool provider to uniquely identify the Moodle site from which users launch into the tool.
$string['resourceurl'] = 'Resource URL';
$string['return_to_course'] = 'Click <a href="{$a->link}" target="_top">here</a> to return to the course.';
$string['saveallfeedback'] = 'Save all my feedback';
-$string['secure_icon_url'] = 'Secure Icon URL';
+$string['secure_icon_url'] = 'Secure icon URL';
$string['secure_icon_url_help'] = 'Similar to the icon URL, but used if the user accessing Moodle securely through SSL. The main purpose for this field is to prevent
the browser from warning the user if the underlying page was accessed over SSL, but requesting to show an unsecure image.';
-$string['secure_launch_url'] = 'Secure Launch URL';
+$string['secure_launch_url'] = 'Secure launch URL';
$string['secure_launch_url_help'] = 'Similar to Launch URL, but used instead of the launch url if high security is required. Moodle will use the
secure launch URL instead of the launch URL if the Moodle site is accessed through SSL, or if the tool configuration
is set to always launch through SSL.
$string['send'] = 'Send';
$string['services'] = 'Services';
$string['services_help'] = 'Select those services which you wish to offer to the tool provider. More than one service can be selected.';
-$string['setupoptions'] = 'Setup Options';
+$string['setupoptions'] = 'Set-up options';
$string['share_email'] = 'Share launcher\'s email with the tool';
$string['share_email_admin'] = 'Share launcher\'s email with tool';
$string['share_email_admin_help'] = 'Specify whether the e-mail address of the user launching the tool will be shared with the tool provider.
$string['subplugintype_ltiservice_plural'] = 'LTI services';
$string['subplugintype_ltisource'] = 'LTI source';
$string['subplugintype_ltisource_plural'] = 'LTI sources';
-$string['toggle_debug_data'] = 'Toggle Debug Data';
+$string['toggle_debug_data'] = 'Toggle debug data';
$string['tool_config_not_found'] = 'Tool configuration not found for this URL.';
-$string['tool_settings'] = 'Tool Settings';
-$string['toolproxy'] = 'External Tool Registrations';
-$string['toolproxy_help'] = 'External tool registrations allow Moodle site administrators to configure external tools from a tool proxy obtained from
-a tool provider supporting LTI 2.0. A registration URL provided by the tool provider is all that is required to initiate the process. The capabilities
-and services offered to the tool provider are selected when configuring a new registration.
+$string['tool_settings'] = 'Tool settings';
+$string['toolproxy'] = 'External tool registrations';
+$string['toolproxy_help'] = 'External tool registrations allow Moodle site administrators to configure external tools from a tool proxy obtained from a tool provider supporting LTI 2.0. A registration URL provided by the tool provider is all that is required to initiate the process. The capabilities and services offered to the tool provider are selected when configuring a new registration.
Tool registrations listed on this page are separated into four categories:
* **Configured** - These tool registrations have been set up but the registration process has not yet been started.
-* **Pending** - The regisitration process for these tool registrations has been started but has not completed. Open and save the settings to move it
- back to the \'Configured\' category.
+* **Pending** - The registration process for these tool registrations has been started but has not completed. Open and save the settings to move it
+back to the \'Configured\' category.
* **Accepted** - These tool registrations have been approved; the resources specified in the tool proxy will appear on the external tool types page
- with an initial status of \'Pending\'.
-* **Rejected** - These tool registrations are ones which were rejected during the registration process. Open and save the settings to move it
- back to the \'Configured\' category so the registration process cna be restarted.';
-$string['toolproxyregistration'] = 'External Tool Registration';
-$string['toolregistration'] = 'External Tool Registration';
-$string['toolsetup'] = 'External Tool Configuration';
-$string['toolurl'] = 'Tool Base URL';
+with an initial status of \'Pending\'.
+* **Rejected** - These tool registrations are ones which were rejected during the registration process. Open and save the settings to move it
+back to the \'Configured\' category so the registration process can be restarted.';
+$string['toolproxyregistration'] = 'External tool registration';
+$string['toolregistration'] = 'External tool registration';
+$string['toolsetup'] = 'External tool configuration';
+$string['toolurl'] = 'Tool base URL';
$string['toolurl_help'] = 'The tool base URL is used to match tool launch URLs to the correct tool configuration. Prefixing the URL with http(s) is optional.
Additionally, the base URL is used as the launch URL if a launch URL is not specified in the external tool instance.
* quiz.tool.com/take.php?id=10
If two different tool configurations are for the same domain, the most specific match will be used.';
-$string['typename'] = 'Tool Name';
+$string['typename'] = 'Tool name';
$string['typename_help'] = 'The tool name is used to identify the tool provider within Moodle. The name entered will be visible
to teachers when adding external tools within courses.';
$string['types'] = 'Types';
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;
$lastchild = null;
$lastdepth = null;
$lastsort = 0;
+ $children = array();
foreach ($lines as $line) {
$line = trim($line);
$bits = explode('|', $line, 3);
$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;