(no commit message)
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 8 Dec 2005 16:15:14 +0000 (16:15 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 8 Dec 2005 16:15:14 +0000 (16:15 -0000)
docs/index.php
docs/tools/polls/module.php [deleted file]
docs/tools/polls/module.xml [deleted file]
docs/tools/polls/module_backup.php [deleted file]
docs/tools/polls/module_delete.php [deleted file]
docs/tools/tests/module.php [deleted file]
docs/tools/tests/module.xml [deleted file]
docs/tools/tests/module_backup.php [deleted file]
docs/tools/tests/module_delete.php [deleted file]

index d05e6be..c3255e2 100644 (file)
@@ -42,7 +42,7 @@ if (!$page) {
        $page = 1;
 }      
 
-$module =& $moduleFactory->getModule('tools/announcements');
+$module =& $moduleFactory->getModule(AT_MODULE_DIR_STANDARD.'/announcements');
 if (!$module->isEnabled()) {
        $result = FALSE;
        $news = array();
diff --git a/docs/tools/polls/module.php b/docs/tools/polls/module.php
deleted file mode 100644 (file)
index 0d23334..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php\r
-if (!defined('AT_INCLUDE_PATH')) { exit; }\r
-if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }\r
-\r
-define('AT_PRIV_POLLS', $this->getPrivilege());\r
-\r
-//side dropdown\r
-$this->_stacks['poll'] = array('title_var'=>'poll','file'=>AT_INCLUDE_PATH.'html/dropdowns/poll.inc.php');\r
-\r
-// if this module is to be made available to students on the Home or Main Navigation\r
-$_student_tool = 'polls/index.php';\r
-\r
-$this->_pages['polls/index.php']['title_var'] = 'polls';\r
-$this->_pages['polls/index.php']['img']       = 'images/home-polls.gif';\r
-\r
-$this->_pages['tools/polls/index.php']['title_var'] = 'polls';\r
-$this->_pages['tools/polls/index.php']['parent']    = 'tools/index.php';\r
-$this->_pages['tools/polls/index.php']['children']  = array('tools/polls/add.php');\r
-$this->_pages['tools/polls/index.php']['guide']     = 'instructor/?p=11.0.polls.php';\r
-\r
-       $this->_pages['tools/polls/add.php']['title_var'] = 'add_poll';\r
-       $this->_pages['tools/polls/add.php']['parent']    = 'tools/polls/index.php';\r
-\r
-       $this->_pages['tools/polls/edit.php']['title_var'] = 'edit_poll';\r
-       $this->_pages['tools/polls/edit.php']['parent']    = 'tools/polls/index.php';\r
-\r
-       $this->_pages['tools/polls/delete.php']['title_var'] = 'delete_poll';\r
-       $this->_pages['tools/polls/delete.php']['parent']    = 'tools/polls/index.php';\r
-\r
-?>
\ No newline at end of file
diff --git a/docs/tools/polls/module.xml b/docs/tools/polls/module.xml
deleted file mode 100644 (file)
index 88a4cee..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?> \r
-<module version="0.1"> \r
-    <name lang="en">Polls</name> \r
-    <description lang="en">Polls are useful for quickly gathering course member opinions. Instructors and students with poll privileges can post a question with up to seven choices for answers.</description> \r
-    <maintainers>\r
-        <maintainer> \r
-            <name>ATutor Team</name> \r
-            <email>info@atutor.ca</email> \r
-        </maintainer>\r
-    </maintainers> \r
-    <url>http://atutor.ca</url> \r
-    <license>GPL</license> \r
-       <release> \r
-        <version>0.1</version> \r
-               <privileges>\r
-                       <instructor_privilege>create</instructor_privilege>\r
-                       <admin_privilege></admin_privilege> \r
-               </privileges>\r
-        <date>2005-08-22</date> \r
-        <state>stable</state> \r
-        <notes>This is a standard module.</notes> \r
-    </release> \r
-</module>
\ No newline at end of file
diff --git a/docs/tools/polls/module_backup.php b/docs/tools/polls/module_backup.php
deleted file mode 100644 (file)
index 3208851..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php\r
-/* each table to be backed up. includes the sql entry and fields */\r
-\r
-$sql = array();\r
-$sql['polls'] = 'SELECT question, created_date, choice1, choice2, choice3, choice4, choice5, choice6, choice7 FROM '.TABLE_PREFIX.'polls WHERE course_id=?';\r
-\r
-/* the tables to be restored, the order matters! */\r
-/* the key must be the module directory name.    */\r
-/* a {table_name}Table class must exist that extends AbstractTable */\r
-       $restore_tables = array('polls');\r
-\r
-function polls_convert($row, $course_id, $table_id_map, $version) {\r
-       $new_row = array();\r
-       $new_row[0]  = 0;\r
-       $new_row[1]  = $course_id;\r
-       $new_row[2]  = $row[0];\r
-       $new_row[3]  = $row[1];\r
-       $new_row[4]  = 0;\r
-       $new_row[5]  = $row[2];\r
-       $new_row[6]  = 0;\r
-       $new_row[7]  = $row[3];\r
-       $new_row[8]  = 0;\r
-       $new_row[9]  = $row[4];\r
-       $new_row[10] = 0;\r
-       $new_row[11] = $row[5];\r
-       $new_row[12] = 0;\r
-       $new_row[13] = $row[6];\r
-       $new_row[14] = 0;\r
-       $new_row[15] = $row[7];\r
-       $new_row[16] = 0;\r
-       $new_row[17] = $row[8];\r
-       $new_row[18] = 0;\r
-\r
-       return $new_row;\r
-}\r
-\r
-?>
\ No newline at end of file
diff --git a/docs/tools/polls/module_delete.php b/docs/tools/polls/module_delete.php
deleted file mode 100644 (file)
index 5b1d5ad..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php\r
-\r
-function polls_delete($course) {\r
-       global $db;\r
-\r
-       $sql    = "SELECT poll_id FROM ".TABLE_PREFIX."polls WHERE course_id=$course";\r
-       $result = mysql_query($sql, $db);\r
-       if (!$result) {\r
-               return;\r
-       }\r
-       while ($row = mysql_fetch_assoc($result)) {\r
-               $sql     = "DELETE FROM ".TABLE_PREFIX."polls_members WHERE poll_id=$row[poll_id]";\r
-               @mysql_query($sql, $db);\r
-       }\r
-       $sql    = "DELETE FROM ".TABLE_PREFIX."polls WHERE course_id=$course";\r
-       $result = mysql_query($sql, $db);\r
-}\r
-\r
-?>
\ No newline at end of file
diff --git a/docs/tools/tests/module.php b/docs/tools/tests/module.php
deleted file mode 100644 (file)
index a7f4913..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php\r
-if (!defined('AT_INCLUDE_PATH')) { exit; }\r
-if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }\r
-\r
-define('AT_PRIV_TESTS', $this->getPrivilege());\r
-\r
-// if this module is to be made available to students on the Home or Main Navigation\r
-$_student_tool = 'tools/my_tests.php';\r
-\r
-$this->_pages['tools/tests/index.php']['title_var'] = 'tests';\r
-$this->_pages['tools/tests/index.php']['parent']    = 'tools/index.php';\r
-$this->_pages['tools/tests/index.php']['guide']     = 'instructor/?p=15.0.tests_surveys.php';\r
-$this->_pages['tools/tests/index.php']['children']  = array('tools/tests/create_test.php', 'tools/tests/question_db.php', 'tools/tests/question_cats.php');\r
-\r
-$this->_pages['tools/tests/create_test.php']['title_var'] = 'create_test';\r
-$this->_pages['tools/tests/create_test.php']['parent']    = 'tools/tests/index.php';\r
-$this->_pages['tools/tests/create_test.php']['guide']     = 'instructor/?p=15.1.creating_tests_surveys.php';\r
-\r
-$this->_pages['tools/tests/question_db.php']['title_var'] = 'question_database';\r
-$this->_pages['tools/tests/question_db.php']['parent']    = 'tools/tests/index.php';\r
-$this->_pages['tools/tests/question_db.php']['guide']     = 'instructor/?p=15.2.question_database.php';\r
-\r
-       $this->_pages['tools/tests/create_question_multi.php']['title_var'] = 'create_question_multi';\r
-       $this->_pages['tools/tests/create_question_multi.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-\r
-$this->_pages['tools/tests/question_cats.php']['title_var'] = 'question_categories';\r
-$this->_pages['tools/tests/question_cats.php']['parent']    = 'tools/tests/index.php';\r
-$this->_pages['tools/tests/question_cats.php']['children']  = array('tools/tests/question_cats_manage.php');\r
-$this->_pages['tools/tests/question_cats.php']['guide']     = 'instructor/?p=15.3.question_categories.php';\r
-\r
-$this->_pages['tools/tests/question_cats_manage.php']['title_var'] = 'create_category';\r
-$this->_pages['tools/tests/question_cats_manage.php']['parent']    = 'tools/tests/question_cats.php';\r
-\r
-$this->_pages['tools/tests/question_cats_delete.php']['title_var'] = 'delete_category';\r
-$this->_pages['tools/tests/question_cats_delete.php']['parent']    = 'tools/tests/question_cats.php';\r
-\r
-$this->_pages['tools/tests/edit_test.php']['title_var'] = 'edit_test';\r
-$this->_pages['tools/tests/edit_test.php']['parent']    = 'tools/tests/index.php';\r
-\r
-$this->_pages['tools/tests/preview.php']['title_var'] = 'preview_questions';\r
-$this->_pages['tools/tests/preview.php']['parent']    = 'tools/tests/index.php';\r
-$this->_pages['tools/tests/preview.php']['guide']     = 'instructor/?p=15.5.preview.php';\r
-\r
-$this->_pages['tools/tests/preview_question.php']['title_var'] = 'preview';\r
-$this->_pages['tools/tests/preview_question.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-$this->_pages['tools/tests/results.php']['title_var'] = 'submissions';\r
-$this->_pages['tools/tests/results.php']['parent']    = 'tools/tests/index.php';\r
-\r
-$this->_pages['tools/tests/results_all.php']['guide'] = 'instructor/?p=15.7.student_submissions.php';\r
-\r
-//$this->_pages['tools/tests/results_all_quest.php']['title_var']  =  _AT('question')." "._AT('statistics');\r
-//$this->_pages['tools/tests/results_all_quest.php']['parent'] = 'tools/tests/index.php';\r
-$this->_pages['tools/tests/results_all_quest.php']['guide']     = 'instructor/?p=15.8.statistics.php';\r
-\r
-$this->_pages['tools/tests/delete_test.php']['title_var'] = 'delete_test';\r
-$this->_pages['tools/tests/delete_test.php']['parent']    = 'tools/tests/index.php';\r
-\r
-$this->_pages['tools/view_results.php']['title_var'] = 'view_results';\r
-$this->_pages['tools/view_results.php']['parent']    = 'tools/my_tests.php';\r
-\r
-       // test questions\r
-       $this->_pages['tools/tests/create_question_tf.php']['title_var'] = 'create_new_question';\r
-       $this->_pages['tools/tests/create_question_tf.php']['parent']    = 'tools/tests/question_db.php';\r
-       \r
-       $this->_pages['tools/tests/create_question_multi.php']['title_var'] = 'create_new_question';\r
-       $this->_pages['tools/tests/create_question_multi.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-       $this->_pages['tools/tests/create_question_long.php']['title_var'] = 'create_new_question';\r
-       $this->_pages['tools/tests/create_question_long.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-       $this->_pages['tools/tests/create_question_likert.php']['title_var'] = 'create_new_question';\r
-       $this->_pages['tools/tests/create_question_likert.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-       $this->_pages['tools/tests/edit_question_tf.php']['title_var'] = 'edit_question';\r
-       $this->_pages['tools/tests/edit_question_tf.php']['parent']    = 'tools/tests/question_db.php';\r
-       \r
-       $this->_pages['tools/tests/edit_question_multi.php']['title_var'] = 'edit_question';\r
-       $this->_pages['tools/tests/edit_question_multi.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-       $this->_pages['tools/tests/edit_question_long.php']['title_var'] = 'edit_question';\r
-       $this->_pages['tools/tests/edit_question_long.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-       $this->_pages['tools/tests/edit_question_likert.php']['title_var'] = 'edit_question';\r
-       $this->_pages['tools/tests/edit_question_likert.php']['parent']    = 'tools/tests/question_db.php';\r
-\r
-$this->_pages['tools/take_test.php']['title_var'] = 'take_test';\r
-$this->_pages['tools/take_test.php']['parent']    = 'tools/my_tests.php';\r
-\r
-//student page\r
-$this->_pages['tools/my_tests.php']['title_var'] = 'my_tests';\r
-$this->_pages['tools/my_tests.php']['img']       = 'images/home-tests.gif';\r
-?>
\ No newline at end of file
diff --git a/docs/tools/tests/module.xml b/docs/tools/tests/module.xml
deleted file mode 100644 (file)
index 2d9d8e7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?> \r
-<module version="0.1"> \r
-    <name lang="en">Tests</name> \r
-    <description lang="en">This is a large module that allows instructors to create tests and surveys for students with various question types and weights.</description> \r
-    <maintainers>\r
-        <maintainer> \r
-            <name>ATutor Team</name> \r
-            <email>info@atutor.ca</email> \r
-        </maintainer>\r
-    </maintainers> \r
-    <url>http://atutor.ca</url> \r
-    <license>GPL</license> \r
-       <release> \r
-        <version>0.1</version> \r
-               <privileges>\r
-                       <instructor_privilege>create</instructor_privilege>\r
-                       <admin_privilege></admin_privilege> \r
-               </privileges>\r
-        <date>2005-08-25</date> \r
-        <state>stable</state> \r
-        <notes>This is a standard module.</notes> \r
-    </release> \r
-</module>
\ No newline at end of file
diff --git a/docs/tools/tests/module_backup.php b/docs/tools/tests/module_backup.php
deleted file mode 100644 (file)
index 45bab85..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php\r
-\r
-$sql = array();\r
-\r
-$sql['tests'] = 'SELECT test_id, title, format, start_date, end_date, randomize_order, num_questions, instructions, content_id, result_release, random, difficulty, num_takes, anonymous, out_of FROM '.TABLE_PREFIX.'tests WHERE course_id=? ORDER BY test_id ASC';\r
-\r
-$sql['tests_questions_categories'] = 'SELECT category_id, title FROM '.TABLE_PREFIX.'tests_questions_categories WHERE course_id=?';\r
-\r
-$sql['tests_questions'] = 'SELECT question_id, category_id, type, feedback, question, choice_0, choice_1, choice_2, choice_3, choice_4, choice_5, choice_6, choice_7, choice_8, choice_9, answer_0, answer_1, answer_2, answer_3, answer_4, answer_5, answer_6, answer_7, answer_8, answer_9, properties, content_id FROM '.TABLE_PREFIX.'tests_questions WHERE course_id=?';\r
-\r
-$sql['tests_questions_assoc'] = 'SELECT TQ.test_id, question_id, weight, ordering, required FROM '.TABLE_PREFIX.'tests_questions_assoc TQ, '.TABLE_PREFIX.'tests T WHERE T.course_id=? AND T.test_id=TQ.test_id ORDER BY TQ.test_id';\r
-\r
-function tests_convert($row, $course_id, $table_id_map, $version) {\r
-       $new_row = array();\r
-       $new_row[0]  = $row[0];\r
-       $new_row[1]  = $course_id;\r
-       $new_row[2]  = $row[1];\r
-       $new_row[3]  = $row[2];\r
-       $new_row[4]  = $row[3];\r
-       $new_row[5]  = $row[4];\r
-       $new_row[6]  = $row[5];\r
-       $new_row[7]  = $row[6];\r
-       $new_row[8]  = $row[7];\r
-       $new_row[9]  = 0;\r
-       $new_row[10] = $row[9]  ? $row[9]  : 0;\r
-       $new_row[11] = $row[10] ? $row[10] : 0;\r
-       $new_row[12] = $row[11] ? $row[11] : 0;\r
-       $new_row[13] = $row[12] ? $row[12] : 0;\r
-       $new_row[14] = $row[13] ? $row[13] : 0;\r
-       $new_row[15] = $row[14] ? $row[14] : 0;\r
-\r
-       return $new_row;\r
-}\r
-\r
-function tests_questions_categories_convert($row, $course_id, $table_id_map, $version) {\r
-       $new_row = array();\r
-       $new_row[0] = $row[0];\r
-       $new_row[1] = $course_id;\r
-       $new_row[2] = $row[1];\r
-\r
-       return $new_row;\r
-}\r
-\r
-function tests_questions_convert($row, $course_id, $table_id_map, $version) {\r
-       $new_row = array();\r
-       $new_row[0]  = $row[0];\r
-       $new_row[1]  = $table_id_map['tests_questions_categories'][$row[1]];\r
-       $new_row[2]  = $course_id;\r
-       $new_row[3]  = $row[2];\r
-       $new_row[4]  = $row[3];\r
-       $new_row[5]  = $row[4];\r
-       $new_row[6]  = $row[5];\r
-       $new_row[7]  = $row[6];\r
-       $new_row[8]  = $row[7];\r
-       $new_row[9]  = $row[8];\r
-       $new_row[10] = $row[9];\r
-       $new_row[11] = $row[10];\r
-       $new_row[12] = $row[11];\r
-       $new_row[13] = $row[12];\r
-       $new_row[14] = $row[13];\r
-       $new_row[15] = $row[14];\r
-       $new_row[16] = $row[15];\r
-       $new_row[17] = $row[16];\r
-       $new_row[18] = $row[17];\r
-       $new_row[19] = $row[18];\r
-       $new_row[20] = $row[19];\r
-       $new_row[21] = $row[20];\r
-       $new_row[22] = $row[21];\r
-       $new_row[23] = $row[22];\r
-       $new_row[24] = $row[23];\r
-       $new_row[25] = $row[24];\r
-       $new_row[26] = $row[25];\r
-       $new_row[27] = $row[26];\r
-\r
-       return $new_row;\r
-}\r
-\r
-function tests_questions_assoc_convert($row, $course_id, $table_id_map, $version) {\r
-       $new_row = array();\r
-       $new_row[0] = $table_id_map['tests'][$row[0]];\r
-       $new_row[1] = $table_id_map['tests_questions'][$row[1]];\r
-       $new_row[2] = $row[2];\r
-       $new_row[3] = $row[3];\r
-       $new_row[4] = $row[4];\r
-\r
-       return $new_row;\r
-}\r
-?>
\ No newline at end of file
diff --git a/docs/tools/tests/module_delete.php b/docs/tools/tests/module_delete.php
deleted file mode 100644 (file)
index bb0b22b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php\r
-\r
-function tests_delete($course) {\r
-       global $db;\r
-\r
-       $sql    = "SELECT test_id FROM ".TABLE_PREFIX."tests WHERE course_id=$course";\r
-       $result = mysql_query($sql, $db);\r
-       while ($row = mysql_fetch_assoc($result)) {\r
-               $sql    = "DELETE FROM ".TABLE_PREFIX."tests_questions_assoc WHERE test_id=$row[test_id]";\r
-               $result2 = mysql_query($sql, $db);\r
-       \r
-               $sql2   = "SELECT result_id FROM ".TABLE_PREFIX."tests_results WHERE test_id=$row[test_id]";\r
-               $result2 = mysql_query($sql2, $db);\r
-               while ($row2 = mysql_fetch_assoc($result2)) {\r
-                       $sql3   = "DELETE FROM ".TABLE_PREFIX."tests_answers WHERE result_id=$row2[result_id]";\r
-                       $result3 = mysql_query($sql3, $db);\r
-               }\r
-               $sql    = "DELETE FROM ".TABLE_PREFIX."tests_results WHERE test_id=$row[test_id]";\r
-               $result2 = mysql_query($sql, $db);\r
-\r
-               $sql    = "DELETE FROM ".TABLE_PREFIX."tests_groups WHERE test_id=$row[test_id]";\r
-               $result2 = mysql_query($sql, $db);\r
-       }\r
-\r
-       $sql    = "DELETE FROM ".TABLE_PREFIX."tests_questions WHERE course_id=$course";\r
-       $result = mysql_query($sql, $db);\r
-\r
-       $sql    = "DELETE FROM ".TABLE_PREFIX."tests_questions_categories WHERE course_id=$course";\r
-       $result = mysql_query($sql, $db);\r
-\r
-       $sql    = "DELETE FROM ".TABLE_PREFIX."tests WHERE course_id=$course";\r
-       $result = mysql_query($sql, $db);\r
-\r
-}\r
-\r
-?>
\ No newline at end of file