2 /*==============================================================
\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
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
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
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
29 require_once ('define.php');
\r
30 require_once ('HTML/Template/ITX.php');
\r
31 require_once ('include/data_func.php');
\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
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
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
53 $template->setVariable("CONFIG_VALUE", _AT('pa_tag_config_disabled'));
\r
54 $template->setVariable("CHECKED2", "checked=\"checked\"");
\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
67 <?php require_once(AT_INCLUDE_PATH.'footer.inc.php'); ?>