ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilTimingAccepted Class Reference

class ilTimingAccepted More...

+ Collaboration diagram for ilTimingAccepted:

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 meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Member Function Documentation

◆ __read()

ilTimingAccepted::__read ( )

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

143 {
144 global $ilDB;
145
146 $query = "SELECT * FROM crs_timings_usr_accept ".
147 "WHERE crs_id = ".$ilDB->quote($this->getCourseId() ,'integer')." ".
148 "AND usr_id = ".$ilDB->quote($this->getUserId() ,'integer')."";
149 $res = $this->db->query($query);
150 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
151 {
152 $this->setVisible($row->visible);
153 $this->setRemark($row->remark);
154 $this->accept($row->accept);
155 }
156 return true;
157 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11

References $ilDB, $query, $res, $row, accept(), DB_FETCHMODE_OBJECT, getCourseId(), getUserId(), setRemark(), and setVisible().

Referenced by ilTimingAccepted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _delete()

ilTimingAccepted::_delete (   $a_crs_id,
  $a_usr_id 
)

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

115 {
116 global $ilDB;
117
118 $query = "DELETE FROM crs_timings_usr_accept ".
119 "WHERE crs_id = ".$ilDB->quote($a_crs_id ,'integer')." ".
120 "AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
121 $res = $ilDB->manipulate($query);
122 }

References $ilDB, $query, and $res.

Referenced by delete(), and update().

+ Here is the caller graph for this function:

◆ _deleteByCourse()

ilTimingAccepted::_deleteByCourse (   $a_crs_id)

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

125 {
126 global $ilDB;
127
128 $query = "DELETE FROM crs_timings_usr_accept ".
129 "WHERE crs_id = ".$ilDB->quote($a_crs_id ,'integer')." ";
130 $res = $ilDB->manipulate($query);
131 }

References $ilDB, $query, and $res.

◆ _deleteByUser()

ilTimingAccepted::_deleteByUser (   $a_usr_id)

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

134 {
135 global $ilDB;
136
137 $query = "DELETE FROM crs_timings_usr_accept ".
138 "WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')."";
139 $res = $ilDB->manipulate($query);
140 }

References $ilDB, $query, and $res.

◆ accept()

ilTimingAccepted::accept (   $a_status)

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

63 {
64 $this->accepted = $a_status;
65 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ create()

ilTimingAccepted::create ( )

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

95 {
96 global $ilDB;
97
98 $query = "INSERT INTO crs_timings_usr_accept (crs_id,usr_id,visible,accept,remark) ".
99 "VALUES( ".
100 $ilDB->quote($this->getCourseId() ,'integer').", ".
101 $ilDB->quote($this->getUserId() ,'integer').", ".
102 $ilDB->quote($this->isVisible() ,'integer').", ".
103 $ilDB->quote($this->isAccepted() ,'integer').", ".
104 $ilDB->quote($this->getRemark() ,'text')." ".
105 ")";
106 $res = $ilDB->manipulate($query);
107 }

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

Referenced by update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilTimingAccepted::delete ( )

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

110 {
111 return ilTimingAccepted::_delete($this->getCourseId(),$this->getUserId());
112 }
_delete($a_crs_id, $a_usr_id)

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

+ Here is the call graph for this function:

◆ getCourseId()

ilTimingAccepted::getCourseId ( )

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

59 {
60 return $this->crs_id;
61 }

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

+ Here is the caller graph for this function:

◆ getRemark()

ilTimingAccepted::getRemark ( )

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

75 {
76 return $this->remark;
77 }

Referenced by create().

+ Here is the caller graph for this function:

◆ getUserId()

ilTimingAccepted::getUserId ( )

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

55 {
56 return $this->user_id;
57 }

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

+ Here is the caller graph for this function:

◆ ilTimingAccepted()

ilTimingAccepted::ilTimingAccepted (   $crs_id,
  $a_usr_id 
)

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

41 {
42 global $ilErr,$ilDB,$lng,$tree;
43
44 $this->ilErr =& $ilErr;
45 $this->db =& $ilDB;
46 $this->lng =& $lng;
47
48 $this->crs_id = $crs_id;
49 $this->user_id = $a_usr_id;
50
51 $this->__read();
52 }

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

+ Here is the call graph for this function:

◆ isAccepted()

ilTimingAccepted::isAccepted ( )

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

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

Referenced by create().

+ Here is the caller graph for this function:

◆ isVisible()

ilTimingAccepted::isVisible ( )

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

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

Referenced by create().

+ Here is the caller graph for this function:

◆ setRemark()

ilTimingAccepted::setRemark (   $a_remark)

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

71 {
72 $this->remark = $a_remark;
73 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setVisible()

ilTimingAccepted::setVisible (   $a_visible)

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

79 {
80 $this->visible = $a_visible;
81 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ update()

ilTimingAccepted::update ( )

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

88 {
90 $this->create();
91 return true;
92 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $ilDB

ilTimingAccepted::$ilDB

◆ $ilErr

ilTimingAccepted::$ilErr

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

Referenced by ilTimingAccepted().

◆ $lng

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: