Esempio n. 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());
 }
Esempio n. 2
0
 /**
  * HTTP Get Evaluation
  *
  * @param Admin $instructor automatically passed based on session_id
  * @param string $topic (participation|practice|project|quiz)
  * @param int $index assignment number
  * @param string $sid student id number
  **/
 protected function GETevaluate(Admin $instructor, $topic, $index, $sid = null)
 {
     $this->student = new Student($sid);
     $this->topic = $topic;
     $this->index = $index;
     $view = new View(self::layout);
     $this->{$topic} = Data::FACTORY($topic, $this->student->evaluation($topic, $index));
     if ($topic == 'practice' || $topic == 'project') {
         $this->url = $this->student->context['@url'] . "/{$topic}/{$index}";
         $this->files = \models\Assessment::LINKS($this->url);
         $this->template = 'editor';
         $view->context = "views/layouts/forms/assignment.html";
         $view->content = "views/layouts/inspector.html";
     } else {
         $this->section = $this->student->section;
         $view->context = "views/layouts/list/section.html";
         $view->content = "views/layouts/forms/assignment.html";
     }
     $view->topic = "views/layouts/forms/{$topic}.html";
     return $view->render($this());
 }
Esempio n. 3
0
 public function getLetter(\DOMElement $context)
 {
     return \models\Assessment::LETTER($this->score);
 }