Permalink
Browse files

MDL-40095 SCORM: Trivial comments tidy up

  • Loading branch information...
1 parent 0ec8a32 commit da297e73901c09a2f1459fe1761525d6fe7e17b2 @scara scara committed Jun 9, 2013
Showing with 34 additions and 34 deletions.
  1. +34 −34 mod/scorm/mod_form.php
View
@@ -35,7 +35,7 @@ function definition() {
//-------------------------------------------------------------------------------
$mform->addElement('header', 'general', get_string('general', 'form'));
- // Name
+ // Name.
$mform->addElement('text', 'name', get_string('name'));
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
@@ -45,10 +45,10 @@ function definition() {
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
- // Summary
+ // Summary.
$this->add_intro_editor(true);
- // Scorm types
+ // Scorm types.
$scormtypes = array(SCORM_TYPE_LOCAL => get_string('typelocal', 'scorm'));
if ($cfg_scorm->allowtypeexternal) {
@@ -67,7 +67,7 @@ function definition() {
$scormtypes[SCORM_TYPE_AICCURL] = get_string('typeaiccurl', 'scorm');
}
- // Reference
+ // Reference.
if (count($scormtypes) > 1) {
$mform->addElement('select', 'scormtype', get_string('scormtype', 'scorm'), $scormtypes);
$mform->addHelpButton('scormtype', 'scormtype', 'scorm');
@@ -79,42 +79,42 @@ function definition() {
$mform->addElement('hidden', 'scormtype', SCORM_TYPE_LOCAL);
}
- // New local package upload
+ // New local package upload.
$maxbytes = get_max_upload_file_size($CFG->maxbytes, $COURSE->maxbytes);
$mform->setMaxFileSize($maxbytes);
$mform->addElement('filepicker', 'packagefile', get_string('package', 'scorm'));
$mform->addHelpButton('packagefile', 'package', 'scorm');
$mform->disabledIf('packagefile', 'scormtype', 'noteq', SCORM_TYPE_LOCAL);
//-------------------------------------------------------------------------------
- // Time restrictions
+ // Time restrictions.
$mform->addElement('header', 'timerestricthdr', get_string('timerestrict', 'scorm'));
$mform->addElement('date_time_selector', 'timeopen', get_string("scormopen", "scorm"), array('optional' => true));
$mform->addElement('date_time_selector', 'timeclose', get_string("scormclose", "scorm"), array('optional' => true));
//-------------------------------------------------------------------------------
- // display Settings
+ // Display Settings.
$mform->addElement('header', 'displaysettings', get_string('displaysettings', 'scorm'));
- // Framed / Popup Window
+ // Framed / Popup Window.
$mform->addElement('select', 'popup', get_string('display', 'scorm'), scorm_get_popup_display_array());
$mform->setDefault('popup', $cfg_scorm->popup);
$mform->setAdvanced('popup', $cfg_scorm->popup_adv);
- // Width
+ // Width.
$mform->addElement('text', 'width', get_string('width', 'scorm'), 'maxlength="5" size="5"');
$mform->setDefault('width', $cfg_scorm->framewidth);
$mform->setType('width', PARAM_INT);
$mform->setAdvanced('width', $cfg_scorm->framewidth_adv);
$mform->disabledIf('width', 'popup', 'eq', 0);
- // Height
+ // Height.
$mform->addElement('text', 'height', get_string('height', 'scorm'), 'maxlength="5" size="5"');
$mform->setDefault('height', $cfg_scorm->frameheight);
$mform->setType('height', PARAM_INT);
$mform->setAdvanced('height', $cfg_scorm->frameheight_adv);
$mform->disabledIf('height', 'popup', 'eq', 0);
- // Window Options
+ // Window Options.
$winoptgrp = array();
foreach (scorm_get_popup_options_array() as $key => $value) {
$winoptgrp[] = &$mform->createElement('checkbox', $key, '', get_string($key, 'scorm'));
@@ -124,7 +124,7 @@ function definition() {
$mform->disabledIf('winoptgrp', 'popup', 'eq', 0);
$mform->setAdvanced('winoptgrp', $cfg_scorm->winoptgrp_adv);
- // Skip view page
+ // Skip view page.
$skipviewoptions = scorm_get_skip_view_array();
if ($COURSE->format == 'scorm') { // Remove option that would cause a constant redirect.
unset($skipviewoptions[SCORM_SKIPVIEW_ALWAYS]);
@@ -137,41 +137,41 @@ function definition() {
$mform->setDefault('skipview', $cfg_scorm->skipview);
$mform->setAdvanced('skipview', $cfg_scorm->skipview_adv);
- // Hide Browse
+ // Hide Browse.
$mform->addElement('selectyesno', 'hidebrowse', get_string('hidebrowse', 'scorm'));
$mform->addHelpButton('hidebrowse', 'hidebrowse', 'scorm');
$mform->setDefault('hidebrowse', $cfg_scorm->hidebrowse);
$mform->setAdvanced('hidebrowse', $cfg_scorm->hidebrowse_adv);
- // Display course structure
+ // Display course structure.
$mform->addElement('selectyesno', 'displaycoursestructure', get_string('displaycoursestructure', 'scorm'));
$mform->addHelpButton('displaycoursestructure', 'displaycoursestructure', 'scorm');
$mform->setDefault('displaycoursestructure', $cfg_scorm->displaycoursestructure);
$mform->setAdvanced('displaycoursestructure', $cfg_scorm->displaycoursestructure_adv);
- // Toc display
+ // Toc display.
$mform->addElement('select', 'hidetoc', get_string('hidetoc', 'scorm'), scorm_get_hidetoc_array());
$mform->addHelpButton('hidetoc', 'hidetoc', 'scorm');
$mform->setDefault('hidetoc', $cfg_scorm->hidetoc);
$mform->setAdvanced('hidetoc', $cfg_scorm->hidetoc_adv);
- // Hide Navigation panel
+ // Hide Navigation panel.
$mform->addElement('selectyesno', 'hidenav', get_string('hidenav', 'scorm'));
$mform->setDefault('hidenav', $cfg_scorm->hidenav);
$mform->setAdvanced('hidenav', $cfg_scorm->hidenav_adv);
$mform->disabledIf('hidenav', 'hidetoc', 'noteq', 0);
//-------------------------------------------------------------------------------
- // grade Settings
+ // Grade Settings.
$mform->addElement('header', 'gradesettings', get_string('gradesettings', 'scorm'));
- // Grade Method
+ // Grade Method.
$mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), scorm_get_grade_method_array());
$mform->addHelpButton('grademethod', 'grademethod', 'scorm');
$mform->setDefault('grademethod', $cfg_scorm->grademethod);
$mform->setAdvanced('grademethod', $cfg_scorm->grademethod_adv);
- // Maximum Grade
+ // Maximum Grade.
for ($i=0; $i<=100; $i++) {
$grades[$i] = "$i";
}
@@ -182,20 +182,20 @@ function definition() {
$mform->addElement('header', 'othersettings', get_string('othersettings', 'scorm'));
- // Max Attempts
+ // Max Attempts.
$mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
$mform->addHelpButton('maxattempt', 'maximumattempts', 'scorm');
$mform->setDefault('maxattempt', $cfg_scorm->maxattempt);
$mform->setAdvanced('maxattempt', $cfg_scorm->maxattempt_adv);
- // What Grade
+ // What Grade.
$mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), scorm_get_what_grade_array());
$mform->disabledIf('whatgrade', 'maxattempt', 'eq', 1);
$mform->addHelpButton('whatgrade', 'whatgrade', 'scorm');
$mform->setDefault('whatgrade', $cfg_scorm->whatgrade);
$mform->setAdvanced('whatgrade', $cfg_scorm->whatgrade_adv);
- // Display attempt status
+ // Display attempt status.
$mform->addElement('selectyesno', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm'));
$mform->addHelpButton('displayattemptstatus', 'displayattemptstatus', 'scorm');
$mform->setDefault('displayattemptstatus', $cfg_scorm->displayattemptstatus);
@@ -207,19 +207,19 @@ function definition() {
$mform->setDefault('forcecompleted', $cfg_scorm->forcecompleted);
$mform->setAdvanced('forcecompleted', $cfg_scorm->forcecompleted_adv);
- // Force new attempt
+ // Force new attempt.
$mform->addElement('selectyesno', 'forcenewattempt', get_string('forcenewattempt', 'scorm'));
$mform->addHelpButton('forcenewattempt', 'forcenewattempt', 'scorm');
$mform->setDefault('forcenewattempt', $cfg_scorm->forcenewattempt);
$mform->setAdvanced('forcenewattempt', $cfg_scorm->forcenewattempt_adv);
- // Last attempt lock - lock the enter button after the last available attempt has been made
+ // Last attempt lock - lock the enter button after the last available attempt has been made.
$mform->addElement('selectyesno', 'lastattemptlock', get_string('lastattemptlock', 'scorm'));
$mform->addHelpButton('lastattemptlock', 'lastattemptlock', 'scorm');
$mform->setDefault('lastattemptlock', $cfg_scorm->lastattemptlock);
$mform->setAdvanced('lastattemptlock', $cfg_scorm->lastattemptlock_adv);
- // Activation period
+ // Activation period.
/* $mform->addElement('static', '', '' ,'<hr />');
$mform->addElement('static', 'activation', get_string('activation','scorm'));
$datestartgrp = array();
@@ -239,14 +239,14 @@ function definition() {
$mform->disabledIf('dateendgrp', 'enddisabled', 'checked');
*/
- // Autocontinue
+ // Autocontinue.
$mform->addElement('selectyesno', 'auto', get_string('autocontinue', 'scorm'));
$mform->addHelpButton('auto', 'autocontinue', 'scorm');
$mform->setDefault('auto', $cfg_scorm->auto);
$mform->setAdvanced('auto', $cfg_scorm->auto_adv);
if (count($scormtypes) > 1) {
- // Update packages timing
+ // Update packages timing.
$mform->addElement('select', 'updatefreq', get_string('updatefreq', 'scorm'), scorm_get_updatefreq_array());
$mform->setDefault('updatefreq', $cfg_scorm->updatefreq);
$mform->setAdvanced('updatefreq', $cfg_scorm->updatefreq_adv);
@@ -256,7 +256,7 @@ function definition() {
$mform->addElement('hidden', 'updatefreq', 0);
}
//-------------------------------------------------------------------------------
- // Hidden Settings
+ // Hidden Settings.
$mform->addElement('hidden', 'datadir', null);
$mform->setType('datadir', PARAM_RAW);
$mform->addElement('hidden', 'pkgtype', null);
@@ -271,7 +271,7 @@ function definition() {
//-------------------------------------------------------------------------------
$this->standard_coursemodule_elements();
//-------------------------------------------------------------------------------
- // buttons
+ // Buttons.
$this->add_action_buttons();
}
@@ -324,7 +324,7 @@ function data_preprocessing(&$default_values) {
$default_values['timeclose'] = 0;
}
- // Set some completion default data
+ // Set some completion default data.
if (!empty($default_values['completionstatusrequired']) && !is_array($default_values['completionstatusrequired'])) {
// Unpack values
$cvalues = array();
@@ -351,7 +351,7 @@ function validation($data, $files) {
if ($type === SCORM_TYPE_LOCAL) {
if (!empty($data['update'])) {
- //ok, not required
+ // OK, not required.
} else if (empty($data['packagefile'])) {
$errors['packagefile'] = get_string('required');
@@ -419,7 +419,7 @@ function validation($data, $files) {
return $errors;
}
- //need to translate the "options" and "reference" field.
+ // Need to translate the "options" and "reference" field.
function set_data($default_values) {
$default_values = (array)$default_values;
@@ -452,7 +452,7 @@ function add_completion_rules() {
$mform =& $this->_form;
$items = array();
- // Require score
+ // Require score.
$group = array();
$group[] =& $mform->createElement('text', 'completionscorerequired', '', array('size' => 5));
$group[] =& $mform->createElement('checkbox', 'completionscoredisabled', null, get_string('disable'));
@@ -465,7 +465,7 @@ function add_completion_rules() {
$items[] = 'completionscoregroup';
- // Require status
+ // Require status.
$first = true;
$firstkey = null;
foreach (scorm_status_options(true) as $key => $value) {

0 comments on commit da297e7

Please sign in to comment.