bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/trunk
|
1
by Henrik G.
First seed of Lenasys ... Needs to be Organized Further |
1 |
<?php
|
2 |
//listQuizAnswers.html.php
|
|
3 |
||
4 |
/*
|
|
5 |
echo "<pre>";
|
|
6 |
print_r($quizAssignmentsList);
|
|
7 |
echo "</pre>";
|
|
8 |
*/
|
|
9 |
||
10 |
addBackLink(array("checkQuizzesLink"=>"", "listQuizzesForCourseOccasionSubmit"=>"","courseName"=>$_POST['courseName'], "courseOccasion"=>$_POST['courseOccasion'])); |
|
11 |
if(isset($quizAssignmentsList)){ |
|
12 |
$counter=0; |
|
13 |
echo "<table class='dataTable'>"; |
|
14 |
echo "<caption>Check quizzes for ".$_POST['courseName']." ".$_POST['courseOccasion']."</caption>"; |
|
15 |
if(count($quizAssignmentsList)>0){ |
|
16 |
echo "<tr><th> </th>"; |
|
17 |
foreach($quizAssignmentsList[0] as $columnName=>$data){ |
|
18 |
echo "<th>".$columnName."</th>"; |
|
19 |
}
|
|
20 |
echo "</tr>"; |
|
21 |
foreach($quizAssignmentsList as $row){ |
|
22 |
$counter++; |
|
23 |
echo "<tr><td>".$counter."</td>"; |
|
24 |
foreach($row as $key=>$data){ |
|
25 |
||
26 |
switch ($key) |
|
27 |
{
|
|
28 |
case 'answer': |
|
29 |
echo "<td>".$data.""; |
|
30 |
echo " |
|
31 |
||
32 |
<form name='displayQuizAnswerForm' action='quiz/quizLoader.php' method='post' target='_blank' >
|
|
33 |
<input type='hidden' name='withAnswer' id='withAnswer' value='on' />
|
|
34 |
<input type='hidden' name='courseName' value='".$_POST['courseName']."' /> |
|
35 |
<input type='hidden' name='quizNr' value='".$row['quizNr']."' /> |
|
36 |
<input type='hidden' name='answerString' value='".$row['answer']."' /> |
|
37 |
<input type='hidden' name='qVarNr' value='".$row['qVarNr']."' /> |
|
38 |
<input type='hidden' name='quizURI' value='".$row['quizURI']."' /> |
|
39 |
<input type='submit' name='displayQuizAnswer' value='Display answer' />
|
|
40 |
</form>
|
|
41 |
||
42 |
<!--<form name='displayQuizAnswerForm' action='.' method='post' style=''>
|
|
43 |
<input type='submit' name='displayQuizAnswer' value='Display answer' disabled='disabled'/>
|
|
44 |
<input type='hidden' name='courseOccasion' value='".$_POST['courseOccasion']."' /> |
|
45 |
<input type='hidden' name='courseName' value='".$_POST['courseName']."' /> |
|
46 |
<input type='hidden' name='quizNr' value='".$row['quizNr']."' /> |
|
47 |
<input type='hidden' name='qVarNr' value='".$row['qVarNr']."' /> |
|
48 |
<input type='hidden' name='answer' value='".$row['answer']."' /> |
|
49 |
<input type='hidden' name='checkQuizzesLink' />
|
|
50 |
<input type='hidden' name='checkSelectedQuiz' />
|
|
51 |
</form>-->
|
|
52 |
</td>"; |
|
53 |
break; |
|
54 |
case 'answerHash': |
|
55 |
echo "<td>".substr($data,0,8)."</td>"; |
|
56 |
break; |
|
57 |
case 'grade': |
|
58 |
echo "<td> |
|
59 |
<form name='saveGradeForm' action='.' method='post'>
|
|
60 |
<input type='text' name='grade' "; |
|
61 |
echo "value='".$row['grade']."' "; |
|
62 |
echo "/> |
|
63 |
<input type='submit' name='saveGrade' value='Save' />
|
|
64 |
<input type='hidden' name='courseOccasion' value='".$_POST['courseOccasion']."' /> |
|
65 |
<input type='hidden' name='courseName' value='".$_POST['courseName']."' /> |
|
66 |
<input type='hidden' name='quizNr' value='".$row['quizNr']."' /> |
|
67 |
<input type='hidden' name='qVarNr' value='".$row['qVarNr']."' /> |
|
68 |
<input type='hidden' name='ssn' value='".$row['ssn']."' /> |
|
69 |
<input type='hidden' name='checkQuizzesLink' />
|
|
70 |
<input type='hidden' name='checkSelectedQuiz' />
|
|
71 |
<input type='hidden' name='scrolly' id='scrolly' value='0' />
|
|
72 |
</form>"; |
|
73 |
if(isset($gradeSavedMsg) && isset($gradeSavedMsg) && $gradeSavedForSSN==$row['ssn']) echo "<p style='margin:-17px 3px 0 0;font-size:0.7em;float:right'>".$gradeSavedMsg."</p>"; |
|
74 |
echo "</td>"; |
|
75 |
break; |
|
76 |
case 'gradeComment': |
|
77 |
echo "<td> |
|
78 |
<form name='saveGradeCommentForm' action='.' method='post'>
|
|
79 |
<textarea cols='16' rows='1' name='gradeComment' style='height:18px;padding-left:5px;padding-right:5px;' >"; |
|
80 |
echo $row['gradeComment']; |
|
81 |
echo "</textarea> |
|
82 |
<input type='submit' name='saveGradeComment' value='Save' />
|
|
83 |
<input type='hidden' name='courseOccasion' value='".$_POST['courseOccasion']."' /> |
|
84 |
<input type='hidden' name='courseName' value='".$_POST['courseName']."' /> |
|
85 |
<input type='hidden' name='quizNr' value='".$row['quizNr']."' /> |
|
86 |
<input type='hidden' name='qVarNr' value='".$row['qVarNr']."' /> |
|
87 |
<input type='hidden' name='ssn' value='".$row['ssn']."' /> |
|
88 |
<input type='hidden' name='checkQuizzesLink' />
|
|
89 |
<input type='hidden' name='checkSelectedQuiz' />
|
|
90 |
<input type='hidden' name='scrolly' id='scrolly' value='0' />
|
|
91 |
</form>"; |
|
92 |
if(isset($gradeCommentSavedMsg)) echo "<p style='margin:-17px 3px 0 0;font-size:0.7em;float:right'>".$gradeCommentSavedMsg."</p>"; |
|
93 |
echo "</td>"; |
|
94 |
break; |
|
95 |
case 'quizURI': |
|
96 |
break; |
|
97 |
default: |
|
98 |
echo "<td>".$data."</td>"; |
|
99 |
}
|
|
100 |
}
|
|
101 |
||
102 |
||
103 |
echo "<td> |
|
104 |
<form name='displayQuizAnswerDetailsForm' action='.' method='post'>
|
|
105 |
<input type='submit' name='displayQuizAnswerDetails' value='Detailed view' />
|
|
106 |
<input type='hidden' name='courseOccasion' value='".$_POST['courseOccasion']."' /> |
|
107 |
<input type='hidden' name='courseName' value='".$_POST['courseName']."' /> |
|
108 |
<input type='hidden' name='quizNr' value='".$row['quizNr']."' /> |
|
109 |
<input type='hidden' name='qVarNr' value='".$row['qVarNr']."' /> |
|
110 |
<input type='hidden' name='ssn' value='".$row['ssn']."' /> |
|
111 |
<input type='hidden' name='checkQuizzesLink' />
|
|
112 |
<input type='hidden' name='checkSelectedQuiz' />
|
|
113 |
</form>
|
|
114 |
</td>"; |
|
115 |
/*echo "<td>
|
|
116 |
<form name='editSelectedQuizForm' action='.' method='post'>
|
|
117 |
<input type='text' name='gradeComment' />
|
|
118 |
<input type='submit' name='saveGradeComment' value='Save' />
|
|
119 |
<input type='hidden' name='courseOccasion' value='".$_POST['courseOccasion']."' />
|
|
120 |
<input type='hidden' name='courseName' value='".$_POST['courseName']."' />
|
|
121 |
<input type='hidden' name='quizNr' value='".$_POST['quizNr']."' />
|
|
122 |
<input type='hidden' name='qVarNr' value='".$_POST['qVarNr']."' />
|
|
123 |
<input type='hidden' name='ssn' value='".$_POST['ssn']."' />
|
|
124 |
<input type='hidden' name='checkQuizzesLink' />
|
|
125 |
<input type='hidden' name='checkSelectedQuiz' />
|
|
126 |
</form>
|
|
127 |
</td>";
|
|
128 |
echo "<td>
|
|
129 |
<form name='editSelectedQuizForm' action='.' method='post'>
|
|
130 |
<input type='text' name='gradeComment' />
|
|
131 |
<input type='submit' name='saveGradeComment' value='Save' />
|
|
132 |
<input type='hidden' name='courseOccasion' value='".$_POST['courseOccasion']."' />
|
|
133 |
<input type='hidden' name='courseName' value='".$_POST['courseName']."' />
|
|
134 |
<input type='hidden' name='quizNr' value='".$_POST['quizNr']."' />
|
|
135 |
<input type='hidden' name='qVarNr' value='".$_POST['qVarNr']."' />
|
|
136 |
<input type='hidden' name='ssn' value='".$_POST['ssn']."' />
|
|
137 |
<input type='hidden' name='checkQuizzesLink' />
|
|
138 |
<input type='hidden' name='checkSelectedQuiz' />
|
|
139 |
</form>
|
|
140 |
</td>";*/
|
|
141 |
||
142 |
echo "</tr>"; |
|
143 |
}
|
|
144 |
} else { |
|
145 |
echo "<tr><td>This quiz has not been assigned to any student</td></tr>"; |
|
146 |
}
|
|
147 |
echo "</table>"; |
|
148 |
}
|
|
149 |
?>
|