예제 #1
0
                        //echo "Exam is Over - Practical Instructions Available <br/>";
                        examStatus(array(5));
                    } else {
                        // Starttime to + 30 mins
                        examStatus(array(4));
                    }
                    displayExamInfo($record, $exam_length);
                } else {
                    //echo "Your Exam is OVER - Practical is Over - View Grades<br />";
                    if ($record->grade1 != null) {
                        examStatus(array(6));
                    } else {
                        examStatus(array(0));
                    }
                    displayExamInfo($record, $exam_length);
                    showGrades($record);
                }
            }
        }
    }
    echo "<hr/>";
}
print_footer('Register');
// Please do not modify this line
?>

<?php 
function displayExamInfo($record, $diff)
{
    // Diff is time in minutes
    echo "<b>" . date("l dS \\of F Y", $record->starttime) . "</b> <br/>";
                         $prevExam .= "<tr><td valign='top'>";
                         $prevExam .= displayInfo($record, $exam_length, true);
                         $prevExam .= "</td></tr>";
                         $prevExam .= "<tr><td>";
                         // Print Status - Checks if the exam was taken, via the quiz grade
                         if ($record->status == "Graded" || $record->grade1 != null && $record->status == "Implementation") {
                             $prevExam .= examStatus($record, array(6), "", true);
                         } else {
                             $prevExam .= examStatus($record, array(0), "", true);
                         }
                         $prevExam .= "</td></tr>";
                         $prevExam .= "<tr><td>";
                         $prevExam .= displayExamInfo($record, $exam_length, true);
                         $prevExam .= "</td></tr>";
                         $prevExam .= "<tr><td>";
                         $prevExam .= showGrades($record, true);
                         $prevExam .= "</td></tr>";
                         $prevExam .= "</table>";
                         // End Structure
                         $prevExam .= "<hr/>";
                         // -- old
                         //$quiz = get_record('quiz', 'id', $record->quizid);
                         //$prevExam .= "<div><b>".$quiz->name.": </b>";
                         //$prevExam .= $record->grade1."/".$quiz->sumgrades;
                         //$prevExam .= " | <a href='$CFG->wwwroot/mod/quiz/review.php?attempt=$record->attemptid'>Summary</a></div>";
                     }
                 }
             }
         }
     }
 }
예제 #3
0
파일: gradebook.php 프로젝트: anfleene/N342
<?php

error_reporting(0);
include "includes/header.inc";
?>
<div id="content">
  <div id="errorFlash" class="error" style="display:none"></div>
  <?php 
if (filter_input_array(INPUT_POST)) {
    $inputGrades = getGrades();
    $AvgGrades = calcGrades($inputGrades);
    showGrades($AvgGrades, $inputGrades);
    printForm($inputGrades);
} else {
    printForm();
}
?>
</div>
<?php 
include "includes/footer.inc";
?>

<?php 
// function defs
function getGrades()
{
    $formData = filter_input_array(INPUT_POST);
    $grades = array();
    for ($i = 0; $i < count($formData["name"]); $i++) {
        $grades[] = array("name" => $formData["name"][$i], "points_poss" => $formData["points_poss"][$i], "points_earned" => $formData["points_earned"][$i], "assignment_type" => $formData["assignment_type"][$i]);
    }