changed git call from https to git readonly
[atutor.git] / mods / photo_album / instructor_config.php
1 <?php\r
2 /*==============================================================\r
3   Photo Album\r
4  ==============================================================\r
5   Copyright (c) 2006 by Dylan Cheon & Kelvin Wong\r
6   Institute for Assistive Technology / University of Victoria\r
7   http://www.canassist.ca/                                    \r
8                                                                \r
9   This program is free software. You can redistribute it and/or\r
10   modify it under the terms of the GNU General Public License  \r
11   as published by the Free Software Foundation.                \r
12  ==============================================================\r
13  */\r
14 // $Id:\r
15 \r
16 /**\r
17  * @desc        This file generates the config page for instructor panel\r
18  * @author      Dylan Cheon & Kelvin Wong\r
19  * @copyright   2006, Institute for Assistive Technology / University of Victoria \r
20  * @link        http://www.canassist.ca/                                    \r
21  * @license GNU\r
22  */\r
23 define('AT_INCLUDE_PATH', '../../include/');\r
24 require (AT_INCLUDE_PATH.'vitals.inc.php');\r
25 require (AT_INCLUDE_PATH.'header.inc.php');\r
26 ?>\r
27 \r
28 <?php\r
29 require_once ('define.php');\r
30 require_once ('HTML/Template/ITX.php');\r
31 require_once ('include/data_func.php');\r
32 \r
33 $_SESSION['pa']['course_id']=$_SESSION['course_id'];\r
34 if (isset($_POST['submit']) && (isset($_POST['radiobutton']))){\r
35         if ($_POST['radiobutton']=='make_enabled'){\r
36                 modify_config_mode($_SESSION['pa']['course_id'], CONFIG_ENABLED);\r
37         } else if ($_POST['radiobutton']=='make_disabled'){\r
38                 modify_config_mode($_SESSION['pa']['course_id'], CONFIG_DISABLED);\r
39         }\r
40 }\r
41 \r
42 $template=new HTML_Template_ITX("./Template");\r
43 $template->loadTemplateFile("instructor_config.tpl.php");\r
44 $template->setVariable("TITLE", _AT('pa_title_instructor_config'));\r
45 $template->setVariable("CONFIG_NOTE", _AT('pa_note_instructor_config'));\r
46 \r
47 $mode=get_config_mode($_SESSION['pa']['course_id']);\r
48 $template->setVariable("CONFIG_STRING", _AT('pa_tag_config_string'));\r
49 if ($mode==CONFIG_ENABLED){\r
50         $template->setVariable("CONFIG_VALUE", _AT('pa_tag_config_enabled'));\r
51         $template->setVariable("CHECKED1", "checked=\"checked\"");\r
52 } else {\r
53         $template->setVariable("CONFIG_VALUE", _AT('pa_tag_config_disabled'));\r
54         $template->setVariable("CHECKED2", "checked=\"checked\"");\r
55 }\r
56 \r
57 $template->setVariable("FORM_NAME", "config_form");\r
58 $template->setVariable("ACTION", $_SERVER['PHP_SELF']);\r
59 $template->setVariable("RADIO_VALUE1", "make_enabled");\r
60 $template->setVariable("RADIO_STRING1", _AT('yes'));\r
61 $template->setVariable("RADIO_VALUE2", "make_disabled");\r
62 $template->setVariable("RADIO_STRING2", _AT('no'));\r
63 $template->setVariable("SUBMIT_VALUE", _AT('pa_button_config_change'));\r
64 \r
65 $template->show();\r
66 ?>\r
67 <?php require_once(AT_INCLUDE_PATH.'footer.inc.php'); ?>