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 |
Definition at line 36 of file class.ilTimingAccepted.php.
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; }
ilTimingAccepted::_delete | ( | $ | a_crs_id, | |
$ | a_usr_id | |||
) |
ilTimingAccepted::_deleteByCourse | ( | $ | a_crs_id | ) |
ilTimingAccepted::_deleteByUser | ( | $ | a_usr_id | ) |
ilTimingAccepted::accept | ( | $ | a_status | ) |
Definition at line 64 of file class.ilTimingAccepted.php.
Referenced by __read().
{ $this->accepted = $a_status; }
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); }
ilTimingAccepted::delete | ( | ) |
Definition at line 107 of file class.ilTimingAccepted.php.
References _delete(), getCourseId(), and getUserId().
{ return ilTimingAccepted::_delete($this->getCourseId(),$this->getUserId()); }
ilTimingAccepted::getCourseId | ( | ) |
Definition at line 60 of file class.ilTimingAccepted.php.
Referenced by delete(), and update().
{
return $this->crs_id;
}
ilTimingAccepted::getRemark | ( | ) |
Definition at line 76 of file class.ilTimingAccepted.php.
Referenced by create().
{
return $this->remark;
}
ilTimingAccepted::getUserId | ( | ) |
Definition at line 56 of file class.ilTimingAccepted.php.
Referenced by delete(), and update().
{
return $this->user_id;
}
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(); }
ilTimingAccepted::isAccepted | ( | ) |
Definition at line 68 of file class.ilTimingAccepted.php.
Referenced by create().
{ return $this->accepted ? true : false; }
ilTimingAccepted::isVisible | ( | ) |
Definition at line 84 of file class.ilTimingAccepted.php.
Referenced by create().
{ return $this->visible ? true : false; }
ilTimingAccepted::setRemark | ( | $ | a_remark | ) |
Definition at line 72 of file class.ilTimingAccepted.php.
Referenced by __read().
{ $this->remark = $a_remark; }
ilTimingAccepted::setVisible | ( | $ | a_visible | ) |
Definition at line 80 of file class.ilTimingAccepted.php.
Referenced by __read().
{ $this->visible = $a_visible; }
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; }
ilTimingAccepted::$ilDB |
Definition at line 39 of file class.ilTimingAccepted.php.
Referenced by _delete(), _deleteByCourse(), _deleteByUser(), and ilTimingAccepted().
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().