ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPMarks Class Reference
+ Collaboration diagram for ilLPMarks:

Public Member Functions

 ilLPMarks ($a_obj_id, $a_usr_id)
 getUserId ()
 setMark ($a_mark)
 getMark ()
 setComment ($a_comment)
 getComment ()
 setCompleted ($a_status)
 getCompleted ()
 getObjId ()
 update ()
 _hasCompleted ($a_usr_id, $a_obj_id)
 _lookupMark ($a_usr_id, $a_obj_id)
 _lookupComment ($a_usr_id, $a_obj_id)
 __read ()
 __add ()

Data Fields

 $db = null
 $obj_id = null
 $usr_id = null
 $obj_type = null
 $completed = false
 $comment = ''
 $mark = ''
 $has_entry = false

Detailed Description

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

Member Function Documentation

ilLPMarks::__add ( )

Definition at line 187 of file class.ilLPMarks.php.

References getComment(), getCompleted(), and getMark().

Referenced by update().

{
$query = "INSERT INTO ut_lp_marks ".
"SET mark = '".ilUtil::prepareDBString($this->getMark())."', ".
"comment = '".ilUtil::prepareDBString($this->getComment())."', ".
"completed = '".(int) $this->getCompleted()."', ".
"obj_id = '".$this->getObjId()."', ".
"usr_id = '".$this->getUserId()."'";
$this->db->query($query);
$this->has_entry = true;
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPMarks::__read ( )

Definition at line 169 of file class.ilLPMarks.php.

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilLPMarks().

{
$res = $this->db->query("SELECT * FROM ut_lp_marks ".
"WHERE obj_id = ".$this->db->quote($this->obj_id)." ".
"AND usr_id = '".(int) $this->usr_id."'");
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->has_entry = true;
$this->completed = (int) $row->completed;
$this->comment = $row->comment;
$this->mark = $row->mark;
return true;
}
return false;
}

+ Here is the caller graph for this function:

ilLPMarks::_hasCompleted (   $a_usr_id,
  $a_obj_id 
)

Definition at line 119 of file class.ilLPMarks.php.

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilInfoScreenGUI\showLearningProgress().

{
global $ilDB;
$query = "SELECT * FROM ut_lp_marks ".
"WHERE usr_id = '".$a_usr_id."' ".
"AND obj_id = '".$a_obj_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return (bool) $row->completed;
}
return false;
}

+ Here is the caller graph for this function:

ilLPMarks::_lookupComment (   $a_usr_id,
  $a_obj_id 
)

Definition at line 152 of file class.ilLPMarks.php.

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilLPObjectItemListGUI\__readComment(), ilWikiContributorsTableGUI\fillRow(), ilObjWikiGUI\infoScreen(), ilObjExerciseGUI\infoScreen(), and ilObjExerciseGUI\membersObject().

{
global $ilDB;
$query = "SELECT * FROM ut_lp_marks ".
"WHERE usr_id = '".$a_usr_id."' ".
"AND obj_id = '".$a_obj_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->comment;
}
return '';
}

+ Here is the caller graph for this function:

ilLPMarks::_lookupMark (   $a_usr_id,
  $a_obj_id 
)

Definition at line 135 of file class.ilLPMarks.php.

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilLPObjectItemListGUI\__readMark(), ilObjExerciseGUI\__saveStatus(), ilWikiContributorsTableGUI\fillRow(), ilObjWikiGUI\infoScreen(), ilObjExerciseGUI\infoScreen(), and ilObjExerciseGUI\membersObject().

{
global $ilDB;
$query = "SELECT * FROM ut_lp_marks ".
"WHERE usr_id = '".$a_usr_id."' ".
"AND obj_id = '".$a_obj_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->mark;
}
return '';
}

+ Here is the caller graph for this function:

ilLPMarks::getComment ( )

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

References $comment.

Referenced by __add(), and update().

{
}

+ Here is the caller graph for this function:

ilLPMarks::getCompleted ( )

Definition at line 90 of file class.ilLPMarks.php.

References $completed.

Referenced by __add(), and update().

{
}

+ Here is the caller graph for this function:

ilLPMarks::getMark ( )

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

References $mark.

Referenced by __add(), and update().

{
return $this->mark;
}

+ Here is the caller graph for this function:

ilLPMarks::getObjId ( )

Definition at line 95 of file class.ilLPMarks.php.

References $obj_id.

{
return (int) $this->obj_id;
}
ilLPMarks::getUserId ( )

Definition at line 65 of file class.ilLPMarks.php.

References $usr_id.

{
return $this->usr_id;
}
ilLPMarks::ilLPMarks (   $a_obj_id,
  $a_usr_id 
)

Definition at line 52 of file class.ilLPMarks.php.

References __read().

{
global $ilObjDataCache,$ilDB;
$this->db =& $ilDB;
$this->obj_id = $a_obj_id;
$this->usr_id = $a_usr_id;
$this->obj_type = $ilObjDataCache->lookupType($this->obj_id);
$this->__read();
}

+ Here is the call graph for this function:

ilLPMarks::setComment (   $a_comment)

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

Referenced by ilExerciseXMLParser\updateMarking().

{
$this->comment = $a_comment;
}

+ Here is the caller graph for this function:

ilLPMarks::setCompleted (   $a_status)

Definition at line 86 of file class.ilLPMarks.php.

Referenced by ilInfoScreenGUI\saveProgress().

{
$this->completed = (bool) $a_status;
}

+ Here is the caller graph for this function:

ilLPMarks::setMark (   $a_mark)

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

Referenced by ilObjExerciseGUI\__saveStatus(), ilObjWikiGUI\saveGradingObject(), and ilExerciseXMLParser\updateMarking().

{
$this->mark = $a_mark;
}

+ Here is the caller graph for this function:

ilLPMarks::update ( )

Definition at line 100 of file class.ilLPMarks.php.

References __add(), getComment(), getCompleted(), and getMark().

{
if(!$this->has_entry)
{
$this->__add();
}
$query = "UPDATE ut_lp_marks ".
"SET mark = '".ilUtil::prepareDBString($this->getMark())."', ".
"comment = '".ilUtil::prepareDBString($this->getComment())."', ".
"completed = '".(int) $this->getCompleted()."' ".
"WHERE obj_id = '".$this->getObjId()."' ".
"AND usr_id = '".$this->getUserId()."'";
$this->db->query($query);
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilLPMarks::$comment = ''

Definition at line 45 of file class.ilLPMarks.php.

Referenced by getComment().

ilLPMarks::$completed = false

Definition at line 44 of file class.ilLPMarks.php.

Referenced by getCompleted().

ilLPMarks::$db = null

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

ilLPMarks::$has_entry = false

Definition at line 48 of file class.ilLPMarks.php.

ilLPMarks::$mark = ''

Definition at line 46 of file class.ilLPMarks.php.

Referenced by getMark().

ilLPMarks::$obj_id = null

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

Referenced by getObjId().

ilLPMarks::$obj_type = null

Definition at line 42 of file class.ilLPMarks.php.

ilLPMarks::$usr_id = null

Definition at line 41 of file class.ilLPMarks.php.

Referenced by getUserId().


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