Exemplo n.º 1
0
 $exclusions->load();
 // Get any questions to exclude.
 $row_written = 0;
 foreach ($user_results as $individual) {
     $tmp_user_ID = $individual['username'];
     // Write out the headings.
     if ($row_written == 0) {
         // Only output personal data if assessment, do not show if survey.
         if ($paper_type < 3) {
             $csv .= '"' . $string['gender'] . '","' . $string['title'] . '","' . $string['surname'] . '","' . $string['firstnames'] . '","' . $string['studentid'] . '","' . $string['course'] . '","' . $string['year'] . '","' . $string['submitted'] . '"';
         } else {
             $csv .= '"' . $string['gender'] . '","' . $string['course'] . '","' . $string['year'] . '","' . $string['submitted'] . '"';
         }
         $q_no = 1;
         foreach ($paper_buffer as $q_id => $question) {
             $tmp_exclude = $exclusions->get_exclusions_by_qid($q_id);
             // If a random question, get the first on the associated questions from the block. If none exist, output nothing
             $skip_random = false;
             if ($question['q_type'] == 'random') {
                 if (isset($paper_buffer[$q_id]['random_questions']) and count($paper_buffer[$q_id]['random_questions']) > 0) {
                     $question = reset($paper_buffer[$q_id]['random_questions']);
                     if ($question['q_type'] == 'blank') {
                         $tmp_q_id = key($paper_buffer[$q_id]['random_questions']);
                         $question['correct'] = extract_blank_correct($question['option_text'][0], $question['display_method'], $paper_buffer, $tmp_q_id);
                     }
                     if ($question['q_type'] == 'labelling') {
                         $question['correct_labels'] = get_correct_labels($question, $tmp_exclude);
                     }
                 } else {
                     $skip_random = true;
                 }
Exemplo n.º 2
0
 if ($prologue_show == 1 and $current_screen == 1 and $paper_prologue != '') {
     echo '<tr><td colspan="2" style="padding:20px; text-align:justify">' . $paper_prologue . '</td></tr>';
     $prologue_show = 0;
 }
 if ($question_no == 0) {
     echo "<tr><td colspan=\"2\">&nbsp;</td></tr>\n";
 }
 if ($old_q_id != $q_id) {
     // New Question
     // Print the options of the previous question
     $li_set = 0;
     if ($old_leadin != '') {
         if ($li_set == 1) {
             echo "</td></tr>\n";
         }
         $excluded = $exclusions->get_exclusions_by_qid($old_q_id);
         if (count($options_array) > 0) {
             display_options($old_screen, $options_array, $old_q_id, $old_theme, $old_scenario, $old_leadin, $old_notes, $paper_type, $_GET['method'], $reviews, $excluded, false);
         }
         if ($old_screen != $screen) {
             echo '<tr><td colspan="2">';
             echo '<div class="screenbrk"><span class="scr_no">' . $string['screen'] . '&nbsp;' . $screen . '</span></div>';
             echo '</td></tr>';
         }
     }
     $question_no++;
     if ($old_q_type == 'likert' and $q_type != 'likert' or $old_q_type != 'likert' and $q_type == 'likert') {
         echo "</table>\n<br />\n<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n";
     }
     if ($theme != '') {
         if ($old_q_type == 'likert') {
Exemplo n.º 3
0
for ($x = 1; $x <= $row_no; $x++) {
    if ($old_screen != $temp_array[$x]['screen']) {
        if ($old_screen < $temp_array[$x]['screen'] - 1) {
            for ($missing = 1; $missing < $temp_array[$x]['screen'] - $old_screen; $missing++) {
                echo '<tr><td colspan="3" style="height:10px"></td></tr>';
                echo '<tr><td></td><td colspan="3" class="divider">Screen ' . ($old_screen + $missing) . '</td></tr>';
                echo '<tr><td colspan="3" style="height:5px"><img src="../artwork/divider_bar.gif" width="290" height="1" /></td></tr>';
                echo '<tr><td colspan="3" style="background-color:#FFC0C0; padding:5px"><strong>' . $string['warning'] . ':</strong> ' . $string['noquestiononscreen'] . '</td></tr>';
            }
        }
        echo "<tr><td colspan=\"4\" style=\"padding-left:4px\"><table border=\"0\" style=\"padding-top:6px; padding-bottom:2px; width:100%; color:#1E3287\"><tr><td><nobr>" . $string['screen'] . " " . $temp_array[$x]['screen'] . "</nobr></td><td style=\"width:98%\"><hr noshade=\"noshade\" style=\"border:0px; height:1px; color:#E5E5E5; background-color:#E5E5E5; width:100%\" /></td></tr></table>\n</td></tr>\n";
    }
    $old_screen = $temp_array[$x]['screen'];
    $moduleIDs = Paper_utils::get_modules($paperID, $mysqli);
    $objByModule = getObjectivesByMapping($moduleIDs, $session, $paperID, $temp_array[$x]['q_id'], $mysqli);
    if ($exclusions->get_exclusions_by_qid($temp_array[$x]['q_id']) != '0000000000000000000000000000000000000000') {
        $class = 'mapping_exclueded';
    } else {
        $class = '';
    }
    echo "<tr>";
    if (count($objByModule) > 0 or $temp_array[$x]['q_type'] == 'info') {
        echo '<td style="width:16px">&nbsp;</td>';
    } else {
        echo '<td style="width:16px"><img src="../artwork/small_yellow_warning_icon.gif" width="12" height="11" alt="No Mappings" /></td>';
    }
    if ($temp_array[$x]['q_type'] == 'info') {
        echo '<td class="q_no"><img src="../artwork/black_white_info_icon.png" width="6" height="12" alt="Info" />&nbsp;&nbsp;</td>';
    } else {
        $question_number++;
        echo "<td class=\"q_no\">&nbsp;{$question_number}.&nbsp;</td>";
Exemplo n.º 4
0
     echo '</ul>';
 }
 echo "<tr><td colspan=\"2\" style=\"padding-left:4px\"><table border=\"0\" style=\"padding-top:6px; padding-bottom:2px; width:100%; color:#1E3287\"><tr><td><nobr>";
 if ($sessionData['class_code'] != '') {
     echo $sessionData['class_code'] . ': ';
 }
 echo $sessionData['title'] . ' <a href="' . $sessionData['source_url'] . '" rel="external"><img src="../artwork/small_link.png" width="11" height="11" alt="" /></a> ';
 echo "</nobr></td><td style=\"width:98%\"><hr noshade=\"noshade\" style=\"border:0px; height:1px; color:#E5E5E5; background-color:#E5E5E5; width:100%\" /></td></tr></table>\n</td></tr>\n";
 if (isset($sessionData["objectives"]) and is_array($sessionData["objectives"])) {
     echo '<tr><td colspan="2"><ul>';
     foreach ($sessionData["objectives"] as $id => $objectives) {
         if (is_array($objectives['mapped'])) {
             echo '<li class="mapped">' . strip_tags($objectives['content'], '<b><i><strong><em><sub><sup>') . ' <span class="mapping">';
             $i = 0;
             foreach ($objectives['mapped'] as $q_id) {
                 if ($exclusions->get_exclusions_by_qid($q_id) != '0000000000000000000000000000000000000000') {
                     $class = 'q_excluded';
                 } else {
                     $class = 'q_ok';
                 }
                 if ($i != 0) {
                     echo ', ';
                 }
                 $i++;
                 echo "<a class=\"{$class}\" href=\"../question/view_question.php?q_id=" . $q_id . "&qNo=" . $temp_array[$q_id]['qnumber'] . "\" target=\"_blank\">Q" . $temp_array[$q_id]['qnumber'] . "</a>";
             }
             echo '</span></li>';
         } else {
             // Could display unmapped objective here!
             echo '<li class="unmapped">' . strip_tags($objectives['content'], '<b><i><strong><em><sub><sup>') . '</li>';
         }
Exemplo n.º 5
0
 if ($marks_incorrect < 0) {
     $neg_marking = true;
 }
 if ($old_p_id != $p_id or $old_display_pos != $display_pos) {
     // Check for status that's excluded from marking
     $do_marking = ($row_no2 > 0 and !$status_array[$temp_array[$row_no2]['status']]->get_exclude_marking());
     if ($old_display_pos != -1) {
         $temp_array[$row_no2]['options'] = $options;
         if (empty($old_o_media)) {
             $temp_array[$row_no2]['o_media'] = array();
         } else {
             $temp_array[$row_no2]['o_media'] = $old_o_media;
         }
     }
     $options = 0;
     $tmp_exclude = $exclusions->get_exclusions_by_qid($old_q_id);
     if ($old_q_type == 'random') {
         $temp_array[$row_no2]['original_marks'] = random_qMarks($temp_array[$row_no2]['random']);
         if ($do_marking) {
             $temp_array[$row_no2]['marks'] = $temp_array[$row_no2]['original_marks'];
             if (count($temp_array[$row_no2]['random']) > 0) {
                 $total_random_mark += $temp_array[$row_no2]['random'][0]['random_mark'];
             }
         }
     } else {
         $temp_array[$row_no2]['original_marks'] = qMarks($old_q_type, $tmp_exclude, $old_marks, $old_option_text, $old_correct, $old_display_method, $old_score_method);
         if ($do_marking) {
             $temp_array[$row_no2]['marks'] = $temp_array[$row_no2]['original_marks'];
             $total_random_mark += qRandomMarks($old_q_type, $tmp_exclude, $old_marks, $old_option_text, $old_correct, $old_display_method, $old_score_method, $old_q_media_width, $old_q_media_height);
         }
     }