removed mods directory from the ATutor codebase
[atutor.git] / mods / certificate / index.php
diff --git a/mods/certificate/index.php b/mods/certificate/index.php
deleted file mode 100644 (file)
index efa78a2..0000000
+++ /dev/null
@@ -1,135 +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: index_instructor.php 7208 2008-02-20 16:07:24Z cindy $\r
-\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require (AT_INCLUDE_PATH.'vitals.inc.php');\r
-require(AT_INCLUDE_PATH.'lib/test_result_functions.inc.php');\r
-require(AT_INCLUDE_PATH.'header.inc.php'); \r
-\r
-$include_javascript=true;\r
-require("common.inc.php");\r
-\r
-$sql   = "SELECT T.*, R.*, C.certificate_id, C.enable_download\r
-                                  FROM ".TABLE_PREFIX."tests T, ".TABLE_PREFIX."tests_results R, ".TABLE_PREFIX."certificate C \r
-                                 WHERE R.final_score > 0\r
-                                   AND R.member_id=$_SESSION[member_id] \r
-                                   AND R.test_id=T.test_id \r
-                                   AND T.course_id=$_SESSION[course_id] \r
-                                   AND T.test_id = C.test_id\r
-                                   AND C.enable_download=1\r
-                                   ORDER BY R.date_taken DESC";\r
-                                   \r
-$result        = mysql_query($sql, $db) or die(mysql_error());\r
-\r
-while ($row = mysql_fetch_assoc($result))\r
-{\r
-       // if pass score is defined in table certificate, set passscore, passpercent\r
-       if (!is_pass_score_defined_in_base_table())\r
-       {\r
-               $sql = "select passscore, passpercent from ".TABLE_PREFIX."certificate where test_id=".$row["test_id"];\r
-               $result_certificate     = mysql_query($sql, $db) or die(mysql_error());\r
-               $row_certificate = mysql_fetch_assoc($result_certificate);\r
-               \r
-               $row["passscore"] = $row_certificate["passscore"];\r
-               $row["passpercent"] = $row_certificate["passpercent"];\r
-       }\r
-\r
-       // if pass score/percentage is not defined for issuing certificate, don't show rows for this test on the page\r
-       if (($row["passscore"]==0 || $row["passscore"]=="") & ($row["passpercent"]==0 || $row["passpercent"]==""))\r
-               continue;\r
-       \r
-       // if final score or out of is empty, don't show this row on the page\r
-       if ($row['out_of'] == 0 || $row['final_score'] == '' || $row['result_release']==AT_RELEASE_NEVER)\r
-               continue;\r
-       else \r
-       {\r
-               if ($row['random'])\r
-                       $out_of = get_random_outof($row['test_id'], $row['result_id']);\r
-               else\r
-                       $out_of = $row['out_of'];\r
-       }\r
-       \r
-       $pass_score = 0;\r
-       \r
-       if ($row["passpercent"] <> 0 & ($row["final_score"]/$out_of*100) >= $row["passpercent"])\r
-               $pass_score = ($row["final_score"]/$out_of*100) . '%';\r
-       if ($row["passscore"] <> 0 & $row["final_score"] >= $row["passscore"])\r
-               $pass_score = $row["final_score"] . " / " . $out_of;\r
-\r
-       if ($pass_score <> 0)\r
-       {\r
-               $rows[] = array("result_id"=>$row["result_id"],\r
-                                                                               "certificate_id"=>$row["certificate_id"],\r
-                                                                               "title"=>$row["title"],\r
-                                                                               "mark"=>$pass_score,\r
-                                                                               "date_taken"=>$row["date_taken"]);\r
-       }\r
-}\r
-\r
-?>\r
-&middot; <?php echo _AT("require_acrobat", "download"); ?><br><br>\r
-\r
-<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">\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('title'); ?></th>\r
-       <th scope="col"><?php echo _AT('mark'); ?></th>\r
-       <th scope="col"><?php echo _AT('date_taken'); ?></th>\r
-</tr>\r
-</thead>\r
-<tfoot>\r
-<tr>\r
-       <td colspan="5">\r
-               <div class="row buttons">\r
-               <input type="button" name="download" value="<?php echo _AT('download'); ?>" onClick="open_certificate_win('<?php echo dirname($_SERVER["PHP_SELF"])?>/open_certificate.php?result_id={radio_value}&certificate_id={hidden_value}', 'result_id', 'certificate_id')" />\r
-               </div>\r
-       </td>\r
-</tr>\r
-</tfoot>\r
-<tbody>\r
-<?php\r
-if (!is_array($rows))\r
-{\r
-?>\r
-       <tr>\r
-               <td colspan="4"><?php echo _AT('none_found'); ?></td>\r
-       </tr>\r
-<?php \r
-}\r
-else\r
-{\r
-       foreach ($rows as $row)\r
-       {\r
-       ?>\r
-               <tr onmousedown="document.form['m<?php echo $row['result_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['result_id']; ?>">\r
-                       <td width="10"><input type="radio" name="result_id" value="<?php echo $row['result_id']; ?>" id="m<?php echo $row['result_id']; ?>" <?php if ($row['result_id']==$_POST['result_id']) echo 'checked'; ?> /></td>\r
-                       <td><label for="m<?php echo $row['certificate_id']; ?>"><?php echo $row['title']; ?></label></td>\r
-                       <td><?php echo $row['mark']; ?></td>\r
-                       <td><?php echo $row['date_taken']; ?></td>\r
-                       <input type="hidden" name="certificate_id" value="<?php echo $row['certificate_id']; ?>">\r
-               </tr>\r
-<?php \r
-       }\r
-}\r
-?>\r
-\r
-</tbody>\r
-</table>\r
-\r
-</form>\r
-\r
-<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file