Public Member Functions | Data Fields

ilTimingAccepted Class Reference

Public Member Functions

 ilTimingAccepted ($crs_id, $a_usr_id)
 getUserId ()
 getCourseId ()
 accept ($a_status)
 isAccepted ()
 setRemark ($a_remark)
 getRemark ()
 setVisible ($a_visible)
 isVisible ()
 update ()
 create ()
 delete ()
 _delete ($a_crs_id, $a_usr_id)
 _deleteByCourse ($a_crs_id)
 _deleteByUser ($a_usr_id)
 __read ()

Data Fields

 $ilErr
 $ilDB
 $lng

Detailed Description

Definition at line 36 of file class.ilTimingAccepted.php.


Member Function Documentation

ilTimingAccepted::__read (  ) 

Definition at line 140 of file class.ilTimingAccepted.php.

References $query, $res, $row, accept(), setRemark(), and setVisible().

Referenced by ilTimingAccepted().

        {
                $query = "SELECT * FROM crs_timings_usr_accept ".
                        "WHERE crs_id = '".$this->getCourseId()."' ".
                        "AND usr_id = '".$this->getUserId()."'";
                $res = $this->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $this->setVisible($row->visible);
                        $this->setRemark($row->remark);
                        $this->accept($row->accept);
                }
                return true;
        }               

Here is the call graph for this function:

Here is the caller graph for this function:

ilTimingAccepted::_delete ( a_crs_id,
a_usr_id 
)

Definition at line 112 of file class.ilTimingAccepted.php.

References $ilDB, and $query.

Referenced by delete(), and update().

        {
                global $ilDB;

                $query = "DELETE FROM crs_timings_usr_accept ".
                        "WHERE crs_id = '".$a_crs_id."' ".
                        "AND usr_id = '".$a_usr_id."'";
                $ilDB->query($query);
        }

Here is the caller graph for this function:

ilTimingAccepted::_deleteByCourse ( a_crs_id  ) 

Definition at line 122 of file class.ilTimingAccepted.php.

References $ilDB, and $query.

        {
                global $ilDB;

                $query = "DELETE FROM crs_timings_usr_accept ".
                        "WHERE crs_id = '".$a_crs_id."'";
                $ilDB->query($query);
        }

ilTimingAccepted::_deleteByUser ( a_usr_id  ) 

Definition at line 131 of file class.ilTimingAccepted.php.

References $ilDB, and $query.

        {
                global $ilDB;

                $query = "DELETE FROM crs_timings_usr_accept ".
                        "WHERE usr_id = '".$a_usr_id."'";
                $ilDB->query($query);
        }

ilTimingAccepted::accept ( a_status  ) 

Definition at line 64 of file class.ilTimingAccepted.php.

Referenced by __read().

        {
                $this->accepted = $a_status;
        }

Here is the caller graph for this function:

ilTimingAccepted::create (  ) 

Definition at line 96 of file class.ilTimingAccepted.php.

References $query, getRemark(), isAccepted(), and isVisible().

Referenced by update().

        {
                $query = "INSERT INTO crs_timings_usr_accept ".
                        "SET crs_id = '".$this->getCourseId()."', ".
                        "usr_id = '".$this->getUserId()."', ".
                        "visible = '".(int) $this->isVisible()."', ".
                        "accept = '".(int) $this->isAccepted()."', ".
                        "remark = '".ilUtil::prepareDBString($this->getRemark())."'";
                $this->db->query($query);
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilTimingAccepted::delete (  ) 

Definition at line 107 of file class.ilTimingAccepted.php.

References _delete(), getCourseId(), and getUserId().

        {
                return ilTimingAccepted::_delete($this->getCourseId(),$this->getUserId());
        }

Here is the call graph for this function:

ilTimingAccepted::getCourseId (  ) 

Definition at line 60 of file class.ilTimingAccepted.php.

Referenced by delete(), and update().

        {
                return $this->crs_id;
        }

Here is the caller graph for this function:

ilTimingAccepted::getRemark (  ) 

Definition at line 76 of file class.ilTimingAccepted.php.

Referenced by create().

        {
                return $this->remark;
        }

Here is the caller graph for this function:

ilTimingAccepted::getUserId (  ) 

Definition at line 56 of file class.ilTimingAccepted.php.

Referenced by delete(), and update().

        {
                return $this->user_id;
        }

Here is the caller graph for this function:

ilTimingAccepted::ilTimingAccepted ( crs_id,
a_usr_id 
)

Definition at line 42 of file class.ilTimingAccepted.php.

References $ilDB, $ilErr, $lng, $tree, and __read().

        {
                global $ilErr,$ilDB,$lng,$tree;

                $this->ilErr =& $ilErr;
                $this->db  =& $ilDB;
                $this->lng =& $lng;

                $this->crs_id = $crs_id;
                $this->user_id = $a_usr_id;

                $this->__read();
        }

Here is the call graph for this function:

ilTimingAccepted::isAccepted (  ) 

Definition at line 68 of file class.ilTimingAccepted.php.

Referenced by create().

        {
                return $this->accepted ? true : false;
        }

Here is the caller graph for this function:

ilTimingAccepted::isVisible (  ) 

Definition at line 84 of file class.ilTimingAccepted.php.

Referenced by create().

        {
                return $this->visible ? true : false;
        }

Here is the caller graph for this function:

ilTimingAccepted::setRemark ( a_remark  ) 

Definition at line 72 of file class.ilTimingAccepted.php.

Referenced by __read().

        {
                $this->remark = $a_remark;
        }

Here is the caller graph for this function:

ilTimingAccepted::setVisible ( a_visible  ) 

Definition at line 80 of file class.ilTimingAccepted.php.

Referenced by __read().

        {
                $this->visible = $a_visible;
        }

Here is the caller graph for this function:

ilTimingAccepted::update (  ) 

Definition at line 89 of file class.ilTimingAccepted.php.

References _delete(), create(), getCourseId(), and getUserId().

        {
                ilTimingAccepted::_delete($this->getCourseId(),$this->getUserId());
                $this->create();
                return true;
        }

Here is the call graph for this function:


Field Documentation

ilTimingAccepted::$ilDB
ilTimingAccepted::$ilErr

Definition at line 38 of file class.ilTimingAccepted.php.

Referenced by ilTimingAccepted().

ilTimingAccepted::$lng

Definition at line 40 of file class.ilTimingAccepted.php.

Referenced by ilTimingAccepted().


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