bos =& $Dippler->backoffice; if ($id) { $this->id = $id; } } public function load($loader = false) { if (!$loader) $loader = $this->bos->loadActivity($this->idXML()); if ($loader) { $this->id = $loader->id[0][0]; $this->course = $loader->course[0][0]; $this->course_title = $loader->course_title[0][0]; $this->event = $loader->event[0][0]; $object_type = $loader->object_type[0][0]; if (in_array($object_type, array("Learner", "Facilitator"))) { $object_type = "User"; } $object = new $object_type; $object->id = $loader->object_id[0][0]; $object->title = $loader->object_title[0][0]; $object->type = $loader->object_type[0][0]; $object->course = $loader->course[0][0]; $this->object = $object; $user = new User(); $user->id = $loader->creator[0][0]; $user->fullname = $loader->creator_fullname[0][0]; $this->creator = $user; $this->created = $loader->created[0][0]; } } function idXML() { $data = ""; $data .= ""; $data .= "".$this->id.""; $data .= ""; return $data; } public function getId() { return $this->id; } } ?>