theme MDL-23363 config setting showblocksonmodpages (theme settings) & usages now removed

This commit is contained in:
Aparup Banerjee
2010-08-06 06:20:28 +00:00
parent 73eba4be68
commit 59e2121e16
7 changed files with 6 additions and 12 deletions
-1
View File
@@ -17,7 +17,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configcheckbox('allowthemechangeonurl', get_string('allowthemechangeonurl', 'admin'), get_string('configallowthemechangeonurl', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('allowblockstodock', get_string('allowblockstodock', 'admin'), get_string('configallowblockstodock', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
$temp->add(new admin_setting_configtextarea('custommenuitems', get_string('custommenuitems', 'admin'), get_string('configcustommenuitems', 'admin'), '', PARAM_TEXT, '50', '10'));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
+1 -2
View File
@@ -991,11 +991,11 @@
$pages = array();
$pages[] = page_create_object(PAGE_COURSE_VIEW, $preferences->backup_course);
if (!empty($CFG->showblocksonmodpages)) {
// get course structure
$course = $DB->get_record('course', array('id'=>$preferences->backup_course));
$modinfo =& get_fast_modinfo($course);
// backup blocks on mod pages.
foreach($preferences->mods as $module) {
if (!$module->backup) {
continue;
@@ -1018,7 +1018,6 @@
}
}
}
}
//Blocks open tag
fwrite ($bf,start_tag('BLOCKS',2,true));
+2 -4
View File
@@ -1238,7 +1238,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
// This one's easy...
$instance->pageid = $restore->course_id;
} else if (!empty($CFG->showblocksonmodpages)) {
} else {
// restore activity blocks
$parts = explode('-', $instance->pagetype);
if($parts[0] == 'mod') {
if(!$restore->mods[$parts[1]]->restore) {
@@ -1257,9 +1258,6 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
continue;
}
} else {
// do not restore activity blocks if disabled
continue;
}
if(!isset($pageinstances[$instance->pagetype])) {
-2
View File
@@ -316,7 +316,6 @@ $string['configsessioncookie'] = 'This setting customises the name of the cookie
$string['configsessioncookiedomain'] = 'This allows you to change the domain that the Moodle cookies are available from. This is useful for Moodle customisations (e.g. authentication or enrolment plugins) that need to share Moodle session information with a web application on another subdomain. <strong>WARNING: it is strongly recommended to leave this setting at the default (empty) - an incorrect value will prevent all logins to the site.</strong>';
$string['configsessioncookiepath'] = 'If you need to change where browsers send the Moodle cookies, you can change this setting to specify a subdirectory of your web site. Otherwise the default \'/\' should be fine.';
$string['configsessiontimeout'] = 'If people logged in to this site are idle for a long time (without loading pages) then they are automatically logged out (their session is ended). This variable specifies how long this time should be.';
$string['configshowblocksonmodpages'] = 'Some activity modules support blocks on their pages. If you turn this on, then teachers will be able to add side blocks on those pages, otherwise the interface does not show this feature.';
$string['configshowcommentscount'] = 'Show comments count, it will cost one more query when display comments link';
$string['configshowsiteparticipantslist'] = 'All of these site students and site teachers will be listed on the site participants list. Who shall be allowed to see this site participants list?';
$string['configsitedefaultlicense'] = 'Default site license';
@@ -871,7 +870,6 @@ $string['sessiontimeout'] = 'Timeout';
$string['settingfileuploads'] = 'File uploading is required for normal operation, please enable it in PHP configuration.';
$string['settingmemorylimit'] = 'Insufficient memory detected, please set higher memory limit in PHP settings.';
$string['settingsafemode'] = 'Moodle is not fully compatible with safe mode, please ask server administrator to turn it off. Running Moodle under safe mode is not supported, please expect various problems if you do so.';
$string['showblocksonmodpages'] = 'Show blocks on module pages';
$string['showcommentscount'] = 'Show comments count';
$string['showdetails'] = 'Show details';
$string['simpletest'] = 'Unit tests';
+1 -1
View File
@@ -1740,7 +1740,7 @@ class page_generic_activity extends page_base {
}
$buttons = '<table><tr><td>'.$OUTPUT->update_module_button($this->modulerecord->id, $this->activityname).'</td>';
if ($this->user_allowed_editing() && !empty($CFG->showblocksonmodpages)) {
if ($this->user_allowed_editing()) {
$buttons .= '<td><form method="get" action="view.php"><div>'.
'<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
'<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
+1 -1
View File
@@ -281,7 +281,7 @@
// The code will be much nicer than this eventually.
$title = $course->shortname.': ' . format_string($data->name);
if ($PAGE->user_allowed_editing() && !empty($CFG->showblocksonmodpages)) {
if ($PAGE->user_allowed_editing()) {
$buttons = '<table><tr><td><form method="get" action="view.php"><div>'.
'<input type="hidden" name="id" value="'.$cm->id.'" />'.
'<input type="hidden" name="edit" value="'.($PAGE->user_is_editing()?'off':'on').'" />'.
+1 -1
View File
@@ -72,7 +72,7 @@
// The code will be much nicer than this eventually.
$title = $course->shortname . ': ' . format_string($quiz->name);
if ($PAGE->user_allowed_editing() && !empty($CFG->showblocksonmodpages)) {
if ($PAGE->user_allowed_editing()) {
$buttons = '<table><tr><td><form method="get" action="view.php"><div>'.
'<input type="hidden" name="id" value="'.$cm->id.'" />'.
'<input type="hidden" name="edit" value="'.($PAGE->user_is_editing()?'off':'on').'" />'.