$dbman = $DB->get_manager();
if($oldversion < 2011111600){
- //Rename showdescription to showdescriptionlaunch to not conflict with setting from core Moodle
- //Rename showtitle as well to be consistent
+ // Rename showdescription to showdescriptionlaunch to not conflict with setting from core Moodle
+ // Rename showtitle as well to be consistent
$table = new xmldb_table('lti');
$field = new xmldb_field('showtitle', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'debuglaunch');
-
+
$dbman->rename_field($table, $field, 'showtitlelaunch');
-
+
$field = new xmldb_field('showdescription', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'showtitlelaunch');
$dbman->rename_field($table, $field, 'showdescriptionlaunch');
-
+
upgrade_mod_savepoint(true, 2011111600, 'lti');
}
-
+
return true;
}
} else if (!empty($lti->icon)) {
$info->iconurl = new moodle_url($lti->icon);
}
-
+
if ($coursemodule->showdescription) {
// Convert intro to html. Do not filter cached version, filters run at display time.
$info->content = format_module_intro('lti', $lti, $coursemodule->id, false);
}
$info->name = $lti->name;
-
+
return $info;
}
// Adding the optional "intro" and "introformat" pair of fields
$this->add_intro_editor(false, get_string('basicltiintro', 'lti'));
$mform->setAdvanced('introeditor');
-
- //Display the label to the right of the checkbox so it looks better & matches rest of the form
+
+ // Display the label to the right of the checkbox so it looks better & matches rest of the form
$coursedesc = $mform->getElement('showdescription');
if(!empty($coursedesc)){
$coursedesc->setText(' ' . $coursedesc->getLabel());
$coursedesc->setLabel(' ');
}
-
+
$mform->setAdvanced('showdescription');
$mform->addElement('checkbox', 'showtitlelaunch', ' ', ' ' . get_string('display_name', 'lti'));