Esempio n. 1
0
 /**
  * @param attcontrol $att
  * @param null $studentid
  */
 public function __construct(attcontrol $att, $studentid = null)
 {
     parent::__construct($att);
     $this->initialize_date_parameters($att);
     $this->initialize_student_parameters($att);
 }
Esempio n. 2
0
 protected function render_view_controls(attcontrol_filter_controls $fcontrols)
 {
     $views[ATT_VIEW_ALL] = get_string('all', 'attcontrol');
     $views[ATT_VIEW_ALLPAST] = get_string('allpast', 'attcontrol');
     $views[ATT_VIEW_MONTHS] = get_string('months', 'attcontrol');
     $views[ATT_VIEW_WEEKS] = get_string('weeks', 'attcontrol');
     $views[ATT_VIEW_DAYS] = get_string('days', 'attcontrol');
     $viewcontrols = '';
     foreach ($views as $key => $sview) {
         if ($key != $fcontrols->pageparams->view) {
             $link = html_writer::link($fcontrols->url(array('view' => $key)), $sview);
             $viewcontrols .= html_writer::tag('span', $link, array('class' => 'attbtn'));
         } else {
             $viewcontrols .= html_writer::tag('span', $sview, array('class' => 'attcurbtn'));
         }
     }
     return html_writer::tag('nobr', $viewcontrols);
 }