removed mods directory from the ATutor codebase
[atutor.git] / mods / fha_student_tools / instructor_index.php
diff --git a/mods/fha_student_tools/instructor_index.php b/mods/fha_student_tools/instructor_index.php
deleted file mode 100644 (file)
index 3b4f7f1..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-<?php\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require(AT_INCLUDE_PATH.'vitals.inc.php');\r
-authenticate(AT_PRIV_ADMIN);\r
-\r
-if (isset($_POST['up'])) {\r
-       $up = key($_POST['up']);\r
-       $_new_modules  = array();\r
-       if (isset($_POST['main'])) {\r
-               foreach ($_POST['main'] as $m) {\r
-                       if ($m == $up) {\r
-                               $last_m = array_pop($_new_modules);\r
-                               $_new_modules[] = $m;\r
-                               $_new_modules[] = $last_m;\r
-                       } else {\r
-                               $_new_modules[] = $m;\r
-                       }\r
-               }\r
-\r
-               $_POST['main'] = $_new_modules;\r
-       }\r
-\r
-       $_POST['submit'] = TRUE;\r
-} else if (isset($_POST['down'])) {\r
-       $_new_modules  = array();\r
-\r
-       $down = key($_POST['down']);\r
-\r
-       if (isset($_POST['main'])) {\r
-               foreach ($_POST['main'] as $m) {\r
-                       if ($m == $down) {\r
-                               $found = TRUE;\r
-                               continue;\r
-                       }\r
-                       $_new_modules[] = $m;\r
-                       if ($found) {\r
-                               $_new_modules[] = $down;\r
-                               $found = FALSE;\r
-                       }\r
-               }\r
-\r
-               $_POST['main'] = $_new_modules;\r
-       }\r
-\r
-       $_POST['submit'] = TRUE;\r
-}\r
-\r
-if (isset($_POST['submit'])) {\r
-       if (isset($_POST['main'])) {\r
-               $_POST['main'] = array_intersect($_POST['main'], $_modules);\r
-               $_POST['main'] = array_unique($_POST['main']);\r
-               $main_links = implode('|', $_POST['main']);\r
-       } else {\r
-               $main_links = '';\r
-       }\r
-\r
-       $sql    = "REPLACE INTO ".TABLE_PREFIX."fha_student_tools VALUES ($_SESSION[course_id], '$main_links')";\r
-       $result = mysql_query($sql, $db);\r
-\r
-       $msg->addFeedback('SECTIONS_SAVED');\r
-       header('Location: '.$_SERVER['PHP_SELF']);\r
-       exit;\r
-}\r
-\r
-require(AT_INCLUDE_PATH.'header.inc.php');\r
-\r
-$fha_student_tools = array();\r
-\r
-$sql = "SELECT links FROM ".TABLE_PREFIX."fha_student_tools WHERE course_id=$_SESSION[course_id]";\r
-$result = mysql_query($sql, $db);\r
-if ($row = mysql_fetch_assoc($result)) {\r
-       $fha_student_tools = explode('|', $row['links']);\r
-}\r
-\r
-$_current_modules = array_merge($fha_student_tools, array_diff($_modules, $fha_student_tools));\r
-\r
-$num_modules = count($fha_student_tools);\r
-?>\r
-<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
-<table class="data" rules="rows" summary="">\r
-<thead>\r
-<tr>\r
-       <th scope="cols"><?php echo _AT('section'); ?></th>\r
-       <th><?php echo _AT('order'); ?></th>\r
-</tr>\r
-</thead>\r
-<tfoot>\r
-<tr>\r
-       <td colspan="2"><input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" /></td>\r
-</tr>\r
-</tfoot>\r
-<tbody>\r
-<?php foreach ($_current_modules as $module): ?>\r
-<?php if ($module == 'mods/fha_student_tools/index.php') { continue; } ?>\r
-<?php $count++; ?>\r
-<tr>\r
-       <td>\r
-               <?php if (in_array($module, $fha_student_tools)): ?>\r
-                       <input type="checkbox" name="main[]" value="<?php echo $module; ?>" id="m<?php echo $count; ?>" checked="checked" />\r
-               <?php else: ?>\r
-                       <input type="checkbox" name="main[]" value="<?php echo $module; ?>" id="m<?php echo $count; ?>" />\r
-               <?php endif; ?>\r
-               <label for="m<?php echo $count; ?>"><?php \r
-                       if (isset($_pages[$module]['title'])) {\r
-                               echo $_pages[$module]['title'];\r
-                       } else {\r
-                               echo _AT($_pages[$module]['title_var']);\r
-               } ?></label>\r
-       </td>\r
-\r
-       <td align="right">\r
-               <?php if (!in_array($module, $fha_student_tools)): ?>\r
-                       &nbsp;\r
-               <?php else: ?>\r
-                       <?php if (($count != $num_main+1) && ($count > 1)): ?>\r
-                               <input type="submit" name="up[<?php echo $module; ?>]" value="<?php echo _AT('move_up'); ?>" title="<?php echo _AT('move_up'); ?>" style="background-color: white; border: 1px solid; padding: 0px;" />\r
-                       <?php else: ?>\r
-                               <img src="images/clr.gif" alt="" width="12" />\r
-                       <?php endif; ?>\r
-                       <?php if (($count != $num_main) && ($count < $num_modules)): ?>\r
-                               <input type="submit" name="down[<?php echo $module; ?>]" value="<?php echo _AT('move_down'); ?>" title="<?php echo _AT('move_down'); ?>" style="background-color: white; border: 1px solid; padding: 0px;"/>\r
-                       <?php else: ?>\r
-                               <img src="images/clr.gif" alt="" width="12" />\r
-                       <?php endif; ?>\r
-               <?php endif; ?>\r
-       </td>\r
-</tr>\r
-<?php endforeach; ?>\r
-</tbody>\r
-</table>\r
-</form>\r
-\r
-\r
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file