ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

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().

{
global $ilDB;
$query = "SELECT * FROM crs_timings_usr_accept ".
"WHERE crs_id = ".$ilDB->quote($this->getCourseId() ,'integer')." ".
"AND usr_id = ".$ilDB->quote($this->getUserId() ,'integer')."";
$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 114 of file class.ilTimingAccepted.php.

References $ilDB, $query, and $res.

Referenced by delete(), and update().

{
global $ilDB;
$query = "DELETE FROM crs_timings_usr_accept ".
"WHERE crs_id = ".$ilDB->quote($a_crs_id ,'integer')." ".
"AND usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->manipulate($query);
}

+ Here is the caller graph for this function:

ilTimingAccepted::_deleteByCourse (   $a_crs_id)

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

References $ilDB, $query, and $res.

{
global $ilDB;
$query = "DELETE FROM crs_timings_usr_accept ".
"WHERE crs_id = ".$ilDB->quote($a_crs_id ,'integer')." ";
$res = $ilDB->manipulate($query);
}
ilTimingAccepted::_deleteByUser (   $a_usr_id)

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

References $ilDB, $query, and $res.

{
global $ilDB;
$query = "DELETE FROM crs_timings_usr_accept ".
"WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')."";
$res = $ilDB->manipulate($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, $query, $res, getCourseId(), getRemark(), getUserId(), isAccepted(), and isVisible().

Referenced by update().

{
global $ilDB;
$query = "INSERT INTO crs_timings_usr_accept (crs_id,usr_id,visible,accept,remark) ".
"VALUES( ".
$ilDB->quote($this->getCourseId() ,'integer').", ".
$ilDB->quote($this->getUserId() ,'integer').", ".
$ilDB->quote($this->isVisible() ,'integer').", ".
$ilDB->quote($this->isAccepted() ,'integer').", ".
$ilDB->quote($this->getRemark() ,'text')." ".
")";
$res = $ilDB->manipulate($query);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTimingAccepted::delete ( )

Definition at line 109 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 __read(), 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(), and ilCourseContentGUI\saveAcceptance().

{
$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().

{
$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: