bos =& $Dippler->backoffice; if ($id) { $this->id = $id; } } public static function getGradeMaxLength() { return self::grade_max_length; } public static function getFeedbackMaxLength() { return self::feedback_max_length; } public function save() { return $this->bos->saveGrade($this->dataXML()); } public function load($loader = false) { if (!$loader) $loader = $this->bos->loadGrade($this->idXML()); if ($loader) { $this->type = 'grade'; $this->id = $loader->id[0][0]; $this->learner = $loader->learner_id[0][0]; $this->user = $loader->user_id[0][0]; $this->course = $loader->course_id[0][0]; $this->grade = $loader->grade[0][0]; $this->feedback = $loader->feedback[0][0]; $this->created = $loader->created[0][0]; $this->modified = $loader->modified[0][0]; } } public function getType() { return $this->type; } public function getId() { return $this->id; } public function getLearner() { return $this->learner; } public function getUser() { return $this->user; } public function getCourse() { return $this->course; } public function getGrade() { return $this->grade; } public function getFeedback() { return $this->feedback; } public function getCreated() { return $this->created; } public function getModified() { return $this->modified; } public function idXML() { $data = ""; $data .= ""; $data .= "{$this->id}"; $data .= ""; return $data; } public function dataXML() { $data = ""; $data .= ""; $data .= "{$this->id}"; $data .= "grade}]]>"; $data .= "feedback}]]>"; $data .= ""; return $data; } }