Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv22414/mod/math_assignment
Modified Files:
aimpage.php lib.php
Log Message:
now never hides quizzes or subjects from teacher
Index: aimpage.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/aimpage.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** aimpage.php 24 Sep 2003 13:22:22 -0000 1.13
--- aimpage.php 30 Sep 2003 07:22:05 -0000 1.14
***************
*** 75,79 ****
else if (strcasecmp($aimaction, "edit") == 0) { // load the edit quiz page
$postdata = math_assignment_add_arg_to_url_data($postdata, "Command","admin/Quiz");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "Action", "LoadQuizOptions");
$postdata = math_assignment_add_arg_to_url_data($postdata, "QuizName", $math_assignment->aimquiz);
$postdata = math_assignment_add_arg_to_url_data($postdata, "Password", $subject->password);
--- 75,80 ----
else if (strcasecmp($aimaction, "edit") == 0) { // load the edit quiz page
$postdata = math_assignment_add_arg_to_url_data($postdata, "Command","admin/Quiz");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "Action", "ShowHiddenQuestions");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "ShowHiddenQuestions", "true");
$postdata = math_assignment_add_arg_to_url_data($postdata, "QuizName", $math_assignment->aimquiz);
$postdata = math_assignment_add_arg_to_url_data($postdata, "Password", $subject->password);
***************
*** 87,91 ****
else if (strcasecmp($aimaction, "subject") == 0) { // load the edit subject page
$postdata = math_assignment_add_arg_to_url_data($postdata, "Command","admin/Subject");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "Action", "LoadSubjectOptions");
$postdata = math_assignment_add_arg_to_url_data($postdata, "QuizName", $math_assignment->aimquiz);
$postdata = math_assignment_add_arg_to_url_data($postdata, "Password", $subject->password);
--- 88,93 ----
else if (strcasecmp($aimaction, "subject") == 0) { // load the edit subject page
$postdata = math_assignment_add_arg_to_url_data($postdata, "Command","admin/Subject");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "Action", "ShowHiddenQuizzes");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "ShowHiddenQuizzes", "true");
$postdata = math_assignment_add_arg_to_url_data($postdata, "QuizName", $math_assignment->aimquiz);
$postdata = math_assignment_add_arg_to_url_data($postdata, "Password", $subject->password);
***************
*** 124,136 ****
}
}
// special case for changing the output type
if (count($_POST) == 2) {
if (array_key_exists("outputchange", $_POST) && array_key_exists("postdata", $_POST)) {
if (strcmp($_POST['outputchange'], "html") == 0 || strcmp($_POST['outputchange'], "xml") == 0) {
! // set the cookie
! setcookie("output", $_POST['outputchange'], 0x7FFFFFFF);
! $_COOKIE['output'] = $_POST['outputchange'];
! $postdata = $_POST['postdata'];
! $_POST = array();
}
}
--- 126,141 ----
}
}
+ // and never hide things from the teacher
+ $postdata = math_assignment_add_arg_to_url_data($postdata, "ShowHiddenQuestions", "true");
+
// special case for changing the output type
if (count($_POST) == 2) {
if (array_key_exists("outputchange", $_POST) && array_key_exists("postdata", $_POST)) {
if (strcmp($_POST['outputchange'], "html") == 0 || strcmp($_POST['outputchange'], "xml") == 0) {
! // set the cookie
! setcookie("output", $_POST['outputchange'], 0x7FFFFFFF);
! $_COOKIE['output'] = $_POST['outputchange'];
! $postdata = $_POST['postdata'];
! $_POST = array();
}
}
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** lib.php 29 Sep 2003 22:25:59 -0000 1.33
--- lib.php 30 Sep 2003 07:22:05 -0000 1.34
***************
*** 690,694 ****
// Remove unwanted links
$unwanted = array(">Download<",">Browse source<",">Edit home page<",">Download results<",
! ">Edit register<",">Student details<");
$out = str_replace($unwanted,"><",$out);
--- 690,694 ----
// Remove unwanted links
$unwanted = array(">Download<",">Browse source<",">Edit home page<",">Download results<",
! ">Edit register<",">Student details<",">Hide hidden quizzes<",">Hide hidden questions<");
$out = str_replace($unwanted,"><",$out);
|