Public Member Functions | Data Fields

ilSCORMOrganizations Class Reference

Inheritance diagram for ilSCORMOrganizations:
Collaboration diagram for ilSCORMOrganizations:

Public Member Functions

 ilSCORMOrganizations ($a_id=0)
 Constructor.
 getDefaultOrganization ()
 setDefaultOrganization ($a_def_org)
 read ()
 create ()
 Create database record for SCORM object.
 update ()
 Updates database record for SCORM object.
 delete ()

Data Fields

 $default_organization

Detailed Description

Definition at line 35 of file class.ilSCORMOrganizations.php.


Member Function Documentation

ilSCORMOrganizations::create (  ) 

Create database record for SCORM object.

Reimplemented from ilSCORMObject.

Definition at line 78 of file class.ilSCORMOrganizations.php.

References $q, and getDefaultOrganization().

        {
                parent::create();

                $q = "INSERT INTO sc_organizations (obj_id, default_organization) VALUES ".
                        "('".$this->getId()."', '".$this->getDefaultOrganization()."')";
                $this->ilias->db->query($q);
        }

Here is the call graph for this function:

ilSCORMOrganizations::delete (  ) 

Reimplemented from ilSCORMObject.

Definition at line 97 of file class.ilSCORMOrganizations.php.

References $q, and ilSCORMObject::getId().

        {
                global $ilDB;

                parent::delete();

                $q = "DELETE FROM sc_organizations WHERE obj_id =".$ilDB->quote($this->getId());
                $ilDB->query($q);
        }

Here is the call graph for this function:

ilSCORMOrganizations::getDefaultOrganization (  ) 

Definition at line 57 of file class.ilSCORMOrganizations.php.

Referenced by create().

        {
                return $this->default_organization;
        }

Here is the caller graph for this function:

ilSCORMOrganizations::ilSCORMOrganizations ( a_id = 0  ) 

Constructor.

Parameters:
int $a_id Object ID public

Definition at line 46 of file class.ilSCORMOrganizations.php.

References $lng, ilSCORMObject::ilSCORMObject(), ilSCORMObject::setTitle(), and ilSCORMObject::setType().

        {
                global $lng;

                // title should be overrriden by ilSCORMExplorer
                $this->setTitle($lng->txt("cont_organizations"));

                parent::ilSCORMObject($a_id);
                $this->setType("sos");
        }

Here is the call graph for this function:

ilSCORMOrganizations::read (  ) 

Reimplemented from ilSCORMObject.

Definition at line 67 of file class.ilSCORMOrganizations.php.

References $q, and setDefaultOrganization().

        {
                parent::read();

                $q = "SELECT * FROM sc_organizations WHERE obj_id = '".$this->getId()."'";

                $obj_set = $this->ilias->db->query($q);
                $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
                $this->setDefaultOrganization($obj_rec["default_organization"]);
        }

Here is the call graph for this function:

ilSCORMOrganizations::setDefaultOrganization ( a_def_org  ) 

Definition at line 62 of file class.ilSCORMOrganizations.php.

Referenced by read().

        {
                $this->default_organization = $a_def_org;
        }

Here is the caller graph for this function:

ilSCORMOrganizations::update (  ) 

Updates database record for SCORM object.

Reimplemented from ilSCORMObject.

Definition at line 87 of file class.ilSCORMOrganizations.php.

References $q.

        {
                parent::update();

                $q = "UPDATE sc_organizations SET ".
                        "default_organization = '".$this->getDefaultOrganization()."' ".
                        "WHERE obj_id = '".$this->getId()."'";
                $this->ilias->db->query($q);
        }


Field Documentation

ilSCORMOrganizations::$default_organization

Definition at line 37 of file class.ilSCORMOrganizations.php.


The documentation for this class was generated from the following file: