Ejemplo n.º 1
0
     * Add PlotKit to the beginning of the $HEAD array.
     */
    array_unshift($HEAD, "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/MochiKit/MochiKit.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/excanvas.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/Base.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/Layout.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/Canvas.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/SweetCanvas.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/EasyPlot.js\"></script>");
    if ($COURSE_ID) {
        $query = "SELECT * FROM `courses` \n\t\t\t\t\tWHERE `course_id` = " . $db->qstr($COURSE_ID) . "\n\t\t\t\t\tAND `course_active` = '1'";
        $course_details = $db->GetRow($query);
        if ($course_details && $ENTRADA_ACL->amIAllowed(new GradebookResource($course_details["course_id"], $course_details["organisation_id"]), "read")) {
            $query = "  SELECT a.*, b.`cohort`, c.`id` AS `marking_scheme_id`, c.`handler`, c.`description` as `marking_scheme_description`\n                        FROM `assignments` AS a\n                        JOIN `assessments` AS b\n                        ON a.`assessment_id` = b.`assessment_id`\n                        LEFT JOIN `assessment_marking_schemes` AS c\n                        ON c.`id` = b.`marking_scheme_id`\n                        WHERE a.`assignment_id` = " . $db->qstr($ASSIGNMENT_ID) . "\n                        AND b.`active` = 1\n                        AND a.`assignment_active` = '1'";
            $assignment = $db->GetRow($query);
            if ($assignment) {
                $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook/assessments?" . replace_query(array("section" => "grade", "id" => $COURSE_ID, "step" => false)), "title" => $assignment["assignment_title"]);
                $COHORT = $assignment["cohort"];
                courses_subnavigation($course_details, "gradebook");
                echo "<div class=\"content-small\">";
                if ($COURSE_ID) {
                    $curriculum_path = curriculum_hierarchy($COURSE_ID);
                    if (is_array($curriculum_path) && count($curriculum_path)) {
                        echo implode(" &gt; ", $curriculum_path);
                    }
                } else {
                    echo "No Associated Course";
                }
                echo "</div>\n";
                ?>
				<style type="text/css">
				.sortableList li {
					width: 100%;
				}	
				</style>

				<h1 class="event-title"><?php 
Ejemplo n.º 2
0
  * Update calculation attempts.
  * Valid: first, last, all
  */
 if (isset($_GET["attempt"])) {
     if (in_array(trim($_GET["attempt"]), array("first", "last", "best", "all"))) {
         $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["attempt"] = trim($_GET["attempt"]);
     }
     $_SERVER["QUERY_STRING"] = replace_query(array("attempt" => false));
 } else {
     if (!isset($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["attempt"])) {
         $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["attempt"] = "all";
     }
 }
 echo "<div class=\"content-small\">";
 if ($QUIZ_TYPE == "event" && $quiz_record["course_id"]) {
     $curriculum_path = curriculum_hierarchy($quiz_record["course_id"]);
     if (is_array($curriculum_path) && count($curriculum_path)) {
         echo implode(" &gt; ", $curriculum_path);
     }
 } else {
     echo "No Associated Course";
 }
 echo " &gt; " . html_encode($quiz_record["content_title"]);
 echo "</div>\n";
 echo "<h1 class=\"event-title\">" . html_encode($quiz_record["quiz_title"]) . "</h1>\n";
 /**
  * Check to make sure people have completed the quiz before trying to display
  * results of the quiz.
  */
 if ($quiz_record["accesses"] > 0) {
     $questions = array();
Ejemplo n.º 3
0
/**
 * This function returns the full path of the course, including the name (i.e. Term 1 > Unit 3 > FooBar 101).
 *
 * @param int $course_id
 * @return string
 */
function fetch_course_path($course_id = 0)
{
    $output = "";
    $course_id = (int) $course_id;
    if ($course_id) {
        $curriculum_path = curriculum_hierarchy($course_id, true, true);
        if (is_array($curriculum_path) && !empty($curriculum_path)) {
            $output = implode(" &gt; ", $curriculum_path);
        }
    }
    if (!$output) {
        $output = "No Associated Course";
    }
    return $output;
}