From: Chris S. <san...@us...> - 2005-10-11 17:35:33
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26708 Modified Files: analysis.php editquiz.php editsubject.php quiz.php user.php Log Message: Index: analysis.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/analysis.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** analysis.php 29 Aug 2005 18:41:03 -0000 1.19 --- analysis.php 11 Oct 2005 17:35:38 -0000 1.20 *************** *** 81,86 **** // Carry out the analysis requested in $_POST //////////////////////////////////////////////// ! echo '<h1>Analysis of answers to a single question</h1>'; ! if (''!= $questionID and '(none)' != $questionID) { if ( 'ALL' != $questionID ) { --- 81,86 ---- // Carry out the analysis requested in $_POST //////////////////////////////////////////////// ! echo '<h1>'.get_string('FE_analysis_choose_title','stack','').'</h1>'; ! if (''!= $questionID and '(none)' != $questionID) { if ( 'ALL' != $questionID ) { *************** *** 102,113 **** $qkw = stripslashes($row[3]); ! echo "<p> <b>Analysis for the following question:</b> </p>"; echo "<hr /><table> ! <tr> <td> <b>Question:</b> </td> <td> $qname (ID: {$row[0]} ) </td> </tr> ! <tr> <td> <b>Description:</b> </td> <td> $qdes </td> </tr> ! <tr> <td> <b>Keywords: </b> </td> <td> $qkw </td> </tr> </table><hr />"; --- 102,113 ---- $qkw = stripslashes($row[3]); ! echo '<p><b>'.get_string('FE_analysis_qu_title','stack','').'</b></p>'; echo "<hr /><table> ! <tr> <td> <b>".get_string('stackQuestion_questionName','stack','').":</b> </td> <td> $qname (ID: {$row[0]} ) </td> </tr> ! <tr> <td> <b>".get_string('stackQuestion_questionDescription','stack','').":</b> </td> <td> $qdes </td> </tr> ! <tr> <td> <b>".get_string('stackQuestion_questionKeywords','stack','').":</b> </td> <td> $qkw </td> </tr> </table><hr />"; *************** *** 115,119 **** } } else { ! echo "<p><font color=\"red\">This is an error: this question should exist but does not!</font></p>"; } } --- 115,119 ---- } } else { ! echo "<p><font color=\"red\">".get_string('FE_analysis_qu_err','stack','')."</font></p>"; } } *************** *** 136,140 **** // Who's answer are we permitted to view? if ('admin' != $user['username']) { ! echo "<p><font color='red'>Warning!</font> You are not the admin user and so may only view attempts by guests."; $query .= " AND userID = 0 "; } else { --- 136,140 ---- // Who's answer are we permitted to view? if ('admin' != $user['username']) { ! echo '<p>'.get_string('FE_analysis_qu_notadmin','stack','').'</p>'; $query .= " AND userID = 0 "; } else { *************** *** 213,218 **** if (0 != mysql_num_rows($questions)) { ! echo "<table>\n"; ! echo " <tr><th><b>ID</b></th><th><b>questionNote</b></th><th><b>RawAns</b></th><th><b>Count</b></th></tr>"; // Various variables to only print out each questionID once. $qi = ''; --- 213,220 ---- if (0 != mysql_num_rows($questions)) { ! echo "<table>\n <tr>\n <th><b>ID</b></th>\n"; ! echo " <th><b>".get_string('stackQuestion_questionNote','stack','')."</b></th>\n"; ! echo " <th><b>".get_string('ShowAt_RawAns','stack','')."</b></th>\n"; ! echo " <th><b>".get_string('Count','stack','')."</b></th>\n </tr>\n"; // Various variables to only print out each questionID once. $qi = ''; *************** *** 283,289 **** ! echo "<hr /><p>Enter the information for the student answers that you would like to see:</p>\n ! <form name='stackanalysisform' action='' method='POST'>\n"; ! echo "<table>\n"; --- 285,291 ---- ! echo "<hr /><p>"; ! echo get_string('FE_analysis_choose_info','stack',''); ! echo "</p>\n<form name='stackanalysisform' action='' method='POST'>\n"; echo "<table>\n"; *************** *** 302,318 **** if(0 != mysql_num_rows($questions)) { ! echo "<tr><td><span id=SectionText>QuestionID</span></td>\n"; echo "<td><select name=\"questionID\">\n"; if (''==$questionID or '(none)' == $questionID ) { ! echo " <option value=\"(none)\" selected>(none)</option>\n"; } else { ! echo " <option value=\"(none)\">(none)</option>\n"; } if ('ALL' == $questionID ) { ! echo " <option value=\"ALL\" selected>ALL</option>\n"; } else { ! echo " <option value=\"ALL\" >ALL</option>\n"; } --- 304,320 ---- if(0 != mysql_num_rows($questions)) { ! echo '<tr><td>'.get_string('stackQuestion_questionID','stack','')."</td>\n"; echo "<td><select name=\"questionID\">\n"; if (''==$questionID or '(none)' == $questionID ) { ! echo " <option value=\"(none)\" selected>".get_string('FE_(none)','stack','')."</option>\n"; } else { ! echo " <option value=\"(none)\">".get_string('FE_(none)','stack','')."</option>\n"; } if ('ALL' == $questionID ) { ! echo " <option value=\"ALL\" selected>".get_string('FE_ALL','stack','')."</option>\n"; } else { ! echo " <option value=\"ALL\" >".get_string('FE_ALL','stack','')."</option>\n"; } *************** *** 338,346 **** } ! echo "<tr><td><span id=SectionText>Action requested</span></td>\n"; echo "<td><select name=\"actionreq\">\n ! <option value='any' ".nsf($s,'any').">Any</option>\n ! <option value='validate' ".nsf($s,'validate').">Validate</option>\n ! <option value='mark' ".nsf($s,'mark').">Mark</option></select></td></tr>"; --- 340,348 ---- } ! echo "<tr><td>".get_string('FE_analysis_action','stack','')."</span></td>\n"; echo "<td><select name=\"actionreq\">\n ! <option value='any' ".nsf($s,'any').">".get_string('FE_Any','stack','')."</option>\n ! <option value='validate' ".nsf($s,'validate').">".get_string('Validate','stack','')."</option>\n ! <option value='mark' ".nsf($s,'mark').">".get_string('Mark','stack','')."</option></select></td></tr>"; *************** *** 353,361 **** } ! echo "<tr><td><span id=SectionText>Valid</span></td>\n"; echo "<td><select name=\"Valid\">\n ! <option value='any' ".nsf($s,'any').">Any</option>\n ! <option value='true' ".nsf($s,'true').">Valid only</option>\n ! <option value='false' ".nsf($s,'false').">Invalid only</option></select></td></tr>"; // Add mark --- 355,363 ---- } ! echo "<tr><td>".get_string('Valid','stack','')."</td>\n"; echo "<td><select name=\"Valid\">\n ! <option value='any' ".nsf($s,'any').">".get_string('FE_Any','stack','')."</option>\n ! <option value='true' ".nsf($s,'true').">".get_string('FE_Valid_only','stack','')."</option>\n ! <option value='false' ".nsf($s,'false').">".get_string('FE_Invalid_only','stack','')."</option></select></td></tr>"; // Add mark *************** *** 367,386 **** } ! echo "<tr><td><span id=SectionText>Marks obtained</span></td>\n"; echo "<td><select name=\"RawMark\">\n ! <option value='any' ".nsf($s,'any').">Any</option>\n ! <option value='full' ".nsf($s,'full').">Full marks</option>\n ! <option value='partial' ".nsf($s,'partial').">Not full marks</option>\n ! <option value='nonzero' ".nsf($s,'nonzero').">Non zero</option> ! <option value='zero' ".nsf($s,'zero').">Zero</option> </select></td></tr> ! <tr><td>Start time</td> <td><input type='text' name='StartTime' value='$stimestr' size='30' /> ! eg 'Oct 17 2004 16:34', or 'now -1 day'</td></tr> ! <tr><td>End time</td> <td><input type='text' name='EndTime' value='$etimestr' size='30' /></td></tr> </table>\n ! <input type=\"submit\" name=\"action\" value=\"Analysis\"> </form>"; --- 369,388 ---- } ! echo "<tr><td>".get_string('FE_analysis_qu_mark','stack','')."</td>\n"; echo "<td><select name=\"RawMark\">\n ! <option value='any' ".nsf($s,'any').">".get_string('FE_Any','stack','')."</option>\n ! <option value='full' ".nsf($s,'full').">".get_string('FE_analysis_qu_mark_full','stack','')."</option>\n ! <option value='partial' ".nsf($s,'partial').">".get_string('FE_analysis_qu_mark_nfm','stack','')."</option>\n ! <option value='nonzero' ".nsf($s,'nonzero').">".get_string('FE_analysis_qu_mark_nz','stack','')."</option> ! <option value='zero' ".nsf($s,'zero').">".get_string('FE_analysis_qu_mark_zm','stack','')."</option> </select></td></tr> ! <tr><td>".get_string('FE_analysis_qu_start','stack','')."</td> <td><input type='text' name='StartTime' value='$stimestr' size='30' /> ! ".get_string('FE_analysis_qu_start_ex','stack','')."</td></tr> ! <tr><td>".get_string('FE_analysis_qu_end','stack','')."</td> <td><input type='text' name='EndTime' value='$etimestr' size='30' /></td></tr> </table>\n ! <input type=\"submit\" name=\"action\" value=\"".get_string('FE_analysis_qu_button','stack','')."\"> </form>"; Index: editsubject.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editsubject.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editsubject.php 4 Sep 2005 21:26:18 -0000 1.2 --- editsubject.php 11 Oct 2005 17:35:38 -0000 1.3 *************** *** 128,132 **** //////////////////////////////////////////////// ! echo "<h1>Subject page</h1>"; // (3.1) Display any errors. --- 128,132 ---- //////////////////////////////////////////////// ! echo '<h1>'.get_string('FE_subject_title','stack','').'</h1>'; // (3.1) Display any errors. *************** *** 139,143 **** case 'subject_xml': { ! echo "<p>Please download the file <a href='{$stack_web_url}tmp/{$name}'>$name</a>.</p>"; } case 'subject_choose': --- 139,143 ---- case 'subject_xml': { ! echo '<p>'.get_string('FE_quiz_download','stack',''). "<a href='{$stack_web_url}tmp/{$name}'>$name</a>.</p>"; } case 'subject_choose': Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** editquiz.php 4 Sep 2005 21:26:18 -0000 1.22 --- editquiz.php 11 Oct 2005 17:35:38 -0000 1.23 *************** *** 150,154 **** //////////////////////////////////////////////// ! echo "<h1>Quiz page</h1>"; // (3.1) Display any errors. --- 150,154 ---- //////////////////////////////////////////////// ! echo '<h1>'.get_string('FE_quiz_title','stack','').'</h1>'; // (3.1) Display any errors. *************** *** 161,165 **** case 'quiz_xml': { ! echo "<p>Please download the file <a href='{$stack_web_url}tmp/{$name}'>$name</a>.</p>"; } case 'quiz_choose': --- 161,165 ---- case 'quiz_xml': { ! echo '<p>'.get_string('FE_quiz_download','stack',''). "<a href='{$stack_web_url}tmp/{$name}'>$name</a>.</p>"; } case 'quiz_choose': Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** quiz.php 19 Sep 2005 08:23:22 -0000 1.42 --- quiz.php 11 Oct 2005 17:35:38 -0000 1.43 *************** *** 145,152 **** if (NULL == $quiz_questions) { $action = 'quiz_error'; ! $error['quiz'] = 'There are no questions in this quiz! Please contact your administrator.'; } } ! } // (4.4) At this point we should have a $quiz and $quizInst to work on. --- 145,153 ---- if (NULL == $quiz_questions) { $action = 'quiz_error'; ! $error['quiz'] = get_string('FE_quiz_no_questions','stack',''); } } ! } ! // (4.4) At this point we should have a $quiz and $quizInst to work on. *************** *** 234,240 **** } } // end foreach } else if ('review' == $action) { // We have not attempted the quiz $action = 'quiz_error'; ! $error['quiz'] = 'There are no attempts at this quiz.'; } else { $action='new_quiz_version'; --- 235,242 ---- } } // end foreach + } else if ('review' == $action) { // We have not attempted the quiz $action = 'quiz_error'; ! $error['quiz'] = get_string('FE_quiz_no_atttempts','stack',''); } else { $action='new_quiz_version'; Index: user.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/user.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** user.php 19 Sep 2005 08:23:22 -0000 1.11 --- user.php 11 Oct 2005 17:35:38 -0000 1.12 *************** *** 65,80 **** switch ($action) { case 'none': ! echo "<h1>User management</h1>\n Note, there is no 'undo' option."; echo "<form name='stackuserform' action='' method='POST'>\n"; echo "<table>"; stack_user_select_formfrag($userID,FALSE); $s[$action] = 'selected'; ! echo "<td>Action</td>"; echo "<td><select name=\"action\">\n ! <option value='review' {nsf($s,'review')}>Review</option> ! <option value='userupdate_choose' {nsf($s,'update')}>Update</option> ! <option value='delete' {nsf($s,'delete')}>Delete</option></select></td></tr>"; echo "</table>"; ! echo "<input type=\"submit\" name=\"submit\" value=\"Submit\">"; echo "</form>"; break; --- 65,80 ---- switch ($action) { case 'none': ! echo '<h1>'.get_string('FE_user_title','stack','')."</h1>\n<p>".get_string('FE_user_title_warn','stack','').'</p>'; echo "<form name='stackuserform' action='' method='POST'>\n"; echo "<table>"; stack_user_select_formfrag($userID,FALSE); $s[$action] = 'selected'; ! echo "<td>".get_string('FE_user_action','stack','')."</td>"; echo "<td><select name=\"action\">\n ! <option value='review' {nsf($s,'review')}>".get_string('FE_user_action_review','stack','')."</option> ! <option value='userupdate_choose' {nsf($s,'update')}>".get_string('FE_user_action_update','stack','')."</option> ! <option value='delete' {nsf($s,'delete')}>".get_string('FE_user_action_delete','stack','')."</option></select></td></tr>"; echo "</table>"; ! echo "<input type=\"submit\" name=\"submit\" value=\"".get_string('FE_user_action_submit','stack','')."\">"; echo "</form>"; break; *************** *** 91,97 **** $name = "{$user_stu['username']} ({$user_stu['firstname']} {$user_stu['lastname']})"; ! echo "<h1>Review the work of $name</h1>\n\n"; ! echo "<p>\n<b>Subjects</b>\n\n"; foreach ($subject_store as $subject) { $subjectID = $subject['subjectID']; --- 91,97 ---- $name = "{$user_stu['username']} ({$user_stu['firstname']} {$user_stu['lastname']})"; ! echo '<h1>'.get_string('FE_user_review','stack',$name)."</h1>\n\n"; ! echo "<p>\n<b>".get_string('stackSubject_subjectName','stack','')."</b>\n\n"; foreach ($subject_store as $subject) { $subjectID = $subject['subjectID']; *************** *** 112,116 **** case 'delete': stack_db_user_delete($user_stu); ! echo "User deleted permanently. There is no 'undo' option."; break;} --- 112,116 ---- case 'delete': stack_db_user_delete($user_stu); ! echo get_string('FE_user_deleted','stack',''); break;} |