Improve alignment in table in mod.html for IE

Missing questions lead to notice rather than fatal error
Attempts report now moved to reports/overview
put in empty regrading page for Julian to complete
Moved some of the styles out of styles.php into standard style
Fixed error on reviewquestion.php
put infobox on reviewquestion.php
fixed <form> tag on item analysis report
This commit is contained in:
gustav_delius
2005-06-04 08:30:49 +00:00
parent 6e296332ca
commit e729020eda
14 changed files with 128 additions and 177 deletions
+2 -2
View File
@@ -1814,7 +1814,7 @@ function print_groupmode_setting($form, $course=NULL) {
if ($course->groupmode or (!$course->groupmodeforce)) {
echo '<tr valign="top">';
echo '<td align="right"><b>'.get_string('groupmode').':</b></td>';
echo '<td>';
echo '<td align="left">';
unset($choices);
$choices[NOGROUPS] = get_string('groupsnone');
$choices[SEPARATEGROUPS] = get_string('groupsseparate');
@@ -1851,7 +1851,7 @@ function print_visible_setting($form, $course=NULL) {
echo '<tr valign="top">';
echo '<td align="right"><b>'.get_string('visibletostudents','',moodle_strtolower($course->students)).':</b></td>';
echo '<td>';
echo '<td align="left">';
unset($choices);
$choices[1] = get_string('show');
$choices[0] = get_string('hide');
+1
View File
@@ -131,6 +131,7 @@ $string['editingshortanswer'] = 'Editing a Short-Answer question';
$string['editingtruefalse'] = 'Editing a True/False question';
$string['editquestions'] = 'Edit questions';
$string['editquiz'] = 'Edit Quiz';
$string['errormissingquestion'] = 'Error: The system is missing the question with id $a';
$string['errornotnumbers'] = 'Error - answers must be numeric';
$string['errorsdetected'] = '$a error(s) detected';
$string['event1'] = 'Autosave';
+3
View File
@@ -390,12 +390,15 @@
if ($table_created) {
echo '</table></td></tr>';
}
if ($submitbutton) {
?>
<tr>
<td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>" />
</td>
</tr>
<?php } ?>
</table>
</form>
+1 -1
View File
@@ -408,7 +408,7 @@ if (self.name == 'editquestion') {
if (! $cm = get_coursemodule_from_instance("quiz", $modform->instance, $course->id)) {
error("Course Module ID was incorrect");
}
notify("$strattemptsexist<br /><a href=\"attempts.php?id=$cm->id\">$strviewallanswers ($usercount $strusers)</a>");
notify("$strattemptsexist<br /><a href=\"report.php?mode=overview&amp;id=$cm->id\">$strviewallanswers ($usercount $strusers)</a>");
echo "<center>\n";
echo "<form target=\"_parent\" method=\"get\" action=\"$CFG->wwwroot/mod/quiz/edit.php\">\n";
+1 -1
View File
@@ -107,7 +107,7 @@
if ($usercount = count_records_select('quiz_attempts', "quiz = '$quiz->id' AND preview = '0'", 'COUNT(DISTINCT userid)')) {
$attemptcount = count_records('quiz_attempts', 'quiz', $quiz->id, 'preview', 0);
$strviewallreports = get_string('viewallreports', 'quiz', $attemptcount);
$gradecol = "<a href=\"attempts.php?q=$quiz->id\">$strviewallreports ($usercount $strusers)</a>";
$gradecol = "<a href=\"report.php?mode=overview&amp;q=$quiz->id\">$strviewallreports ($usercount $strusers)</a>";
} else {
$answercount = 0;
$gradecol = "";
+69 -73
View File
@@ -1,35 +1,6 @@
<!-- This page defines the form to create or edit an instance of this module -->
<!-- It is used from /course/mod.php. The whole instance is available as $form. -->
<!-- Some javascript to allow for the hiding of advanced options
This code was derived from mod.html in the resource module -->
<script language="javascript" type="text/javascript">
function showhide (id, set) {
divobj = document.getElementById(id);
butobj = document.getElementById(id+'button');
prefobj = document.getElementById(id+'pref');
if (set == true) {
if (prefobj.value == '1') {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
} else {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
}
} else {
if (prefobj.value == '1') {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
prefobj.value = '0';
} else {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
prefobj.value = '1';
}
}
}
</script>
<?php
require_once("$CFG->dirroot/mod/quiz/locallib.php");
/// Ensure that all form variables are initialized
@@ -121,7 +92,7 @@
<tr valign="top">
<td align="right"><b><?php print_string("name") ?>:</b></td>
<td>
<td align="left">
<input type="text" name="name" size="40" value="<?php p($form->name) ?>" />
</td>
</tr>
@@ -139,7 +110,7 @@
}
?>
</td>
<td>
<td align="left">
<?php
print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro);
?>
@@ -148,7 +119,7 @@
<tr valign="top">
<td align="right"><b><?php print_string("quizopen", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
if (!$form->timeopen and $course->format == "weeks") {
$form->timeopen = $course->startdate + (($form->section - 1) * 608400);
@@ -162,7 +133,7 @@
<tr valign="top">
<td align="right"><b><?php print_string("quizclose", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
if (!$form->timeclose and $course->format == "weeks") {
$form->timeclose = $course->startdate + (($form->section) * 608400);
@@ -177,7 +148,7 @@
<?php if (!$CFG->quiz_fix_timelimit) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("timelimit", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
print_timer_selector($form->timelimit, get_string("minutes","quiz"));
helpbutton("timelimit", get_string("quiztimer","quiz"), "quiz");
@@ -189,7 +160,7 @@
<?php if (!$CFG->quiz_fix_questionsperpage) { ?>
<tr valign="top">
<td align="right"><b><?php print_string('questionsperpage', 'quiz') ?>:</b></td>
<td>
<td align="left">
<?php
$perpage= array();
for ($i=0; $i<=50; ++$i) {
@@ -207,7 +178,7 @@
<?php if (!$CFG->quiz_fix_shufflequestions) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("shufflequestions", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "shufflequestions", "$form->shufflequestions", "");
helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz");
@@ -219,7 +190,7 @@
<?php if (!$CFG->quiz_fix_shuffleanswers) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("shuffleanswers", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "shuffleanswers", "$form->shuffleanswers", "");
helpbutton("shuffleanswers", get_string("shuffleanswers","quiz"), "quiz");
@@ -231,7 +202,7 @@
<?php if (!$CFG->quiz_fix_attempts) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("attemptsallowed", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($attemptoptions, "attempts", "$form->attempts", "");
helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
@@ -243,7 +214,7 @@
<?php if (!$CFG->quiz_fix_attemptonlast) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("eachattemptbuildsonthelast", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "attemptonlast",
"$form->attemptonlast", "");
@@ -258,7 +229,7 @@
<?php if (!$CFG->quiz_fix_grademethod) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("grademethod", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($QUIZ_GRADE_METHOD, "grademethod", "$form->grademethod", "");
helpbutton("grademethod", get_string("grademethod","quiz"), "quiz");
@@ -270,7 +241,7 @@
<?php if (!$CFG->quiz_fix_adaptive) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("adaptive", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "adaptive", $form->optionflags & QUIZ_ADAPTIVE, "");
helpbutton("adaptive", get_string("adaptive","quiz"), "quiz");
@@ -282,7 +253,7 @@
<?php if (!$CFG->quiz_fix_penaltyscheme) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("penaltyscheme", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "penaltyscheme", "$form->penaltyscheme", "");
helpbutton("penaltyscheme", get_string("penaltyscheme","quiz"), "quiz");
@@ -294,7 +265,7 @@
<?php if (!$CFG->quiz_fix_decimalpoints) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("decimalpoints", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
unset($options);
$options[0] = '0';
@@ -317,7 +288,7 @@
<?php if (!$CFG->quiz_fix_popup) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("popup", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "popup", "$form->popup", "");
helpbutton("popup", get_string("popup","quiz"), "quiz");
@@ -329,7 +300,7 @@
<?php if (!$CFG->quiz_fix_password) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("requirepassword", "quiz") ?>:</b></td>
<td>
<td align="left">
<input type="text" name="password" size="40" value="<?php p($form->password) ?>" />
<?php helpbutton("requirepassword", get_string("requirepassword", "quiz"), "quiz"); ?>
</td>
@@ -339,7 +310,7 @@
<?php if (!$CFG->quiz_fix_subnet) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("requiresubnet", "quiz") ?>:</b></td>
<td>
<td align="left">
<input type="text" name="subnet" size="40" value="<?php p($form->subnet) ?>" />
<?php helpbutton("requiresubnet", get_string("requiresubnet", "quiz"), "quiz"); ?>
</td>
@@ -353,20 +324,48 @@
<?php if ($fix) { ?>
<!-- Now comes a copy of the above but enclosed in a div with id optionsettings and with
the conditions reversed, so that it shows exactly the options that are usually hidden.
The visibility of this div is controlled by javascript. -->
<tr><td colspan="2"><hr /></td></tr>
<tr>
<td align="right"><b><?php print_string('advancedsettings') ?>:</b></td>
<td>
<td align="right"><b><?php print_string('advancedsettings') ?>:</b>
<!-- Some javascript to allow for the hiding of advanced options
This code was derived from mod.html in the resource module -->
<script language="javascript" type="text/javascript">
function showhide (id, set) {
divobj = document.getElementById(id);
butobj = document.getElementById(id+'button');
prefobj = document.getElementById(id+'pref');
if (set == true) {
if (prefobj.value == '1') {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
} else {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
}
} else {
if (prefobj.value == '1') {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
prefobj.value = '0';
} else {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
prefobj.value = '1';
}
}
}
</script>
</td>
<td align="left">
<input type="button" value="hide settings" id="optionsettingsbutton" onclick="javascript: return showhide('optionsettings');" />
<input type="hidden" name="optionsettingspref" id="optionsettingspref" value="<?php echo get_user_preferences('quiz_optionsettingspref', 0); ?>" />
<br />
</td>
</tr>
<!-- Now comes a copy of the options fields in a div with id optionsettings and with
the conditions reversed, so that it shows exactly the options that are usually hidden.
The visibility of this div is controlled by javascript. -->
<tr><td colspan="2">
<div id="optionsettings">
@@ -376,7 +375,7 @@
<?php if ($CFG->quiz_fix_timelimit) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("timelimit", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
print_timer_selector($form->timelimit, get_string("minutes","quiz"));
helpbutton("timelimit", get_string("quiztimer","quiz"), "quiz");
@@ -388,7 +387,7 @@
<?php if ($CFG->quiz_fix_questionsperpage) { ?>
<tr valign="top">
<td align="right"><b><?php print_string('questionsperpage', 'quiz') ?>:</b></td>
<td>
<td align="left">
<?php
$perpage= array();
for ($i=0; $i<=50; ++$i) {
@@ -406,7 +405,7 @@
<?php if ($CFG->quiz_fix_shufflequestions) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("shufflequestions", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "shufflequestions", "$form->shufflequestions", "");
helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz");
@@ -418,7 +417,7 @@
<?php if ($CFG->quiz_fix_shuffleanswers) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("shuffleanswers", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "shuffleanswers", "$form->shuffleanswers", "");
helpbutton("shuffleanswers", get_string("shuffleanswers","quiz"), "quiz");
@@ -430,7 +429,7 @@
<?php if ($CFG->quiz_fix_attempts) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("attemptsallowed", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($attemptoptions, "attempts", "$form->attempts", "");
helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
@@ -441,7 +440,7 @@
<?php if ($CFG->quiz_fix_attemptonlast) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("eachattemptbuildsonthelast", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "attemptonlast",
"$form->attemptonlast", "");
@@ -455,7 +454,7 @@
<?php if ($CFG->quiz_fix_grademethod) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("grademethod", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($QUIZ_GRADE_METHOD, "grademethod", "$form->grademethod", "");
helpbutton("grademethod", get_string("grademethod","quiz"), "quiz");
@@ -467,7 +466,7 @@
<?php if ($CFG->quiz_fix_adaptive) { $fix = 1; ?>
<tr valign="top">
<td align="right"><b><?php print_string("adaptive", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "adaptive", $form->optionflags & QUIZ_ADAPTIVE, "");
helpbutton("adaptive", get_string("adaptive","quiz"), "quiz");
@@ -479,7 +478,7 @@
<?php if ($CFG->quiz_fix_penaltyscheme) { $fix = 1; ?>
<tr valign="top">
<td align="right"><b><?php print_string("penaltyscheme", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "penaltyscheme", "$form->penaltyscheme", "");
helpbutton("penaltyscheme", get_string("penaltyscheme","quiz"), "quiz");
@@ -491,7 +490,7 @@
<?php if ($CFG->quiz_fix_decimalpoints) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("decimalpoints", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
unset($options);
$options[0] = '0';
@@ -514,7 +513,7 @@
<?php if ($CFG->quiz_fix_popup) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("popup", "quiz") ?>:</b></td>
<td>
<td align="left">
<?php
choose_from_menu($yesnooptions, "popup", "$form->popup", "");
helpbutton("popup", get_string("popup","quiz"), "quiz");
@@ -526,7 +525,7 @@
<?php if ($CFG->quiz_fix_password) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("requirepassword", "quiz") ?>:</b></td>
<td>
<td align="left">
<input type="text" name="password" size="40" value="<?php p($form->password) ?>" />
<?php helpbutton("requirepassword", get_string("requirepassword", "quiz"), "quiz"); ?>
</td>
@@ -536,7 +535,7 @@
<?php if ($CFG->quiz_fix_subnet) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("requiresubnet", "quiz") ?>:</b></td>
<td>
<td align="left">
<input type="text" name="subnet" size="40" value="<?php p($form->subnet) ?>" />
<?php helpbutton("requiresubnet", get_string("requiresubnet", "quiz"), "quiz"); ?>
</td>
@@ -546,12 +545,11 @@
</table>
<script language="javascript" type="text/javascript">
showhide('optionsettings', true);
</script>
</div></td></tr>
<?php } else { ?>
<input type="hidden" value="hide settings" id="optionsettingsbutton" />
<input type="hidden" name="optionsettingspref" id="optionsettingspref" value="0" />
<?php } ?>
</table>
@@ -577,6 +575,4 @@
</center>
</form>
<script language="javascript" type="text/javascript">
showhide('optionsettings', true);
</script>
+1 -21
View File
@@ -8,7 +8,7 @@
optional_variable($id); // Course Module ID, or
optional_variable($q); // quiz ID
optional_variable($mode, "simplestat"); // Report mode
optional_variable($mode, "overview"); // Report mode
if ($id) {
if (! $cm = get_record("course_modules", "id", $id)) {
@@ -58,26 +58,6 @@
add_to_log($course->id, "quiz", "report", "report.php?id=$cm->id", "$quiz->id", "$cm->id");
/* Code moved into each plugin report.php
/// Define some strings
$strquizzes = get_string("modulenameplural", "quiz");
$strquiz = get_string("modulename", "quiz");
/// Print the page header
print_header_simple(format_string($quiz->name), "",
"<a href=\"index.php?id=$course->id\">$strquizzes</a>
-> ".format_string($quiz->name),
"", "", true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
/// Print the tabs
$currenttab = 'reports';
include('tabs.php');
*/
/// Open the selected quiz report and display it
$mode = clean_filename($mode);
+3 -4
View File
@@ -1,5 +1,4 @@
<?php // $Id$
/// Item analysis displays a table of quiz questions and their performance
require_once($CFG->libdir.'/tablelib.php');
@@ -9,7 +8,7 @@ class quiz_report extends quiz_default_report {
function display($quiz, $cm, $course) { /// This function just displays the report
global $CFG, $SESSION, $db, $QUIZ_QTYPES;
$strnoquiz = get_string('noquiz','quiz');
$strnoattempts = get_string('noattempts','quiz');
if (!$quiz->questions) {
@@ -39,7 +38,7 @@ class quiz_report extends quiz_default_report {
return true;
}
// set tTable and Analysis stats options
// set Table and Analysis stats options
if(!isset($SESSION->quiz_analysis_table)) {
$SESSION->quiz_analysis_table = array('attemptselection' => 0, 'lowmarklimit' => 0, 'pagesize' => 10);
}
@@ -343,7 +342,7 @@ class quiz_report extends quiz_default_report {
global $CFG, $USER;
echo '<div class="controls">';
echo '<form id="options" name="options" method="report.php" >';
echo '<form id="options" name="options" action="report.php" method="post">';
echo '<p class="quiz-report-options">'.get_string('analysisoptions', 'quiz').': </p>';
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
echo '<input type="hidden" name="q" value="'.$quiz->id.'" />';
+8
View File
@@ -204,6 +204,14 @@
$pagequestions = explode(',', $pagelist);
$number = quiz_first_questionnumber($attempt->layout, $pagelist);
foreach ($pagequestions as $i) {
if (!isset($questions[$i])) {
print_simple_box_start('center', '90%');
echo '<b><font size="+1">' . $number . '</font></b><br />';
notify(get_string('errormissingquestion', 'quiz', $i));
print_simple_box_end();
$number++; // Just guessing that the missing question would have lenght 1
continue;
}
$options = quiz_get_reviewoptions($quiz, $attempt, $isteacher);
$options->validation = QUIZ_EVENTVALIDATE === $states[$i]->event;
$options->history = ($isteacher and !$attempt->preview) ? 'all' : 'graded';
+32 -3
View File
@@ -32,13 +32,13 @@
if (! $attempt = get_record('quiz_attempts', 'id', $attemptid)) {
error('No such attempt ID exists');
}
if (! $neweststate = get_field('quiz_newest_states', 'newest', 'attemptid', $attemptid, 'questionid', $questionid)) {
if (! $neweststateid = get_field('quiz_newest_states', 'newest', 'attemptid', $attemptid, 'questionid', $questionid)) {
// newest_state not set, probably because this is an old attempt from the old quiz module code
if (! $state = get_record('quiz_states', 'question', $questionid, 'attempt', $attemptid)) {
error('Invalid question id');
}
} else {
if (! $state = get_record('quiz_states', 'id', $neweststate->newest)) {
if (! $state = get_record('quiz_states', 'id', $neweststateid)) {
error('Invalid state id');
}
}
@@ -95,7 +95,7 @@
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
/// Print heading
print_heading(format_string($quiz->name));
print_heading(format_string($question->name));
$instance = get_record('quiz_question_instances', 'quiz', $quiz->id, 'question', $question->id);
$question->instance = $instance->id;
@@ -110,6 +110,35 @@
$options->validation = ($state->event == QUIZ_EVENTVALIDATE);
$options->history = 'all';
/// Print infobox
$table->align = array("right", "left");
if ($attempt->userid <> $USER->id) {
// Print user picture and name
$student = get_record('user', 'id', $attempt->userid);
$picture = print_user_picture($student->id, $course->id, $student->picture, false, true);
$table->data[] = array($picture, fullname($student, true));
}
// print quiz name
$table->data[] = array(get_string('modulename', 'quiz').':', format_string($quiz->name));
if ($isteacher and count($attempts = get_records_select('quiz_attempts', "quiz = '$quiz->id' AND userid = '$attempt->userid'", 'attempt ASC')) > 1) {
// print list of attempts
$attemptlist = '';
foreach ($attempts as $at) {
$attemptlist .= ($at->id == $attempt->id)
? '<b>'.$at->attempt.'</b>, '
: '<a href="reviewquestion.php?attempt='.$at->id.'&amp;question='.$question->id.'&amp;number='.$number.'">'.$at->attempt.'</a>, ';
}
$table->data[] = array(get_string('attempts', 'quiz').':', trim($attemptlist, ' ,'));
}
if ($state->timestamp) {
// print time stamp
$table->data[] = array(get_string("completedon", "quiz").':', userdate($state->timestamp));
}
// Print info box unless it is empty
if ($table->data) {
print_table($table);
}
quiz_print_quiz_question($question, $state, $number, $quiz, $options);
print_footer();
-64
View File
@@ -1,43 +1,10 @@
.feedbacktext {
display:block;
}
.quiz-report-title {
text-align: center;
font-weight : bold;
}
body#mod-quiz-attempts table#attempts,
body#mod-quiz-attempts table#commands,
body#mod-quiz-report table#commands,
body#mod-quiz-report table#itemanalysis
{
width: 80%;
margin: auto;
}
body#mod-quiz-attempts table#attempts {
margin: 20px auto;
}
body#mod-quiz-attempts table#attempts .header,
body#mod-quiz-attempts table#attempts .cell
{
padding: 4px;
}
body#mod-quiz-attempts table#attempts .header .commands {
display: inline;
}
body#mod-quiz-attempts table#attempts .picture {
width: 40px;
}
body#mod-quiz-attempts table#attempts td {
border-left-width: 1px;
border-right-width: 1px;
border-left-style: solid;
border-right-style: solid;
vertical-align: bottom;
}
.grade {
font-size: small;
margin-top: 10pt
@@ -45,29 +12,6 @@ body#mod-quiz-attempts table#attempts td {
.gradingdetails {
font-size: small;
}
.feedbacktext {
text-align:right;
}
body#mod-quiz-attempts table#attempts .header {
text-align: left;
}
body#mod-quiz-attempts table#attempts .picture {
text-align: center !important;
}
body#mod-quiz-attempts .controls {
text-align: center;
}
body#mod-quiz-attempts table#attempts td {
border-color: #dddddd;
}
body#mod-quiz-attempts table#attempts .r1 {
background-color: #eeeeee;
}
body#mod-quiz-report table#itemanalysis {
@@ -111,11 +55,3 @@ body#mod-quiz-report table#itemanalysis .qname {
}
body#mod-quiz-report .controls {
text-align: center;
}
.editorhelptext {
font-size:0.7em;
}
+2 -3
View File
@@ -21,20 +21,19 @@
$inactive = array();
$row[] = new tabobject('info', "view.php?q=$quiz->id", get_string('info', 'quiz'));
$row[] = new tabobject('attempts', "attempts.php?q=$quiz->id", get_string('attempts', 'quiz'));
$row[] = new tabobject('reports', "report.php?q=$quiz->id", get_string('reports', 'quiz'));
$row[] = new tabobject('preview', "attempt.php?q=$quiz->id", get_string('preview', 'quiz'));
if (isteacheredit($course->id)) {
$row[] = new tabobject('edit', "edit.php?quizid=$quiz->id", get_string('editquiz', 'quiz'));
//$row[] = new tabobject('update', "$CFG->wwwroot/course/mod.php?update=$cm->id&amp;sesskey=$USER->sesskey", get_string('updatethis', '', get_string('modulename', 'quiz')));
}
$row[] = new tabobject('reports', "report.php?q=$quiz->id", get_string('reports', 'quiz'));
$tabs[] = $row;
if ($currenttab == 'reports' and isset($mode)) {
$inactive[] = 'reports';
$allreports = get_list_of_plugins("mod/quiz/report");
$reportlist = array ('simplestat', 'fullstat'); // Standard reports we want to show first
$reportlist = array ('overview', 'regrade', 'analysis'); // Standard reports we want to show first
foreach ($allreports as $report) {
if (!in_array($report, $reportlist)) {
+1 -1
View File
@@ -119,7 +119,7 @@
$usercount = count_records_select('quiz_attempts', "quiz = '$quiz->id' AND preview = '0'", 'COUNT(DISTINCT userid)');
$strusers = $course->students;
notify("<a href=\"attempts.php?id=$cm->id\">$strviewallanswers ($usercount $strusers)</a>");
notify("<a href=\"report.php?mode=overview&amp;id=$cm->id\">$strviewallanswers ($usercount $strusers)</a>");
print_footer($course);
exit;
}
+4 -4
View File
@@ -1356,10 +1356,12 @@ body#mod-forum-search .introcontent {
.feedbacktext {
display:block;
text-align:right;
}
body#mod-quiz-report table#attempts,
body#mod-quiz-report table#commands
body#mod-quiz-report table#commands,
body#mod-quiz-report table#itemanalysis
{
width: 80%;
margin: auto;
@@ -1383,9 +1385,7 @@ body#mod-quiz-report table#attempts td {
border-right-width: 1px;
border-left-style: solid;
border-right-style: solid;
}
.feedbacktext {
text-align:right;
vertical-align: bottom;
}
body#mod-quiz-report table#attempts .header {
text-align: left;