ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWikiContributor Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilWikiContributor:

Static Public Member Functions

static _lookupStatus (int $a_obj_id, int $a_user_id)
 Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED) More...
 
static _lookupStatusTime (int $a_obj_id, int $a_user_id)
 
static _writeStatus (int $a_obj_id, int $a_user_id, int $a_status)
 

Data Fields

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

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ _lookupStatus()

static ilWikiContributor::_lookupStatus ( int  $a_obj_id,
int  $a_user_id 
)
static

Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)

Returns
?int (if user is no member) or notgraded|passed|failed

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

35 : ?int {
36 global $DIC;
37
38 $ilDB = $DIC->database();
39
40 $set = $ilDB->queryF(
41 "SELECT status FROM il_wiki_contributor " .
42 "WHERE wiki_id = %s and user_id = %s",
43 array("integer", "integer"),
44 array($a_obj_id, $a_user_id)
45 );
46 if ($row = $ilDB->fetchAssoc($set)) {
47 return (int) $row["status"];
48 }
49 return null;
50 }
global $DIC
Definition: shib_login.php:26

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

+ Here is the caller graph for this function:

◆ _lookupStatusTime()

static ilWikiContributor::_lookupStatusTime ( int  $a_obj_id,
int  $a_user_id 
)
static

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

55 : ?string {
56 global $DIC;
57
58 $ilDB = $DIC->database();
59
60 $set = $ilDB->queryF(
61 "SELECT status_time FROM il_wiki_contributor " .
62 "WHERE wiki_id = %s and user_id = %s",
63 array("integer", "integer"),
64 array($a_obj_id, $a_user_id)
65 );
66 if ($row = $ilDB->fetchAssoc($set)) {
67 return $row["status_time"];
68 }
69 return null;
70 }

Referenced by ilWikiContributorsTableGUI\fillRow().

+ Here is the caller graph for this function:

◆ _writeStatus()

static ilWikiContributor::_writeStatus ( int  $a_obj_id,
int  $a_user_id,
int  $a_status 
)
static
Parameters
int$statusstatus: STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED

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

79 : void {
80 global $DIC;
81
82 $ilDB = $DIC->database();
83
84 $ilDB->manipulate("DELETE FROM il_wiki_contributor WHERE " .
85 " wiki_id = " . $ilDB->quote($a_obj_id, "integer") .
86 " AND user_id = " . $ilDB->quote($a_user_id, "integer"));
87
88 $ilDB->manipulateF(
89 "INSERT INTO il_wiki_contributor (status, wiki_id, user_id, status_time) " .
90 "VALUES (%s,%s,%s,%s)",
91 array("integer", "integer", "integer", "timestamp"),
92 array($a_status, $a_obj_id, $a_user_id, ilUtil::now())
93 );
94 }
static now()
Return current timestamp in Y-m-d H:i:s format.

Referenced by ilObjWikiGUI\saveGradingObject().

+ Here is the caller graph for this function:

Field Documentation

◆ STATUS_FAILED

const ilWikiContributor::STATUS_FAILED = 2

◆ STATUS_NOT_GRADED

const ilWikiContributor::STATUS_NOT_GRADED = 0

◆ STATUS_PASSED

const ilWikiContributor::STATUS_PASSED = 1

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