(no commit message)
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 8 Dec 2005 16:14:24 +0000 (16:14 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 8 Dec 2005 16:14:24 +0000 (16:14 -0000)
13 files changed:
docs/tools/faq/add_question.php [deleted file]
docs/tools/faq/add_topic.php [deleted file]
docs/tools/faq/delete_question.php [deleted file]
docs/tools/faq/delete_topic.php [deleted file]
docs/tools/faq/edit_question.php [deleted file]
docs/tools/faq/edit_topic.php [deleted file]
docs/tools/faq/icon.gif [deleted file]
docs/tools/faq/index.php [deleted file]
docs/tools/faq/index_instructor.php [deleted file]
docs/tools/faq/module.php [deleted file]
docs/tools/faq/module.xml [deleted file]
docs/tools/faq/module_backup.php [deleted file]
docs/tools/faq/module_delete.php [deleted file]

diff --git a/docs/tools/faq/add_question.php b/docs/tools/faq/add_question.php
deleted file mode 100644 (file)
index 134675a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-define('AT_INCLUDE_PATH', '../../include/');
-require (AT_INCLUDE_PATH.'vitals.inc.php');
-
-authenticate(AT_PRIV_FAQ);
-
-if (isset($_POST['cancel'])) {
-       $msg->addFeedback('CANCELLED');
-       header('Location: index_instructor.php');
-       exit;
-} else if (isset($_POST['submit'])) {
-       if (trim($_POST['question']) == '') {
-               $msg->addError('QUESTION_EMPTY');
-       }
-
-       if (trim($_POST['answer']) == '') {
-               $msg->addError('ANSWER_EMPTY');
-       }
-
-       if (!$msg->containsErrors()) {
-               $_POST['question'] = $addslashes($_POST['question']);
-               $_POST['answer']   = $addslashes($_POST['answer']);
-               $_POST['topic_id'] = intval($_POST['topic_id']);
-
-               // check that this topic_id belongs to this course:
-               $sql    = "SELECT topic_id FROM ".TABLE_PREFIX."faq_topics WHERE topic_id=$_POST[topic_id] AND course_id=$_SESSION[course_id]";
-               $result = mysql_query($sql, $db);
-               if ($row = mysql_fetch_assoc($result)) {
-                       $sql    = "INSERT INTO ".TABLE_PREFIX."faq_entries VALUES (0, $_POST[topic_id], NOW(), 1, '$_POST[question]', '$_POST[answer]')";
-                       $result = mysql_query($sql,$db);
-               }
-               
-               $msg->addFeedback('QUESTION_ADDED');
-               header('Location: index_instructor.php');
-               exit;
-       }
-}
-
-require(AT_INCLUDE_PATH.'header.inc.php');
-
-       $sql    = "SELECT name, topic_id FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$_SESSION[course_id] ORDER BY name";
-       $result = mysql_query($sql, $db);
-       $num_topics = mysql_num_rows($result);
-       if (!$num_topics) {
-               $msg->printErrors('NO_FAQ_TOPICS');
-               require(AT_INCLUDE_PATH.'footer.inc.php');
-               exit;
-       }
-?>
-
-<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
-
-<div class="input-form">
-       <div class="row">
-
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="topic"><?php  echo _AT('topic'); ?></label><br />
-               <select name="topic_id" id="topic">
-                       <?php while ($row = mysql_fetch_assoc($result)): ?>
-                               <option value="<?php echo $row['topic_id']; ?>"<?php if (isset($_POST['topic_id']) && ($row['topic_id'] == $_POST['topic_id'])) { echo ' selected="selected"'; } ?>><?php echo htmlspecialchars($row['name']); ?></option>
-                       <?php endwhile; ?>
-               </select>
-       </div>
-       <div class="row">
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="question"><?php  echo _AT('question'); ?></label><br />
-               <input type="text" name="question" size="50" id="question" value="<?php if (isset($_POST['question'])) echo stripslashes($_POST['question']);  ?>" />
-
-       </div>
-       <div class="row">
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="answer"><?php  echo _AT('answer'); ?></label><br />
-               <textarea name="answer" cols="45" rows="3" id="answer" style="width:90%;"><?php if (isset ($_POST['answer'])) echo stripslashes($_POST['answer']);  ?></textarea>
-       </div>
-
-
-       <div class="row buttons">
-               <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
-               <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
-       </div>
-</div>
-</form>
-
-<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/tools/faq/add_topic.php b/docs/tools/faq/add_topic.php
deleted file mode 100644 (file)
index 23ba3d6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-define('AT_INCLUDE_PATH', '../../include/');
-require (AT_INCLUDE_PATH.'vitals.inc.php');
-
-authenticate(AT_PRIV_FAQ);
-
-if (isset($_POST['cancel'])) {
-       $msg->addFeedback('CANCELLED');
-       header('Location: index_instructor.php');
-       exit;
-} else if (isset($_POST['submit'])) {
-       if (trim($_POST['name']) == '') {
-               $msg->addError('NAME_EMPTY');
-       }
-
-       if (!$msg->containsErrors()) {
-               $_POST['name'] = $addslashes($_POST['name']);
-
-               $sql    = "INSERT INTO ".TABLE_PREFIX."faq_topics VALUES (0, $_SESSION[course_id], '$_POST[name]')";
-               $result = mysql_query($sql,$db);
-               
-               $msg->addFeedback('TOPIC_ADDED');
-               header('Location: index_instructor.php');
-               exit;
-       }
-}
-
-require(AT_INCLUDE_PATH.'header.inc.php');
-
-?>
-
-<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
-
-<div class="input-form">       
-       <div class="row">
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="name"><?php  echo _AT('name'); ?></label><br />
-               <input type="text" name="name" size="50" id="name" value="<?php if (isset($_POST['name'])) echo stripslashes($_POST['name']);  ?>" />
-       </div>
-
-       <div class="row buttons">
-               <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
-               <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
-       </div>
-</div>
-</form>
-
-<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/tools/faq/delete_question.php b/docs/tools/faq/delete_question.php
deleted file mode 100644 (file)
index bed55b0..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require (AT_INCLUDE_PATH.'vitals.inc.php');\r
-\r
-authenticate(AT_PRIV_FAQ);\r
-\r
-if (isset($_POST['submit_no'])) {\r
-       $msg->addFeedback('CANCELLED');\r
-       Header('Location: index_instructor.php');\r
-       exit;\r
-} else if (isset($_POST['submit_yes'])) {\r
-       $_POST['id'] = intval($_POST['id']);\r
-       $_POST['topic_id'] = intval($_POST['topic_id']);\r
-\r
-       // check that this topic_id belongs to this course:\r
-       $sql    = "SELECT topic_id FROM ".TABLE_PREFIX."faq_topics WHERE topic_id=$_POST[topic_id] AND course_id=$_SESSION[course_id]";\r
-       $result = mysql_query($sql, $db);\r
-       if ($row = mysql_fetch_assoc($result)) {\r
-               $sql = "DELETE FROM ".TABLE_PREFIX."faq_entries WHERE entry_id=$_POST[id] AND topic_id=$_POST[topic_id]";\r
-               $result = mysql_query($sql, $db);\r
-       }\r
-\r
-       $msg->addFeedback('QUESTION_DELETED');\r
-       header('Location: index_instructor.php');\r
-       exit;\r
-}\r
-\r
-require(AT_INCLUDE_PATH.'header.inc.php');\r
-\r
-\r
-$_GET['id'] = intval($_GET['id']); \r
-\r
-$sql = "SELECT question, topic_id FROM ".TABLE_PREFIX."faq_entries WHERE entry_id=$_GET[id]";\r
-\r
-$result = mysql_query($sql,$db);\r
-if ($row = mysql_fetch_assoc($result)) {\r
-       $hidden_vars['topic_id'] = $row['topic_id'];\r
-       $hidden_vars['id'] = $_GET['id'];\r
-\r
-       $confirm = array('DELETE_FAQ_QUESTION', $row['question']);\r
-       $msg->addConfirm($confirm, $hidden_vars);\r
-       $msg->printConfirm();\r
-} else {\r
-       $msg->addError('QUESTION_NOT_FOUND');\r
-}\r
-\r
-require(AT_INCLUDE_PATH.'footer.inc.php');\r
-\r
-?>
\ No newline at end of file
diff --git a/docs/tools/faq/delete_topic.php b/docs/tools/faq/delete_topic.php
deleted file mode 100644 (file)
index 223a213..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require (AT_INCLUDE_PATH.'vitals.inc.php');\r
-\r
-authenticate(AT_PRIV_FAQ);\r
-\r
-if (isset($_POST['submit_no'])) {\r
-       $msg->addFeedback('CANCELLED');\r
-       Header('Location: index_instructor.php');\r
-       exit;\r
-} else if (isset($_POST['submit_yes'])) {\r
-       $_POST['id'] = intval($_POST['id']);\r
-\r
-       // check that this topic_id belongs to this course:\r
-       $sql = "DELETE FROM ".TABLE_PREFIX."faq_topics WHERE topic_id=$_POST[id] AND course_id=$_SESSION[course_id]";\r
-       $result = mysql_query($sql, $db);\r
-       if (mysql_affected_rows($db) == 1) {\r
-               $sql = "DELETE FROM ".TABLE_PREFIX."faq_entries WHERE topic_id=$_POST[topic_id]";\r
-               $result = mysql_query($sql, $db);\r
-       }\r
-\r
-       $msg->addFeedback('TOPIC_DELETED');\r
-       header('Location: index_instructor.php');\r
-       exit;\r
-}\r
-\r
-require(AT_INCLUDE_PATH.'header.inc.php');\r
-\r
-\r
-$_GET['id'] = intval($_GET['id']); \r
-\r
-$sql = "SELECT name, topic_id FROM ".TABLE_PREFIX."faq_topics WHERE topic_id=$_GET[id]";\r
-\r
-$result = mysql_query($sql,$db);\r
-if ($row = mysql_fetch_assoc($result)) {\r
-       $hidden_vars['id'] = $_GET['id'];\r
-\r
-       $confirm = array('DELETE_FAQ_TOPIC', $row['name']);\r
-       $msg->addConfirm($confirm, $hidden_vars);\r
-       $msg->printConfirm();\r
-} else {\r
-       $msg->addError('TOPIC_NOT_FOUND');\r
-}\r
-\r
-require(AT_INCLUDE_PATH.'footer.inc.php');\r
-?>
\ No newline at end of file
diff --git a/docs/tools/faq/edit_question.php b/docs/tools/faq/edit_question.php
deleted file mode 100644 (file)
index 16a1f43..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-define('AT_INCLUDE_PATH', '../../include/');
-require (AT_INCLUDE_PATH.'vitals.inc.php');
-
-authenticate(AT_PRIV_FAQ);
-
-
-if (isset($_POST['cancel'])) {
-       $msg->addFeedback('CANCELLED');
-       header('Location: index_instructor.php');
-       exit;
-} 
-
-if (isset($_GET['id'])) {
-       $id = intval($_GET['id']);
-} else {
-       $id = intval($_POST['id']);
-}
-
-if (isset($_POST['submit'])) {
-       if (trim($_POST['question']) == '') {
-               $msg->addError('QUESTION_EMPTY');
-       }
-
-       if (trim($_POST['answer']) == '') {
-               $msg->addError('ANSWER_EMPTY');
-       }
-
-       if (!$msg->containsErrors()) {
-               $_POST['question'] = $addslashes($_POST['question']);
-               $_POST['answer'] = $addslashes($_POST['answer']);
-               $_POST['topic_id'] = intval($_POST['topic_id']);
-
-               $sql = "UPDATE ".TABLE_PREFIX."faq_entries SET question='$_POST[question]', answer='$_POST[answer]', topic_id=$_POST[topic_id] WHERE entry_id=$id";
-               $result = mysql_query($sql,$db);
-
-               $msg->addFeedback('QUESTION_UPDATED');
-               header('Location: index_instructor.php');
-               exit;
-       }
-}
-
-require(AT_INCLUDE_PATH.'header.inc.php');
-
-if ($id == 0) {
-       $msg->printErrors('QUESTION_NOT_FOUND');
-       require (AT_INCLUDE_PATH.'footer.inc.php');
-       exit;
-}
-
-$sql = "SELECT * FROM ".TABLE_PREFIX."faq_entries WHERE entry_id=$id";
-$result = mysql_query($sql,$db);
-if (!($row = mysql_fetch_assoc($result))) {
-       $msg->printErrors('QUESTION_NOT_FOUND');
-       require (AT_INCLUDE_PATH.'footer.inc.php');
-       exit;
-}
-
-
-$sql   = "SELECT name, topic_id FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$_SESSION[course_id] ORDER BY name";
-$result = mysql_query($sql, $db);
-$num_topics = mysql_num_rows($result);
-if (!$num_topics) {
-       $msg->printErrorS('NO_FAQ_TOPICS');
-       require(AT_INCLUDE_PATH.'footer.inc.php');
-       exit;
-}
-
-?>
-
-<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
-<input type="hidden" name="id" value="<?php echo $row['entry_id']; ?>" />
-
-<div class="input-form">
-       <div class="row">
-               <?php
-                       $sql    = "SELECT name, topic_id FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$_SESSION[course_id] ORDER BY name";
-                       $result = mysql_query($sql, $db);
-               ?>
-
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="topic"><?php  echo _AT('topic'); ?></label><br />
-               <select name="topic_id" id="topic">
-                       <?php while ($topic_row = mysql_fetch_assoc($result)): ?>
-                               <option value="<?php echo $topic_row['topic_id']; ?>"<?php if ($topic_row['topic_id'] == $row['topic_id']) { echo ' selected="selected"'; } ?>><?php echo htmlspecialchars($topic_row['name']); ?></option>
-                       <?php endwhile; ?>
-               </select>
-       </div>
-
-       <div class="row">
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="question"><?php echo _AT('question'); ?>:</label><br />
-               <input type="text" name="question" size="50" id="question" value="<?php if (isset ($_POST['question'])) { echo stripslashes($_POST['question']); } else { echo $row['question']; } ?>" />
-       </div>
-
-       <div class="row">
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="answer"><?php  echo _AT('answer'); ?></label><br />
-               <textarea name="answer" cols="45" rows="3" id="answer" style="width:90%;"><?php if (isset ($_POST['answer'])) { echo stripslashes($_POST['answer']); } else { echo $row['answer']; } ?></textarea>
-       </div>
-
-       <div class="row buttons">
-               <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
-               <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?> " />
-       </div>
-
-</div>
-</form>
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/tools/faq/edit_topic.php b/docs/tools/faq/edit_topic.php
deleted file mode 100644 (file)
index c6afb90..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-define('AT_INCLUDE_PATH', '../../include/');
-require (AT_INCLUDE_PATH.'vitals.inc.php');
-
-authenticate(AT_PRIV_FAQ);
-
-
-if (isset($_POST['cancel'])) {
-       $msg->addFeedback('CANCELLED');
-       header('Location: index_instructor.php');
-       exit;
-} 
-
-if (isset($_GET['id'])) {
-       $id = intval($_GET['id']);
-} else {
-       $id = intval($_POST['id']);
-}
-
-if (isset($_POST['submit'])) {
-       if (trim($_POST['name']) == '') {
-               $msg->addError('NAME_EMPTY');
-       }
-
-       if (!$msg->containsErrors()) {
-               $_POST['name'] = $addslashes($_POST['name']);
-
-               $sql    = "UPDATE ".TABLE_PREFIX."faq_topics SET name='$_POST[name]' WHERE topic_id=$id AND course_id=$_SESSION[course_id]";
-               $result = mysql_query($sql,$db);
-
-               $msg->addFeedback('TOPIC_UPDATED');
-               header('Location: index_instructor.php');
-               exit;
-       }
-}
-
-require(AT_INCLUDE_PATH.'header.inc.php');
-
-if ($id == 0) {
-       $msg->printErrors('TOPIC_NOT_FOUND');
-       require (AT_INCLUDE_PATH.'footer.inc.php');
-       exit;
-}
-
-$sql   = "SELECT name FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$_SESSION[course_id] AND topic_id=$id ORDER BY name";
-$result = mysql_query($sql, $db);
-if (!$row = mysql_fetch_assoc($result)) {
-       $msg->printErrorS('TOPIC_NOT_FOUND');
-       require(AT_INCLUDE_PATH.'footer.inc.php');
-       exit;
-} else if (!$_POST['name']) {
-       $_POST['name'] = $row['name'];
-}
-
-?>
-
-<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
-<input type="hidden" name="id" value="<?php echo $id; ?>" />
-
-<div class="input-form">
-       <div class="row">
-               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="name"><?php  echo _AT('name'); ?></label><br />
-               <input type="text" name="name" size="50" id="name" value="<?php if (isset($_POST['name'])) echo stripslashes($_POST['name']);  ?>" />
-       </div>
-
-       <div class="row buttons">
-               <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
-               <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?> " />
-       </div>
-
-</div>
-</form>
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/tools/faq/icon.gif b/docs/tools/faq/icon.gif
deleted file mode 100644 (file)
index 56ae823..0000000
Binary files a/docs/tools/faq/icon.gif and /dev/null differ
diff --git a/docs/tools/faq/index.php b/docs/tools/faq/index.php
deleted file mode 100644 (file)
index b129638..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php\r
-\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require (AT_INCLUDE_PATH.'vitals.inc.php');\r
-require (AT_INCLUDE_PATH.'header.inc.php');\r
-\r
-$counter = 1;\r
-$sql    = "SELECT name, topic_id FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$_SESSION[course_id] ORDER BY name";\r
-$result  = mysql_query($sql, $db);\r
-?>\r
-\r
-<?php if ($row = mysql_fetch_assoc($result)) : ?>\r
-       <ul style="list-style: none;">\r
-               <?php do { ?>\r
-                       <li style="font-weight: bold; margin-bottom: 10px;">\r
-                               <?php echo $row['name']; ?>\r
-                               <?php \r
-                                       $entry_sql = "SELECT * FROM ".TABLE_PREFIX."faq_entries WHERE topic_id=$row[topic_id] ORDER BY question";\r
-                                       $entry_result = mysql_query($entry_sql, $db);\r
-                               if ($entry_row = mysql_fetch_assoc($entry_result)) {?>\r
-                               <ol start="<?php echo $counter; ?>">\r
-\r
-                                       <?php do { ?>\r
-                                               <li style="font-weight: normal">\r
-                                                       <h3><?php echo $entry_row['question']; ?></h3>\r
-                                                       <p><?php echo $entry_row['answer'];?></p>\r
-                                               </li>\r
-                                               <?php $counter++; ?>\r
-                                       <?php } while ($entry_row = mysql_fetch_assoc($entry_result)) ?>\r
-                               </ol>\r
-                               <?php } else { ?>\r
-                                       <p style="padding-left: 20px; padding-top:3px; font-weight:normal;"><?php echo _AT('no_questions');  ?></p>\r
-                               <?php } ?>\r
-                       </li>\r
-               <?php } while($row = mysql_fetch_assoc($result)); ?>\r
-       </ul>\r
-<?php else: ?>\r
-       <?php echo _AT('none_found'); ?>\r
-<?php endif; ?>\r
-\r
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/tools/faq/index_instructor.php b/docs/tools/faq/index_instructor.php
deleted file mode 100644 (file)
index 6868a03..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php\r
-\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require (AT_INCLUDE_PATH.'vitals.inc.php');\r
-authenticate(AT_PRIV_FAQ);\r
-\r
-if (isset($_GET['edit'], $_GET['item'])) {\r
-       $item = intval($_GET['item']);\r
-       if (substr($_GET['item'], -1) == 'q') {\r
-               header('Location: edit_question.php?id=' . $item);\r
-       } else {\r
-               header('Location: edit_topic.php?id=' . $item);\r
-       }\r
-       exit;\r
-} else if (isset($_GET['delete'], $_GET['item'])) {\r
-       $item = intval($_GET['item']);\r
-\r
-       if (substr($_GET['item'], -1) == 'q') {\r
-               header('Location: delete_question.php?id=' . $item);\r
-       } else {\r
-               header('Location: delete_topic.php?id=' . $item);\r
-       }\r
-       exit;\r
-} else if (!empty($_GET)) {\r
-       $msg->addError('NO_ITEM_SELECTED');\r
-}\r
-\r
-require(AT_INCLUDE_PATH.'header.inc.php'); \r
-\r
-$orders = array('asc' => 'desc', 'desc' => 'asc');\r
-\r
-if (isset($_GET['asc'])) {\r
-       $order = 'asc';\r
-       $col   = $addslashes($_GET['asc']);\r
-} else if (isset($_GET['desc'])) {\r
-       $order = 'desc';\r
-       $col   = $addslashes($_GET['desc']);\r
-} else {\r
-       // no order set\r
-       $order = 'desc';\r
-       $col   = 'created_date';\r
-}\r
-\r
-$counter = 1;\r
-$sql    = "SELECT name, topic_id FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$_SESSION[course_id] ORDER BY name";\r
-$result  = mysql_query($sql, $db);\r
-?>\r
-\r
-<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">\r
-<table class="data" style="width: 60%;">\r
-<thead>\r
-<tr>\r
-       <th>&nbsp;</th>\r
-       <th style="width: 100%;"><?php echo _AT('name'); ?></th>\r
-</tr>\r
-</thead>\r
-<tfoot>\r
-<tr>\r
-       <td colspan="2"><input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> \r
-                                   <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" /></td>\r
-</tr>\r
-</tfoot>\r
-<?php if ($row = mysql_fetch_assoc($result)) : ?>\r
-<tbody>\r
-               <?php do { ?>\r
-                       <tr onmousedown="document.form['t<?php echo $row['topic_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['topic_id']; ?>_0">\r
-                               <th style="border-top:1pt solid #e0e0e0;"><input type="radio" name="item" id="t<?php echo $row['topic_id']; ?>" value="<?php echo $row['topic_id']; ?>" /></th>\r
-                               <th style="border-top:1pt solid #e0e0e0;"><?php echo $row['name']; ?></th>\r
-                       </tr>\r
-                       <?php \r
-                               $entry_sql = "SELECT * FROM ".TABLE_PREFIX."faq_entries WHERE topic_id=$row[topic_id] ORDER BY question";\r
-                               $entry_result = mysql_query($entry_sql, $db);\r
-                       ?>\r
-\r
-                       <?php if ($entry_row = mysql_fetch_assoc($entry_result)) : do { ?>\r
-                               <tr onmousedown="document.form['q<?php echo $entry_row['entry_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['topic_id']; ?>_<?php echo $entry_row['entry_id']; ?>">\r
-                                       <td><input type="radio" name="item" id="q<?php echo $entry_row['entry_id']; ?>" value="<?php echo $entry_row['entry_id']; ?>q" /></td>\r
-                                       <td><?php echo $entry_row['question']; ?></td>\r
-                               </tr>\r
-                       <?php } while ($entry_row = mysql_fetch_assoc($entry_result)); else: ?>\r
-                               <tr>\r
-                                       <td>&nbsp;</td>\r
-                                       <td><?php echo _AT('no_questions'); ?></td>\r
-                               </tr>\r
-                       <?php endif; ?>\r
-               <?php } while($row = mysql_fetch_assoc($result)); ?>\r
-</tbody>\r
-<?php else: ?>\r
-       <?php echo _AT('none_found'); ?>\r
-<?php endif; ?>\r
-</table>\r
-</form>\r
-\r
-<?php require(AT_INCLUDE_PATH.'footer.inc.php');  ?>
\ No newline at end of file
diff --git a/docs/tools/faq/module.php b/docs/tools/faq/module.php
deleted file mode 100644 (file)
index c5e2a8c..0000000
+++ /dev/null
@@ -1,40 +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_FAQ', $this->getPrivilege());\r
-\r
-// if this module is to be made available to students on the Home or Main Navigation\r
-$_student_tool = 'tools/faq/index.php';\r
-\r
-\r
-// instructor Manage section:\r
-$this->_pages['tools/faq/index_instructor.php']['title_var'] = 'faq';\r
-$this->_pages['tools/faq/index_instructor.php']['parent']    = 'tools/index.php';\r
-$this->_pages['tools/faq/index_instructor.php']['children']  = array('tools/faq/add_topic.php', 'tools/faq/add_question.php');\r
-$this->_pages['tools/faq/index_instructor.php']['guide']     = 'instructor/?p=16.0.faq.php';\r
-\r
-\r
-       $this->_pages['tools/faq/add_topic.php']['title_var'] = 'add_topic';\r
-       $this->_pages['tools/faq/add_topic.php']['parent']    = 'tools/faq/index_instructor.php';\r
-\r
-       $this->_pages['tools/faq/delete_topic.php']['title_var'] = 'delete';\r
-       $this->_pages['tools/faq/delete_topic.php']['parent']    = 'tools/faq/index_instructor.php';\r
-\r
-       $this->_pages['tools/faq/edit_topic.php']['title_var'] = 'edit';\r
-       $this->_pages['tools/faq/edit_topic.php']['parent']    = 'tools/faq/index_instructor.php';\r
-\r
-       $this->_pages['tools/faq/add_question.php']['title_var'] = 'add_question';\r
-       $this->_pages['tools/faq/add_question.php']['parent']    = 'tools/faq/index_instructor.php';\r
-\r
-       $this->_pages['tools/faq/delete_question.php']['title_var'] = 'delete';\r
-       $this->_pages['tools/faq/delete_question.php']['parent']    = 'tools/faq/index_instructor.php';\r
-\r
-       $this->_pages['tools/faq/edit_question.php']['title_var'] = 'edit';\r
-       $this->_pages['tools/faq/edit_question.php']['parent']    = 'tools/faq/index_instructor.php';\r
-\r
-// student page:\r
-$this->_pages['tools/faq/index.php']['title_var'] = 'faq';\r
-$this->_pages['tools/faq/index.php']['img']       = 'tools/faq/icon.gif';\r
-\r
-?>
\ No newline at end of file
diff --git a/docs/tools/faq/module.xml b/docs/tools/faq/module.xml
deleted file mode 100644 (file)
index 2f75b74..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?> \r
-<module version="0.1"> \r
-    <name lang="en">Frequently Asked Questions (FAQ)</name> \r
-    <description lang="en">Adds course-specific FAQs which instructors can manage.</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
-        <date>2005-10-12</date> \r
-        <state>stable</state> \r
-        <notes></notes> \r
-    </release> \r
-</module>
\ No newline at end of file
diff --git a/docs/tools/faq/module_backup.php b/docs/tools/faq/module_backup.php
deleted file mode 100644 (file)
index b36b541..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php\r
-/* each table to be backed up. includes the sql entry and fields */\r
-\r
-$sql = array();\r
-$sql['faq_topics']  = 'SELECT topic_id, name FROM '.TABLE_PREFIX.'faq_topics WHERE course_id=? ORDER BY name';\r
-$sql['faq_entries'] = 'SELECT E.topic_id, E.revised_date, E.approved, E.question, E.answer FROM '.TABLE_PREFIX.'faq_entries E INNER JOIN '.TABLE_PREFIX.'faq_topics T USING (topic_id) WHERE T.course_id=? ORDER BY T.name, E.question';\r
-\r
-function faq_topics_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 faq_entries_convert($row, $course_id, $table_id_map, $version) {\r
-       $new_row = array();\r
-       $new_row[0]  = 0;\r
-       $new_row[1]  = $table_id_map['faq_topics'][$row[0]];\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
-\r
-       return $new_row;\r
-}\r
-\r
-?>
\ No newline at end of file
diff --git a/docs/tools/faq/module_delete.php b/docs/tools/faq/module_delete.php
deleted file mode 100644 (file)
index 7b6aabe..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php\r
-\r
-function faq_delete($course) {\r
-       global $db;\r
-\r
-       $sql = "SELECT topic_id FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$course";\r
-       $result = mysql_query($sql, $db);\r
-       while ($row = mysql_fetch_assoc($result)) {\r
-               $sql = "DELETE FROM ".TABLE_PREFIX."faq_entries WHERE topic_id=$row[topic_id]";\r
-               mysql_query($sql, $db);\r
-       }\r
-\r
-       $sql = "DELETE FROM ".TABLE_PREFIX."faq_topics WHERE course_id=$course";\r
-       mysql_query($sql, $db);\r
-\r
-       clr_dir($path);\r
-}\r
-\r
-?>
\ No newline at end of file