Beispiel #1
0
 protected function GETnotes(Student $student, $topic, $index)
 {
     $view = new View(self::layout);
     $this->evaluation = Data::FACTORY($topic, $student->evaluation($topic, $index));
     $this->url = $student->context['@url'] . "/{$topic}/{$index}";
     $this->files = \models\Assessment::Links($this->url);
     $this->template = 'editor';
     $view->context = "views/layouts/notes.html";
     $view->content = "views/layouts/inspector.html";
     return $view->render($this());
 }
Beispiel #2
0
 protected function POSTevaluate(Admin $instructor, $request, $topic, $index, $sid)
 {
     $student = new Student($sid);
     $item = Data::FACTORY($topic, $student->evaluation($topic, $index), $_POST);
     if ($item->save()) {
         \bloc\router::redirect("/records/student/{$sid}");
     } else {
         \bloc\application::instance()->log($item);
         $view = new View(self::layout);
         $view->content = "views/layouts/error.html";
         return $view->render($this(['message' => "did not save"]));
     }
 }