MDL-20534 lti: B14 - whitespace and comment fixes

This commit is contained in:
Eloy Lafuente (stronk7) 2011-11-18 16:05:22 +01:00
parent 3a2927081c
commit 194f2c60ef
3 changed files with 11 additions and 11 deletions

View File

@ -65,19 +65,19 @@ function xmldb_lti_upgrade($oldversion) {
$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;
}

View File

@ -189,14 +189,14 @@ function lti_get_coursemodule_info($coursemodule) {
} 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;
}

View File

@ -69,14 +69,14 @@ class mod_lti_mod_form extends moodleform_mod {
// 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('&nbsp');
}
$mform->setAdvanced('showdescription');
$mform->addElement('checkbox', 'showtitlelaunch', '&nbsp;', ' ' . get_string('display_name', 'lti'));