From ef04568ad36ecb5b5889f80eafe633ff700a64b6 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 1 Oct 2006 14:46:56 +0000 Subject: [PATCH] removing obsoleted calendar.* files from admin area --- admin/calendar.html | 60 ---------------------------------- admin/calendar.php | 80 --------------------------------------------- 2 files changed, 140 deletions(-) delete mode 100644 admin/calendar.html delete mode 100644 admin/calendar.php diff --git a/admin/calendar.html b/admin/calendar.html deleted file mode 100644 index bba64f8870..0000000000 --- a/admin/calendar.html +++ /dev/null @@ -1,60 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
adminseesall: -
-

- -

-
startwday: -
-

calendar_startwday) ? 0 : $CFG->calendar_startwday, ''); ?>

-
weekenddays: -
-

- /> - /> - /> - /> - /> -
- /> - /> -

-
upcoming_lookahead: -
-

-
upcoming_maxevents: -
-

-
- -
-
diff --git a/admin/calendar.php b/admin/calendar.php deleted file mode 100644 index 0a018c67bb..0000000000 --- a/admin/calendar.php +++ /dev/null @@ -1,80 +0,0 @@ -libdir.'/adminlib.php'); - $adminroot = admin_get_root(); - admin_externalpage_setup('calendar', $adminroot); - - -/// Print headings - - admin_externalpage_print_header($adminroot); - - $strcalendarsettings = get_string('calendarsettings', 'admin'); - print_heading($strcalendarsettings); - -/// If data submitted, process and store - - if (($form = data_submitted()) && confirm_sesskey()) { - if(isset($form->adminseesallcourses)) { - set_config('calendar_adminseesall', intval($form->adminseesallcourses) != 0); - unset($SESSION->cal_courses_shown); - } - if(isset($form->startwday)) { - $startwday = intval($form->startwday); - if($startwday >= 0 && $startwday <= 6) { - set_config('calendar_startwday', $startwday); - } - } - if(isset($form->weekend)) { - if(is_array($form->weekend)) { - // Creating a packed bitfield; look at /calendar/lib.php if you can't figure it out - $bitfield = 0; - foreach($form->weekend as $day) { - $bitfield |= (1 << (intval($day) % 7)); - } - if($bitfield > 0) { - set_config('calendar_weekend', $bitfield); - } - } - } - if(isset($form->lookahead)) { - $lookahead = intval($form->lookahead); - if($lookahead > 0) { - set_config('calendar_lookahead', $lookahead); - } - } - if(isset($form->maxevents)) { - $maxevents = intval($form->maxevents); - if($maxevents > 0) { - set_config('calendar_maxevents', $maxevents); - } - } - redirect('calendar.php', get_string('changessaved')); - } - - // Include the calendar library AFTER modifying the data, so we read the latest values - require_once($CFG->dirroot.'/calendar/lib.php'); - - - $weekdays = array( - 0 => get_string('sunday', 'calendar'), - 1 => get_string('monday', 'calendar'), - 2 => get_string('tuesday', 'calendar'), - 3 => get_string('wednesday', 'calendar'), - 4 => get_string('thursday', 'calendar'), - 5 => get_string('friday', 'calendar'), - 6 => get_string('saturday', 'calendar') - ); - - // Main display starts here - - print_simple_box_start("center", "80%"); - include('./calendar.html'); - print_simple_box_end(); - - admin_externalpage_print_footer($adminroot); - -?> -- 2.39.5