Public Member Functions | Data Fields

ilTimingAccepted Class Reference

class ilTimingAccepted More...

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

class ilTimingAccepted

Author:
Stefan Meyer <smeyer@databay.de>
Version:
Id:
class.ilTimingAccepted.php 13197 2007-02-05 11:43:22Z smeyer

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


Member Function Documentation

ilTimingAccepted::__read (  ) 

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

References $ilDB, $res, accept(), getCourseId(), setRemark(), and setVisible().

Referenced by ilTimingAccepted().

        {
                global $ilDB;
                
                $query = "SELECT * FROM crs_timings_usr_accept ".
                        "WHERE crs_id = ".$ilDB->quote($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.

Referenced by delete(), and update().

        {
                global $ilDB;

                $query = "DELETE FROM crs_timings_usr_accept ".
                        "WHERE crs_id = ".$ilDB->quote($a_crs_id)." ".
                        "AND usr_id = ".$ilDB->quote($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.

        {
                global $ilDB;

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

ilTimingAccepted::_deleteByUser ( a_usr_id  ) 

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

References $ilDB.

        {
                global $ilDB;

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

ilTimingAccepted::accept ( a_status  ) 

Definition at line 62 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 94 of file class.ilTimingAccepted.php.

References $ilDB, getCourseId(), getRemark(), getUserId(), isAccepted(), and isVisible().

Referenced by update().

        {
                global $ilDB;
                
                $query = "INSERT INTO crs_timings_usr_accept ".
                        "SET crs_id = ".$ilDB->quote($this->getCourseId()).", ".
                        "usr_id = ".$ilDB->quote($this->getUserId()).", ".
                        "visible = ".$ilDB->quote($this->isVisible()).", ".
                        "accept = ".$ilDB->quote($this->isAccepted()).", ".
                        "remark = ".$ilDB->quote($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 58 of file class.ilTimingAccepted.php.

Referenced by __read(), create(), delete(), and update().

        {
                return $this->crs_id;
        }

Here is the caller graph for this function:

ilTimingAccepted::getRemark (  ) 

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

Referenced by create().

        {
                return $this->remark;
        }

Here is the caller graph for this function:

ilTimingAccepted::getUserId (  ) 

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

Referenced by create(), 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 40 of file class.ilTimingAccepted.php.

References $ilDB, $ilErr, $lng, 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 66 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 82 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 70 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 78 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 87 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 36 of file class.ilTimingAccepted.php.

Referenced by ilTimingAccepted().

ilTimingAccepted::$lng

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

Referenced by ilTimingAccepted().


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