Exemplo n.º 1
0
 public function save_approve_result()
 {
     $id = $_GET['id'];
     $approve = $_GET['approve'];
     ExamsData::approve_result($id, $approve);
     if ($approve == 1) {
         $message = '<div id="success">Exam Approved!</div>';
     } else {
         $message = '<div id="error">Exam Disapproved!</div>';
     }
     $this->set('message', $message);
     $this->set('unapproved', ExamsData::get_exams_unapproved());
     $this->show('exams/exam_admin');
 }