|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00004 // // 00005 // NOTICE OF COPYRIGHT // 00006 // // 00007 // Moodle - Calendar extension // 00008 // // 00009 // Copyright (C) 2003-2004 Greek School Network www.sch.gr // 00010 // // 00011 // Designed by: // 00012 // Avgoustos Tsinakos (tsinakos@teikav.edu.gr) // 00013 // Jon Papaioannou (pj@moodle.org) // 00014 // // 00015 // Programming and development: // 00016 // Jon Papaioannou (pj@moodle.org) // 00017 // // 00018 // For bugs, suggestions, etc contact: // 00019 // Jon Papaioannou (pj@moodle.org) // 00020 // // 00021 // The current module was developed at the University of Macedonia // 00022 // (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) // 00023 // The aim of this project is to provide additional and improved // 00024 // functionality to the Asynchronous Distance Education service that the // 00025 // Greek School Network deploys. // 00026 // // 00027 // This program is free software; you can redistribute it and/or modify // 00028 // it under the terms of the GNU General Public License as published by // 00029 // the Free Software Foundation; either version 2 of the License, or // 00030 // (at your option) any later version. // 00031 // // 00032 // This program is distributed in the hope that it will be useful, // 00033 // but WITHOUT ANY WARRANTY; without even the implied warranty of // 00034 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 00035 // GNU General Public License for more details: // 00036 // // 00037 // http://www.gnu.org/copyleft/gpl.html // 00038 // // 00040 00041 require_once('../config.php'); 00042 require_once($CFG->dirroot.'/calendar/lib.php'); 00043 00044 require_sesskey(); 00045 00046 $var = required_param('var', PARAM_ALPHA); 00047 $return = clean_param(base64_decode(required_param('return', PARAM_RAW)), PARAM_URL); 00048 00049 $url = new moodle_url('/calendar/set.php', array('return'=>base64_encode($return),'var'=>$var, 'sesskey'=>sesskey())); 00050 $PAGE->set_url($url); 00051 $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM)); 00052 00053 switch($var) { 00054 case 'showgroups': 00055 calendar_set_event_type_display(CALENDAR_EVENT_GROUP); 00056 break; 00057 case 'showcourses': 00058 calendar_set_event_type_display(CALENDAR_EVENT_COURSE); 00059 break; 00060 case 'showglobal': 00061 calendar_set_event_type_display(CALENDAR_EVENT_GLOBAL); 00062 break; 00063 case 'showuser': 00064 calendar_set_event_type_display(CALENDAR_EVENT_USER); 00065 break; 00066 } 00067 00068 redirect($return);