Exemplo n.º 1
0
 /**
  * Output HTML for mid-exam announcements for the current paper.
  */
 public function display_student_announcements()
 {
     $exam_announcements = $this->get_announcements();
     $maxscreen = Paper_utils::get_num_screens($this->paperID, $this->db);
     if (count($exam_announcements) == 0) {
         return '';
     }
     $html = '';
     $html .= "<table class=\"exam_announcement_box\">\n";
     $html .= "<tr><td rowspan=\"" . (count($exam_announcements) + 1) . "\" class=\"exam_announce_icon\" ><img src=\"../artwork/comment_48.png\" width=\"48\" height=\"48\" /></td><td class=\"exam_announce_title\">" . $this->string['questionclarification'] . "</td></tr>\n";
     foreach ($exam_announcements as $exam_announcement) {
         $html .= "<tr><td><ul><li><strong>" . $this->string['question'] . " " . $exam_announcement['q_number'] . "</strong> (" . sprintf($this->string['clarificationscreen'], $exam_announcement['screen'], $maxscreen) . ")<br />" . $exam_announcement['msg'] . "</li></ul></td></tr>\n";
     }
     $html .= '</table>';
     return $html;
 }