removed mods directory from the ATutor codebase
[atutor.git] / mods / gradebook / grade_scale.php
diff --git a/mods/gradebook/grade_scale.php b/mods/gradebook/grade_scale.php
deleted file mode 100644 (file)
index 7e44dd2..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php\r
-/************************************************************************/\r
-/* ATutor                                                                                                                              */\r
-/************************************************************************/\r
-/* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/\r
-/* Adaptive Technology Resource Centre / University of Toronto                 */\r
-/* http://atutor.ca                                                                                                            */\r
-/*                                                                                                                                             */\r
-/* This program is free software. You can redistribute it and/or               */\r
-/* modify it under the terms of the GNU General Public License                 */\r
-/* as published by the Free Software Foundation.                                               */\r
-/************************************************************************/\r
-// $Id: grade_scale.php 7208 2008-05-28 16:07:24Z cindy $\r
-\r
-$page = 'gradebook';\r
-\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require (AT_INCLUDE_PATH.'vitals.inc.php');\r
-authenticate(AT_PRIV_GRADEBOOK);\r
-\r
-function print_row($grade_scale_id, $scale_name, $value, $created_date, $post_grade_scale_id, $print_radio_button=true)\r
-{\r
-?>\r
-               <tr onmousedown="document.form['m<?php echo $grade_scale_id; ?>'].checked = true; rowselect(this);" id="r_<?php echo $grade_scale_id; ?>">\r
-<?php\r
-       if ($print_radio_button)\r
-       {\r
-?>\r
-                       <td width="10"><input type="radio" name="grade_scale_id" value="<?php echo $grade_scale_id; ?>" id="m<?php echo $grade_scale_id; ?>" <?php if ($grade_scale_id==$post_grade_scale_id) echo 'checked'; ?> /></td>\r
-                       <td><label for="m<?php echo $grade_scale_id; ?>"><?php echo $scale_name; ?></label></td>\r
-<?php\r
-       }\r
-       else\r
-       {\r
-?>\r
-                       <td><?php echo $scale_name; ?></td>\r
-<?php\r
-       }\r
-?>\r
-                       <td><?php echo $value; ?></td>\r
-                       <td><?php echo $created_date; ?></td>\r
-               </tr>\r
-<?php\r
-}\r
-\r
-if (isset($_POST['remove'], $_POST['grade_scale_id'])) \r
-{\r
-       header('Location: grade_scale_delete.php?grade_scale_id='.$_POST['grade_scale_id']);\r
-       exit;\r
-} \r
-else if (isset($_POST['edit'], $_POST['grade_scale_id'])) \r
-{\r
-       header('Location: grade_scale_edit.php?grade_scale_id='.$_POST['grade_scale_id']);\r
-       exit;\r
-} \r
-else if (!empty($_POST) && !isset($_POST['grade_scale_id'])) {\r
-       $msg->addError('NO_ITEM_SELECTED');\r
-}\r
-\r
-require(AT_INCLUDE_PATH.'header.inc.php'); \r
-?>\r
-\r
-<form name="form" method="post" action="<?php echo 'mods/gradebook/grade_scale.php'; ?>">\r
-\r
-<h3 align="center"><?php echo _AT('custom_grade_scale'); ?></h3>\r
-\r
-<table summary="" class="data" rules="cols" align="center" style="width: 70%;">\r
-\r
-<thead>\r
-<tr>\r
-       <th scope="col">&nbsp;</th>\r
-       <th scope="col"><?php echo _AT('name'); ?></th>\r
-       <th scope="col"><?php echo _AT('grade_scale'); ?></th>\r
-       <th scope="col"><?php echo _AT('created_date'); ?></th>\r
-</tr>\r
-</thead>\r
-<tfoot>\r
-<tr>\r
-       <td colspan="5">\r
-               <div class="row buttons">\r
-               <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> \r
-               <input type="submit" name="remove" value="<?php echo _AT('remove'); ?>" /> \r
-               </div>\r
-       </td>\r
-</tr>\r
-<tr>\r
-       <td colspan="5"></td>\r
-</tr>\r
-</tfoot>\r
-<tbody>\r
-<?php\r
-\r
-$sql = "SELECT g.*, d.* from ".TABLE_PREFIX."grade_scales g, ".TABLE_PREFIX."grade_scales_detail d WHERE g.member_id= ".$_SESSION["member_id"]." AND g.grade_scale_id = d.grade_scale_id ORDER BY g.grade_scale_id, d.percentage_to desc";\r
-\r
-$result = mysql_query($sql, $db) or die(mysql_error());\r
-\r
-if (mysql_num_rows($result) == 0)\r
-{\r
-?>\r
-       <tr>\r
-               <td colspan="5"><?php echo _AT('none_found'); ?></td>\r
-       </tr>\r
-<?php \r
-}\r
-else\r
-{\r
-       $prev_row['grade_scale_id'] = 0;\r
-       while ($row = mysql_fetch_assoc($result))\r
-       {\r
-               if ($row['grade_scale_id'] <> $prev_row['grade_scale_id'])\r
-               {\r
-                       // print row\r
-                       if ($prev_row['grade_scale_id'] <> 0) print_row($prev_row['grade_scale_id'], $prev_row['scale_name'], $whole_scale_value, $prev_row['created_date'], $_POST['grade_scale_id']);\r
-\r
-                       // initialize next $whole_scale_value\r
-                       $whole_scale_value = $row['scale_value'] . ' = ' . $row['percentage_from'] . ' to ' . $row['percentage_to'] . '%';\r
-                       $prev_row = $row;\r
-               }\r
-               else\r
-               {\r
-                       $whole_scale_value .= '<br />'.$row['scale_value'] . ' = ' . $row['percentage_from'] . ' to ' . $row['percentage_to'] . '%';\r
-               }\r
-       }\r
-       // print last row\r
-       if ($prev_row['grade_scale_id'] <> 0) print_row($prev_row['grade_scale_id'], $prev_row['scale_name'], $whole_scale_value, $prev_row['created_date'], $_POST['grade_scale_id']);\r
-}\r
-?>\r
-\r
-</tbody>\r
-</table>\r
-</form>\r
-\r
-<h3 align="center"><?php echo _AT('preset_grade_scale'); ?></h3>\r
-<table summary="" class="data" rules="cols" align="center" style="width: 70%;">\r
-<thead>\r
-<tr>\r
-       <th scope="col"><?php echo _AT('name'); ?></th>\r
-       <th scope="col"><?php echo _AT('grade_scale'); ?></th>\r
-       <th scope="col"><?php echo _AT('created_date'); ?></th>\r
-</tr>\r
-</thead>\r
-\r
-<tbody>\r
-<?php\r
-\r
-// print preset scale table\r
-$sql = "SELECT g.*, d.* from ".TABLE_PREFIX."grade_scales g, ".TABLE_PREFIX."grade_scales_detail d WHERE g.member_id= 0 AND g.grade_scale_id = d.grade_scale_id ORDER BY g.grade_scale_id, d.percentage_to desc";\r
-\r
-$result = mysql_query($sql, $db) or die(mysql_error());\r
-\r
-if (mysql_num_rows($result) == 0)\r
-{\r
-?>\r
-       <tr>\r
-               <td colspan="5"><?php echo _AT('none_found'); ?></td>\r
-       </tr>\r
-<?php \r
-}\r
-else\r
-{\r
-       $prev_row['grade_scale_id'] = 0;\r
-       while ($row = mysql_fetch_assoc($result))\r
-       {\r
-               if ($row['grade_scale_id'] <> $prev_row['grade_scale_id'])\r
-               {\r
-                       // print row\r
-                       if ($prev_row['grade_scale_id'] <> 0) print_row($prev_row['grade_scale_id'], $prev_row['scale_name'], $whole_scale_value, $prev_row['created_date'], $_POST['grade_scale_id'], false);\r
-\r
-                       // initialize next $whole_scale_value\r
-                       $whole_scale_value = $row['scale_value'] . ' = ' . $row['percentage_from'] . ' to ' . $row['percentage_to'] . '%';\r
-                       $prev_row = $row;\r
-               }\r
-               else\r
-               {\r
-                       $whole_scale_value .= '<br />'.$row['scale_value'] . ' = ' . $row['percentage_from'] . ' to ' . $row['percentage_to'] . '%';\r
-               }\r
-       }\r
-       // print last row\r
-       if ($prev_row['grade_scale_id'] <> 0) print_row($prev_row['grade_scale_id'], $prev_row['scale_name'], $whole_scale_value, $prev_row['created_date'], $_POST['grade_scale_id'], false);\r
-}\r
-?>\r
-\r
-</tbody>\r
-</table>\r
-\r
-<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>\r