ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilWikiContributor Class Reference

Class ilWikiContributor. More...

+ Collaboration diagram for ilWikiContributor:

Public Member Functions

 _lookupStatus ($a_obj_id, $a_user_id)
 Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
 _lookupStatusTime ($a_obj_id, $a_user_id)
 Lookup last change in mark or success status.
 _writeStatus ($a_obj_id, $a_user_id, $a_status)
 Write success status.

Data Fields

const STATUS_NOT_GRADED = 0
const STATUS_PASSED = 1
const STATUS_FAILED = 2

Detailed Description

Class ilWikiContributor.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 33 of file class.ilWikiContributor.php.

Member Function Documentation

ilWikiContributor::_lookupStatus (   $a_obj_id,
  $a_user_id 
)

Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)

Parameters
int$a_obj_idexercise id
int$a_user_idmember id
Returns
mixed false (if user is no member) or notgraded|passed|failed

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

Referenced by ilWikiContributorsTableGUI\fillRow(), and ilObjWikiGUI\infoScreen().

{
global $ilDB;
$st = $ilDB->prepare("SELECT status FROM il_wiki_contributor ".
"WHERE wiki_id = ? and user_id = ?",
array("integer", "integer"));
$set = $ilDB->execute($st, array($a_obj_id, $a_user_id));
if($row = $ilDB->fetchAssoc($set))
{
return $row["status"];
}
return false;
}

+ Here is the caller graph for this function:

ilWikiContributor::_lookupStatusTime (   $a_obj_id,
  $a_user_id 
)

Lookup last change in mark or success status.

Parameters
int$a_obj_idexercise id
int$a_user_idmember id
Returns
mixed false (if user is no member) or notgraded|passed|failed

Definition at line 68 of file class.ilWikiContributor.php.

Referenced by ilWikiContributorsTableGUI\fillRow().

{
global $ilDB;
$st = $ilDB->prepare("SELECT status_time FROM il_wiki_contributor ".
"WHERE wiki_id = ? and user_id = ?",
array("integer", "integer"));
$set = $ilDB->execute($st, array($a_obj_id, $a_user_id));
if($row = $ilDB->fetchAssoc($set))
{
return $row["status_time"];
}
return false;
}

+ Here is the caller graph for this function:

ilWikiContributor::_writeStatus (   $a_obj_id,
  $a_user_id,
  $a_status 
)

Write success status.

Parameters
int$a_obj_idexercise id
int$a_user_idmember id
int$statusstatus: STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED
Returns
int number of affected rows

Definition at line 92 of file class.ilWikiContributor.php.

Referenced by ilObjWikiGUI\saveGradingObject().

{
global $ilDB;
$st = $ilDB->prepareManip("REPLACE INTO il_wiki_contributor (status, wiki_id, user_id) ".
"VALUES (?,?,?)",
array("integer", "integer", "integer"));
$ilDB->execute($st, array($a_status, $a_obj_id, $a_user_id));
}

+ Here is the caller graph for this function:

Field Documentation

const ilWikiContributor::STATUS_FAILED = 2
const ilWikiContributor::STATUS_NOT_GRADED = 0
const ilWikiContributor::STATUS_PASSED = 1

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