ILIAS  release_4-4 Revision
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.

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

Referenced by ilTimingAccepted().

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
+ 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.

References $ilDB, $query, and $res.

Referenced by delete(), and update().

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  }
+ Here is the caller graph for this function:

◆ _deleteByCourse()

ilTimingAccepted::_deleteByCourse (   $a_crs_id)

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

References $ilDB, $query, and $res.

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  }

◆ _deleteByUser()

ilTimingAccepted::_deleteByUser (   $a_usr_id)

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

References $ilDB, $query, and $res.

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  }

◆ accept()

ilTimingAccepted::accept (   $a_status)

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

Referenced by __read().

63  {
64  $this->accepted = $a_status;
65  }
+ Here is the caller graph for this function:

◆ create()

ilTimingAccepted::create ( )

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

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

Referenced by update().

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  }
+ 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.

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

110  {
111  return ilTimingAccepted::_delete($this->getCourseId(),$this->getUserId());
112  }
_delete($a_crs_id, $a_usr_id)
+ Here is the call graph for this function:

◆ getCourseId()

ilTimingAccepted::getCourseId ( )

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

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

59  {
60  return $this->crs_id;
61  }
+ Here is the caller graph for this function:

◆ getRemark()

ilTimingAccepted::getRemark ( )

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

Referenced by create().

75  {
76  return $this->remark;
77  }
+ Here is the caller graph for this function:

◆ getUserId()

ilTimingAccepted::getUserId ( )

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

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

55  {
56  return $this->user_id;
57  }
+ 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.

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

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  }
+ Here is the call graph for this function:

◆ isAccepted()

ilTimingAccepted::isAccepted ( )

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

Referenced by create().

67  {
68  return $this->accepted ? true : false;
69  }
+ Here is the caller graph for this function:

◆ isVisible()

ilTimingAccepted::isVisible ( )

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

Referenced by create().

83  {
84  return $this->visible ? true : false;
85  }
+ Here is the caller graph for this function:

◆ setRemark()

ilTimingAccepted::setRemark (   $a_remark)

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

Referenced by __read(), and ilCourseContentGUI\saveAcceptance().

71  {
72  $this->remark = $a_remark;
73  }
+ Here is the caller graph for this function:

◆ setVisible()

ilTimingAccepted::setVisible (   $a_visible)

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

Referenced by __read().

79  {
80  $this->visible = $a_visible;
81  }
+ Here is the caller graph for this function:

◆ update()

ilTimingAccepted::update ( )

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

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

88  {
90  $this->create();
91  return true;
92  }
_delete($a_crs_id, $a_usr_id)
+ 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: