コード例 #1
0
 function __construct($id_resource = NULL, $environment = false)
 {
     parent::__construct($id_resource, $environment);
     $this->obj_type = 'item';
     if ($id_resource != false) {
         $this->load();
     }
 }
コード例 #2
0
 /**
  * function learning_Test()
  * class constructor
  **/
 function Learning_Poll($id = NULL)
 {
     parent::Learning_Object($id);
     if ($id !== NULL) {
         $res = $this->db->query("SELECT author, title FROM %lms_poll WHERE id_poll = '" . (int) $id . "'");
         if ($res && $this->db->num_rows($res) > 0) {
             list($this->idAuthor, $this->title) = $this->db->fetch_row($res);
             $this->isPhysicalObject = true;
         }
     }
 }
コード例 #3
0
 /** 
  * object constructor
  **/
 function Learning_Link($id = NULL)
 {
     parent::Learning_Object($id);
     if ($id !== NULL) {
         $res = $this->db->query("SELECT author, title FROM %lms_link_cat WHERE idCategory = '" . $id . "'");
         if ($res && $this->db->num_rows($res) > 0) {
             list($this->idAuthor, $this->title) = $this->db->fetch_row($res);
             $this->isPhysicalObject = true;
         }
     }
 }
コード例 #4
0
 /** 
  * object constructor
  **/
 function Learning_ScormOrg($id = NULL, $environment = false)
 {
     parent::__construct($id, $environment);
     $title = '';
     $res = $this->db->query("SELECT title FROM %lms_scorm_organizations WHERE idscorm_organization = " . (int) $id . "");
     if ($res && $this->db->num_rows($res) > 0) {
         $this->isPhysicalObject = true;
         list($title) = $this->db->fetch_row($res);
     }
     $this->idAuthor = '';
     $this->title = $title;
     $this->obj_type = 'scormorg';
 }