http://www.atutor.ca/atutor/mantis/view.php?id=2763
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Mon, 16 Oct 2006 19:05:09 +0000 (19:05 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Mon, 16 Oct 2006 19:05:09 +0000 (19:05 -0000)
39 files changed:
docs/admin/backup/index.php
docs/admin/backup/restore.php
docs/admin/delete_category.php
docs/blogs/add_post.php
docs/blogs/edit_post.php
docs/bounce.php
docs/editor/edit_post.php
docs/faq/delete_question.php
docs/faq/delete_topic.php
docs/faq/edit_question.php
docs/faq/edit_topic.php
docs/file_storage/edit_folder.php
docs/file_storage/index.php
docs/file_storage/new.php
docs/reading_list/delete_reading.php
docs/reading_list/delete_resource.php
docs/reading_list/display_resource.php
docs/reading_list/index_instructor.php
docs/tools/backup/index.php
docs/tools/backup/restore.php
docs/tools/filemanager/new.php
docs/tools/filemanager/top.php
docs/tools/glossary/add.php
docs/tools/glossary/delete.php
docs/tools/glossary/edit.php
docs/tools/links/categories_delete.php
docs/tools/polls/delete.php
docs/tools/polls/edit.php
docs/tools/tests/edit_question_likert.php
docs/tools/tests/edit_question_long.php
docs/tools/tests/edit_question_multi.php
docs/tools/tests/edit_question_tf.php
docs/tools/tests/edit_test.php
docs/tools/tests/preview.php
docs/tools/tests/question_cats_delete.php
docs/tools/tests/results.php
docs/tools/tests/results_all_csv.php
docs/tools/tests/view_results.php
docs/tools/view_results.php

index cae66e7..42467bd 100644 (file)
@@ -42,7 +42,7 @@ if (isset($_POST['restore'], $backup_id)) {
        header('Location: edit.php?backup_id=' . $backup_id . SEP . 'course=' . $course);
        exit;
 } else if (!empty($_POST) && !$backup_id) {
-       $msg->addError('DID_NOT_SELECT_A_BACKUP');
+       $msg->addError('NO_ITEM_SELECTED');
 }
 
 
index 05d49b1..2578c9f 100644 (file)
@@ -33,7 +33,7 @@ if (isset($_POST['cancel'])) {
        exit;
 } else if (isset($_POST['submit'])) {
        if (!$_POST['material']) {
-               $msg->addError('RESTORE_MATERIAL');
+               $msg->addError(array('EMPTY_FIELDS', _AT('material')));
        }
 
        if (!$msg->containsErrors()) {
index 65473cc..9011245 100644 (file)
@@ -49,7 +49,7 @@ require(AT_INCLUDE_PATH.'header.inc.php');
        $result = mysql_query($sql,$db);\r
 \r
        if (mysql_num_rows($result) == 0) {\r
-               $msg->printErrors('CAT_NOT_FOUND');\r
+               $msg->printErrors('ITEM_NOT_FOUND');\r
        } else {\r
                $row = mysql_fetch_assoc($result);\r
                \r
index 60a100b..61fda15 100644 (file)
@@ -33,7 +33,7 @@ if (isset($_POST['cancel'])) {
        $_POST['body']  = $addslashes(trim($_POST['body']));\r
 \r
        if ($_POST['body'] == '') {\r
-               $msg->addError('EMPTY_BODY');\r
+               $msg->addError(array('EMPTY_FIELDS', _AT('body')));\r
        }\r
 \r
        if (!$msg->containsErrors()) {\r
index 87927ae..32171a9 100644 (file)
@@ -33,7 +33,7 @@ if (isset($_POST['cancel'])) {
        $id = abs($_POST['id']);\r
 \r
        if ($_POST['body'] == '') {\r
-               $msg->addError('EMPTY_BODY');\r
+               $msg->addError(array('EMPTY_FIELDS', _AT('body')));\r
        }\r
 \r
        if (!$msg->containsErrors()) {\r
index c81fdd0..a20f8ce 100644 (file)
@@ -170,7 +170,7 @@ if (($course === 0) && $_SESSION['valid_user']) {
 $sql   = "SELECT member_id, content_packaging, cat_id, access, title, UNIX_TIMESTAMP(release_date) AS u_release_date FROM ".TABLE_PREFIX."courses WHERE course_id=$course";
 $result = mysql_query($sql,$db);
 if (!$row = mysql_fetch_assoc($result)) {
-       $msg->addError('NO_SUCH_COURSE');
+       $msg->addError('ITEM_NOT_FOUND');
        if ($_SESSION['member_id']) {
                header('Location: '.$_base_href.'users/index.php');
        } else {
index 43cbb22..a935dfe 100644 (file)
@@ -99,7 +99,7 @@ if (isset($_GET['pid'])) {
 }
 
 if ($pid == 0) {
-       $msg->addError('POST_ID_ZERO');
+       $msg->addError('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
@@ -107,7 +107,7 @@ if ($pid == 0) {
 $sql = "SELECT * FROM ".TABLE_PREFIX."forums_threads WHERE post_id=$pid";
 $result = mysql_query($sql,$db);
 if (!($row = mysql_fetch_assoc($result))) {
-       $msg->addError('POST_NOT_FOUND');
+       $msg->addError('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
index 85cd759..8278c78 100644 (file)
@@ -53,7 +53,7 @@ if ($row = mysql_fetch_assoc($result)) {
        $msg->addConfirm($confirm, $hidden_vars);\r
        $msg->printConfirm();\r
 } else {\r
-       $msg->addError('QUESTION_NOT_FOUND');\r
+       $msg->addError('ITEM_NOT_FOUND');\r
 }\r
 \r
 require(AT_INCLUDE_PATH.'footer.inc.php');\r
index 54652ec..a5a9f1c 100644 (file)
@@ -51,7 +51,7 @@ if ($row = mysql_fetch_assoc($result)) {
        $msg->addConfirm($confirm, $hidden_vars);\r
        $msg->printConfirm();\r
 } else {\r
-       $msg->addError('TOPIC_NOT_FOUND');\r
+       $msg->addError('ITEM_NOT_FOUND');\r
 }\r
 \r
 require(AT_INCLUDE_PATH.'footer.inc.php');\r
index 310a9fa..226df6e 100644 (file)
@@ -66,7 +66,7 @@ $onload = 'document.form.topic.focus();';
 require(AT_INCLUDE_PATH.'header.inc.php');
 
 if ($id == 0) {
-       $msg->printErrors('QUESTION_NOT_FOUND');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
@@ -74,7 +74,7 @@ if ($id == 0) {
 $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');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
index 40ae3b2..79169df 100644 (file)
@@ -50,7 +50,7 @@ $onload = 'document.form.name.focus();';
 require(AT_INCLUDE_PATH.'header.inc.php');
 
 if ($id == 0) {
-       $msg->printErrors('TOPIC_NOT_FOUND');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
@@ -58,7 +58,7 @@ if ($id == 0) {
 $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');
+       $msg->printErrorS('ITEM_NOT_FOUND');
        require(AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 } else if (!$_POST['name']) {
index c1d6344..adde43d 100644 (file)
@@ -33,7 +33,7 @@ if (isset($_POST['cancel'])) {
        $_POST['id'] = abs($_POST['id']);\r
 \r
        if (!$_POST['name']) {\r
-               $msg->addError('MISSING_FOLDER_NAME');\r
+               $msg->addError(array('EMPTY_FIELDS', _AT('name')));\r
        }\r
 \r
        if (!$msg->containsErrors()) {\r
index 31e8c0e..2cd9be3 100644 (file)
@@ -272,7 +272,7 @@ else if (query_bit($owner_status, WORKSPACE_AUTH_WRITE) && isset($_POST['submit_
        $_POST['new_folder_name'] = trim($_POST['new_folder_name']);
 
        if (!$_POST['new_folder_name']) {
-               $msg->addError('MISSING_FOLDER_NAME');
+               $msg->addError(array('EMPTY_FIELDS', _AT('name')));
        }
 
        if (!$msg->containsErrors()) {
index 33ba9f6..2b88031 100644 (file)
@@ -40,12 +40,14 @@ if (isset($_POST['cancel'])) {
                $sql = "SELECT folder_id FROM ".TABLE_PREFIX."folders WHERE folder_id=$parent_folder_id AND owner_type=$owner_type AND owner_id=$owner_id";
                $result = mysql_query($sql, $db);
                if (!$row = mysql_fetch_assoc($result)) {
-                       exit('not authenticated');
+                       $msg->addError('ACCESS_DENIED');
+                       header('Location: index.php');
+                       exit;
                }
        }
 
        if (!$_POST['name']) {
-               $msg->addError('NEED_FILENAME');
+               $msg->addError(array('EMPTY_FIELDS', _AT('file_name')));
        }
 
        if (!$msg->containsErrors()) {
index 54a0a29..74b5839 100644 (file)
@@ -54,7 +54,7 @@ if ($row = mysql_fetch_assoc($result)){
                $msg->printConfirm();\r
        }\r
 } else {\r
-       $msg->printErrors('RL_READING_NOT_FOUND');\r
+       $msg->printErrors('ITEM_NOT_FOUND');\r
 }\r
 \r
 require(AT_INCLUDE_PATH.'footer.inc.php');\r
index de13e08..ab34a54 100644 (file)
@@ -53,7 +53,7 @@ if ($row = mysql_fetch_assoc($result)){
        $msg->printConfirm();\r
 }\r
 else {\r
-       $msg->addError('RL_RESOURCE_NOT_FOUND');\r
+       $msg->addError('ITEM_NOT_FOUND');\r
 }\r
 \r
 require(AT_INCLUDE_PATH.'footer.inc.php');\r
index e866c71..0f31078 100644 (file)
@@ -28,7 +28,7 @@ $sql = "SELECT * FROM ".TABLE_PREFIX."external_resources WHERE course_id=$_SESSI
 $result = mysql_query($sql, $db);
 if (!$row = mysql_fetch_assoc($result)) {
        // can't get resource from database
-       $msg->addError('RL_RESOURCE_NOT_FOUND');
+       $msg->addError('ITEM_NOT_FOUND');
        require(AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
index ba831ef..eead30f 100644 (file)
@@ -39,7 +39,7 @@ if (isset($_GET['edit'])) {
                        exit;\r
                }\r
        }\r
-       $msg->addError('RL_READING_NOT_FOUND');\r
+       $msg->addError('ITEM_NOT_FOUND');\r
 } else if (isset($_GET['delete'])) {\r
        if (!isset($_GET['reading'])) {\r
                $msg->addError('NO_ITEM_SELECTED');\r
index 22b3af3..ad8b612 100644 (file)
@@ -39,7 +39,7 @@ if (isset($_POST['restore'], $_POST['backup_id'])) {
        header('Location: edit.php?backup_id=' . $_POST['backup_id']);
        exit;
 } else if (!empty($_POST)) {
-       $msg->addError('DID_NOT_SELECT_A_BACKUP');
+       $msg->addError('NO_ITEM_SELECTED');
 }
 
 require(AT_INCLUDE_PATH.'header.inc.php');
index 28627bc..ec78a2f 100644 (file)
@@ -32,7 +32,7 @@ if (isset($_POST['cancel'])) {
        exit;
 } else if (isset($_POST['submit'])) {
        if (!$_POST['material']) {
-               $msg->addError('RESTORE_MATERIAL');
+               $msg->addError(array('EMPTY_FIELDS', _AT('material')));
        } else {
                $Backup->restore($_POST['material'], $_POST['action'], $_POST['backup_id']);
 
index 20e4be9..048f143 100644 (file)
@@ -125,7 +125,7 @@ if (isset($_POST['savenewfile'])) {
                        exit;
                }
        } else {
-               $msg->addError('NEED_FILENAME');
+               $msg->addError(array('EMPTY_FIELDS', _AT('file_name')));
        }
 }
 
index 9502905..88e2fef 100644 (file)
@@ -30,7 +30,7 @@ if (isset($_POST['rename'])) {
                $msg->addError('NO_FILE_SELECT');
        } else if (count($_POST['check']) != 1) {
                // error: you must select one file/dir to rename
-               $msg->addError('SELECT_ONE_FILE');
+               $msg->addError('NO_ITEM_SELECTED');
        } else {
                header('Location: rename.php?pathext='.urlencode($_POST['pathext']).SEP.'framed='.$framed.SEP.'popup='.$popup.SEP.'oldname='.urlencode($_POST['check'][0]));
                exit;
@@ -41,7 +41,7 @@ if (isset($_POST['rename'])) {
                $msg->addError('NO_FILE_SELECT');
        } else if (count($_POST['check']) != 1) {
                // error: you must select one file/dir to rename
-               $msg->addError('SELECT_ONE_FILE');
+               $msg->addError('NO_ITEM_SELECTED');
        } else {
                $file = $_POST['check'][0];
                header('Location: edit.php?pathext='.urlencode($_POST['pathext']).SEP.'framed='.$framed.SEP.'popup='.$popup.SEP.'file=' . $file);
index 509c7cd..7e4f558 100644 (file)
@@ -25,16 +25,20 @@ if ($_POST['cancel']) {
 
 if (isset($_POST['submit'])) {
        $num_terms = intval($_POST['num_terms']);
+       $missing_fields = array();
 
        for ($i=0; $i<$num_terms; $i++) {
 
                if ($_POST['ignore'][$i] == '') {
+                       $_POST['word'][$i] = trim($_POST['word'][$i]);
+                       $_POST['definition'][$i] = trim($_POST['definition'][$i]);
+
                        if ($_POST['word'][$i] == '') {
-                               $msg->addError('TERM_EMPTY');
+                               $missing_fields[] = _AT('glossary_term');
                        }
 
                        if ($_POST['definition'][$i] == '') {
-                               $msg->addError('DEFINITION_EMPTY');
+                               $missing_fields[] = _AT('glossary_definition');
                        }
 
                        if ($terms_sql != '') {
@@ -58,6 +62,11 @@ if (isset($_POST['submit'])) {
                }
        }
 
+       if ($missing_fields) {
+               $missing_fields = implode(', ', $missing_fields);
+               $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+       }
+
        if (!$msg->containsErrors()) {
                $sql = "INSERT INTO ".TABLE_PREFIX."glossary VALUES $terms_sql";
                $result = mysql_query($sql, $db);
index 0bdfc73..962a094 100644 (file)
@@ -47,7 +47,7 @@ require(AT_INCLUDE_PATH.'header.inc.php');
 $_GET['gid'] = intval($_GET['gid']);\r
 \r
 if ($_GET['gid'] == 0) {\r
-       $msg->printErrors('GLOS_ID_MISSING');\r
+       $msg->printErrors('ITEM_NOT_FOUND');\r
        require(AT_INCLUDE_PATH.'footer.inc.php');\r
        exit;\r
 }\r
index 8323bda..c068493 100644 (file)
@@ -23,13 +23,22 @@ if ($_POST['cancel']) {
 }\r
 \r
 if ($_POST['submit']) {\r
+       $missing_fields = array();\r
+\r
+       $_POST['word'] = trim($_POST['word']);\r
+       $_POST['definition'] = trim($_POST['definition']);\r
 \r
        if ($_POST['word'] == '') {\r
-               $msg->addError('TERM_EMPTY');\r
+               $missing_fields[] = _AT('glossary_term');\r
        }\r
 \r
        if ($_POST['definition'] == '') {\r
-               $msg->addError('DEFINITION_EMPTY');\r
+               $missing_fields[] = _AT('glossary_definition');\r
+       }\r
+\r
+       if ($missing_fields) {\r
+               $missing_fields = implode(', ', $missing_fields);\r
+               $msg->addError(array('EMPTY_FIELDS', $missing_fields));\r
        }\r
 \r
        $_POST['related_term'] = intval($_POST['related_term']);\r
@@ -60,7 +69,7 @@ if ($_POST['submit']) {
 }\r
 \r
 if ($gid == 0) {\r
-       $msg->printErrors('GLOS_ID_MISSING');\r
+       $msg->printErrors('ITEM_NOT_FOUND');\r
        require (AT_INCLUDE_PATH.'footer.inc.php');\r
        exit;\r
 }\r
@@ -70,7 +79,7 @@ $msg->printErrors();
 $result = mysql_query("SELECT * FROM ".TABLE_PREFIX."glossary WHERE word_id=$gid", $db);\r
 \r
 if (!( $row = @mysql_fetch_array($result)) ) {\r
-       $msg->printErrors('TERM_NOT_FOUND');\r
+       $msg->printErrors('ITEM_NOT_FOUND');\r
        require (AT_INCLUDE_PATH.'footer.inc.php');\r
        exit;\r
 }\r
index 3dbe8f7..4004c23 100644 (file)
@@ -60,7 +60,7 @@ require(AT_INCLUDE_PATH.'header.inc.php');
        $row = get_cat_info($cat_id);\r
 \r
        if (empty($row)) {\r
-               $msg->printErrors('CAT_NOT_FOUND');\r
+               $msg->printErrors('ITEM_NOT_FOUND');\r
        } else {\r
                $hidden_vars['cat_name']= $row['name'];\r
                $hidden_vars['cat_id']  = $row['cat_id'];\r
index 73dd9d6..0f9345b 100644 (file)
@@ -45,7 +45,7 @@ $sql = "SELECT * FROM ".TABLE_PREFIX."polls WHERE poll_id=$_GET[pid] AND course_
 \r
 $result = mysql_query($sql,$db);\r
 if (mysql_num_rows($result) == 0) {\r
-       $msg->addError('POLL_NOT_FOUND');\r
+       $msg->addError('ITEM_NOT_FOUND');\r
 } else {\r
        $row = mysql_fetch_assoc($result);\r
 \r
index 1114941..d56ac4c 100644 (file)
@@ -62,7 +62,7 @@ if ($_POST['edit_poll']) {
 require(AT_INCLUDE_PATH.'header.inc.php');
 
        if ($poll_id == 0) {
-               $msg->printErrors('POLL_NOT_FOUND');
+               $msg->printErrors('ITEM_NOT_FOUND');
                require (AT_INCLUDE_PATH.'footer.inc.php');
                exit;
        }
@@ -70,7 +70,7 @@ require(AT_INCLUDE_PATH.'header.inc.php');
        $sql = "SELECT * FROM ".TABLE_PREFIX."polls WHERE poll_id=$poll_id AND course_id=$_SESSION[course_id]";
        $result = mysql_query($sql,$db);
        if (!($row = mysql_fetch_assoc($result))) {
-               $msg->printErrors('POLL_NOT_FOUND');
+               $msg->printErrors('ITEM_NOT_FOUND');
                require (AT_INCLUDE_PATH.'footer.inc.php');
                exit;
        }
index 10590f6..bce2f1c 100644 (file)
@@ -114,7 +114,7 @@ if (isset($_POST['cancel'])) {
 
        if (!($row = mysql_fetch_array($result))){
                require(AT_INCLUDE_PATH.'header.inc.php');
-               $msg->printErrors('QUESTION_NOT_FOUND');
+               $msg->printErrors('ITEM_NOT_FOUND');
                require (AT_INCLUDE_PATH.'footer.inc.php');
                exit;
        }
index 1f40687..6704956 100644 (file)
@@ -78,7 +78,7 @@ if (!isset($_POST['submit'])) {
        $sql    = "SELECT * FROM ".TABLE_PREFIX."tests_questions WHERE question_id=$qid AND course_id=$_SESSION[course_id] AND type=3";
        $result = mysql_query($sql, $db);
        if (!($row = mysql_fetch_assoc($result))){
-               $msg->printErrors('QUESTION_NOT_FOUND');
+               $msg->printErrors('ITEM_NOT_FOUND');
                require (AT_INCLUDE_PATH.'footer.inc.php');
                exit;
        }
index 0111035..4c05de6 100644 (file)
@@ -116,7 +116,7 @@ if (!isset($_POST['submit'])) {
 
        if (!($row = mysql_fetch_array($result))){
                require(AT_INCLUDE_PATH.'header.inc.php');
-               $msg->printErrors('QUESTION_NOT_FOUND');
+               $msg->printErrors('ITEM_NOT_FOUND');
                require (AT_INCLUDE_PATH.'footer.inc.php');
                exit;
        }
index f59391b..8059e73 100644 (file)
@@ -73,7 +73,7 @@ if (!$_POST['submit']) {
        $result = mysql_query($sql, $db);
 
        if (!($row = mysql_fetch_array($result))){
-               $msg->printErrors('QUESTION_NOT_FOUND');
+               $msg->printErrors('ITEM_NOT_FOUND');
                require (AT_INCLUDE_PATH.'footer.inc.php');
                exit;
        }
index 60f6cc8..aa929f2 100644 (file)
@@ -142,7 +142,7 @@ if (!isset($_POST['submit'])) {
        $result = mysql_query($sql, $db);
 
        if (!($row = mysql_fetch_assoc($result))){
-               $msg->printErrors('TEST_NOT_FOUND');
+               $msg->printErrors('ITEM_NOT_FOUND');
                require (AT_INCLUDE_PATH.'footer.inc.php');
                exit;
        }
index cd73d2f..7f9db6e 100644 (file)
@@ -37,7 +37,7 @@ $tid = intval($_GET['tid']);
 $sql = "SELECT title, random, num_questions, instructions FROM ".TABLE_PREFIX."tests WHERE test_id=$tid";
 $result        = mysql_query($sql, $db); 
 if (!($test_row = mysql_fetch_assoc($result))) {
-       $msg->printErrors('TEST_NOT_FOUND');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
index 6f1707d..01582ed 100644 (file)
@@ -38,7 +38,7 @@ if (isset($_POST['submit_yes'])) {
        exit;\r
 } else if (!isset($_GET['catid'])) {\r
        require(AT_INCLUDE_PATH.'header.inc.php');\r
-       $msg->addError('CAT_NOT_FOUND');\r
+       $msg->addError('ITEM_NOT_FOUND');\r
        $msg->printErrors();\r
        require(AT_INCLUDE_PATH.'footer.inc.php');\r
        exit;\r
index 031ee9c..f1d4aa5 100644 (file)
@@ -66,7 +66,7 @@ if (isset($_GET['status']) && ($_GET['status'] != '') && ($_GET['status'] != 2))
 $sql   = "SELECT out_of, anonymous, random, title FROM ".TABLE_PREFIX."tests WHERE test_id=$tid AND course_id=$_SESSION[course_id]";
 $result        = mysql_query($sql, $db);
 if (!($row = mysql_fetch_array($result))){
-       $msg->printErrors('TEST_NOT_FOUND');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
index 3d06f5e..40578a9 100644 (file)
@@ -34,7 +34,7 @@ $result       = mysql_query($sql, $db);
 
 if (!($row = mysql_fetch_array($result))){
        require (AT_INCLUDE_PATH.'header.inc.php');
-       $msg->printErrors('TEST_NOT_FOUND');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
index 28315ba..1f5d900 100644 (file)
@@ -71,7 +71,7 @@ $sql  = "SELECT * FROM ".TABLE_PREFIX."tests WHERE test_id=$tid AND course_id=$_S
 $result        = mysql_query($sql, $db);
 
 if (!($row = mysql_fetch_array($result))){
-       $msg->printErrors('TEST_NOT_FOUND');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require (AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
index 5ea122d..db74d7e 100644 (file)
@@ -38,7 +38,7 @@ $mark_wrong = ' <img src="'.$_base_path.'images/x.gif" alt="'._AT('wrong_answer'
 $sql   = "SELECT * FROM ".TABLE_PREFIX."tests_results WHERE result_id=$rid AND member_id=$_SESSION[member_id]";
 $result        = mysql_query($sql, $db); 
 if (!$row = mysql_fetch_assoc($result)){
-       $msg->printErrors('RESULT_NOT_FOUND');
+       $msg->printErrors('ITEM_NOT_FOUND');
        require(AT_INCLUDE_PATH.'footer.inc.php');
        exit;
 }