ILIAS  Release_4_0_x_branch Revision 61816
 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.

References $ilDB, and $row.

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

{
global $ilDB;
$set = $ilDB->queryF("SELECT status FROM il_wiki_contributor ".
"WHERE wiki_id = %s and user_id = %s",
array("integer", "integer"),
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.

References $ilDB, and $row.

Referenced by ilWikiContributorsTableGUI\fillRow().

{
global $ilDB;
$set = $ilDB->queryF("SELECT status_time FROM il_wiki_contributor ".
"WHERE wiki_id = %s and user_id = %s",
array("integer", "integer"),
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.

References $ilDB, and ilUtil\now().

Referenced by ilObjWikiGUI\saveGradingObject().

{
global $ilDB;
$ilDB->manipulate("DELETE FROM il_wiki_contributor WHERE ".
" wiki_id = ".$ilDB->quote($a_obj_id, "integer").
" AND user_id = ".$ilDB->quote($a_user_id, "integer"));
$ilDB->manipulateF("INSERT INTO il_wiki_contributor (status, wiki_id, user_id, status_time) ".
"VALUES (%s,%s,%s,%s)",
array("integer", "integer", "integer", "timestamp"),
array($a_status, $a_obj_id, $a_user_id, ilUtil::now()));
}

+ Here is the call graph for this function:

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