Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master_MDL-33938' of git://github.com/danmarsden/moodle…

… into MOODLE_23_STABLE

Conflicts:
	mod/scorm/db/upgrade.php
  • Loading branch information...
commit 741543e9a7fb6936f769c2d967b16c9a250dbe73 2 parents a1a00ae + e0d90c5
@danpoltawski danpoltawski authored
View
11 mod/scorm/db/upgrade.php
@@ -63,6 +63,17 @@ function xmldb_scorm_upgrade($oldversion) {
// Moodle v2.3.0 release upgrade line
// Put any upgrade step following this
+ //rename config var from maxattempts to maxattempt
+ if ($oldversion < 2012061701) {
+ $maxattempts = get_config('scorm', 'maxattempts');
+ $maxattempts_adv = get_config('scorm', 'maxattempts_adv');
+ set_config('maxattempt', $maxattempts, 'scorm');
+ set_config('maxattempt_adv', $maxattempts_adv, 'scorm');
+
+ unset_config('maxattempts', 'scorm'); //remove old setting.
+ unset_config('maxattempts_adv', 'scorm'); //remove old setting.
+ upgrade_mod_savepoint(true, 2012061701, 'scorm');
+ }
return true;
}
View
4 mod/scorm/mod_form.php
@@ -177,8 +177,8 @@ function definition() {
// Max Attempts
$mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
$mform->addHelpButton('maxattempt', 'maximumattempts', 'scorm');
- $mform->setDefault('maxattempt', $cfg_scorm->maxattempts);
- $mform->setAdvanced('maxattempt', $cfg_scorm->maxattempts_adv);
+ $mform->setDefault('maxattempt', $cfg_scorm->maxattempt);
+ $mform->setAdvanced('maxattempt', $cfg_scorm->maxattempt_adv);
// What Grade
$mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), scorm_get_what_grade_array());
View
2  mod/scorm/settings.php
@@ -82,7 +82,7 @@
$settings->add(new admin_setting_heading('scorm/othersettings', get_string('defaultothersettings', 'scorm'), ''));
//default attempts settings.
- $settings->add(new admin_setting_configselect_with_advanced('scorm/maxattempts',
+ $settings->add(new admin_setting_configselect_with_advanced('scorm/maxattempt',
get_string('maximumattempts', 'scorm'), '',
array('value' => '0', 'adv' => false), scorm_get_attempts_array()));
View
2  mod/scorm/version.php
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
-$module->version = 2012061700; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2012061701; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2012061700; // Requires this Moodle version
$module->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics)
$module->cron = 300;
Please sign in to comment.
Something went wrong with that request. Please try again.