Preview how many responses have been made (for teacher)
This commit is contained in:
+1
-1
@@ -14,5 +14,5 @@ $string[notanswered] = "Not answered yet";
|
||||
$string[responses] = "Responses";
|
||||
$string[responsesto] = "Responses to \$a";
|
||||
$string[savemychoice] = "Save my choice";
|
||||
$string[viewallresponses] = "View all responses";
|
||||
$string[viewallresponses] = "View \$a responses";
|
||||
?>
|
||||
|
||||
+6
-1
@@ -66,7 +66,12 @@
|
||||
update_module_icon($cm->id, $course->id));
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
echo "<P align=right><A HREF=\"report.php?id=$cm->id\">".get_string("viewallresponses", "choice")."</A></P>";
|
||||
if ( $allanswers = get_records("choice_answers", "choice", $choice->id)) {
|
||||
$responsecount = count($allanswers);
|
||||
} else {
|
||||
$responsecount = 0;
|
||||
}
|
||||
echo "<P align=right><A HREF=\"report.php?id=$cm->id\">".get_string("viewallresponses", "choice", $responsecount)."</A></P>";
|
||||
}
|
||||
|
||||
print_simple_box( text_to_html($choice->text) , "center");
|
||||
|
||||
Reference in New Issue
Block a user