Skip to content

Commit

Permalink
theme MDL-23363 config setting showblocksonmodpages (theme settings) …
Browse files Browse the repository at this point in the history
…& usages now removed
  • Loading branch information
nebgor committed Aug 6, 2010
1 parent 73eba4b commit 59e2121
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 12 deletions.
1 change: 0 additions & 1 deletion admin/settings/appearance.php
Expand Up @@ -17,7 +17,6 @@
$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'));
Expand Down
3 changes: 1 addition & 2 deletions backup/backuplib.php
Expand Up @@ -991,11 +991,11 @@ function backup_course_blocks ($bf,$preferences) {
$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;
Expand All @@ -1018,7 +1018,6 @@ function backup_course_blocks ($bf,$preferences) {
}
}
}
}

//Blocks open tag
fwrite ($bf,start_tag('BLOCKS',2,true));
Expand Down
6 changes: 2 additions & 4 deletions backup/restorelib.php
Expand Up @@ -1238,7 +1238,8 @@ function restore_create_block_instances($restore,$xml_file) {
// 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) {
Expand All @@ -1257,9 +1258,6 @@ function restore_create_block_instances($restore,$xml_file) {
continue;
}

} else {
// do not restore activity blocks if disabled
continue;
}

if(!isset($pageinstances[$instance->pagetype])) {
Expand Down
2 changes: 0 additions & 2 deletions lang/en/admin.php
Expand Up @@ -316,7 +316,6 @@
$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';
Expand Down Expand Up @@ -871,7 +870,6 @@
$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';
Expand Down
2 changes: 1 addition & 1 deletion lib/pagelib.php
Expand Up @@ -1740,7 +1740,7 @@ function print_header($title, $morenavlinks = NULL, $bodytags = '', $meta = '')
}

$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').'" />'.
Expand Down
2 changes: 1 addition & 1 deletion mod/data/view.php
Expand Up @@ -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').'" />'.
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/view.php
Expand Up @@ -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').'" />'.
Expand Down

0 comments on commit 59e2121

Please sign in to comment.