ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLTIConsumerGradeSynchronization Class Reference
+ Collaboration diagram for ilLTIConsumerGradeSynchronization:

Public Member Functions

 getId ()
 
 getObjId ()
 
 getUsrId ()
 
 getResult ()
 

Static Public Member Functions

static getGradesForObject (int $objId, ?int $usrID=null, ?string $activity_progress=null, ?string $grading_progress=null, ?ilDateTime $startDate=null, ?ilDateTime $endDate=null)
 

Data Fields

int $id
 
int $obj_id
 
int $usr_id
 
float $result = null
 

Detailed Description

Definition at line 29 of file class.ilLTIConsumerGradeSynchronization.php.

Member Function Documentation

◆ getGradesForObject()

static ilLTIConsumerGradeSynchronization::getGradesForObject ( int  $objId,
?int  $usrID = null,
?string  $activity_progress = null,
?string  $grading_progress = null,
?ilDateTime  $startDate = null,
?ilDateTime  $endDate = null 
)
static

Definition at line 61 of file class.ilLTIConsumerGradeSynchronization.php.

61 : array
62 {
63 global $DIC; /* @var \ILIAS\DI\Container $DIC */
64
65 $query = 'SELECT * FROM lti_consumer_grades'
66 . ' WHERE obj_id = ' . $DIC->database()->quote($objId, 'integer');
67
68 if ($usrID != null) {
69 $query .= ' AND usr_id = ' . $DIC->database()->quote($usrID, 'integer');
70 }
71
72 if ($activity_progress != null) {
73 $query .= ' AND activity_progress = ' . $DIC->database()->quote($activity_progress, 'text');
74 }
75
76 if ($grading_progress != null) {
77 $query .= ' AND grading_progress = ' . $DIC->database()->quote($grading_progress, 'text');
78 }
79
80 if ($startDate != null && $startDate->get(IL_CAL_DATETIME) != null) {
81 $query .= ' AND lti_timestamp >= ' . $DIC->database()->quote($startDate->get(IL_CAL_DATETIME), 'timestamp');
82 }
83
84 if ($endDate != null && $endDate->get(IL_CAL_DATETIME) != null) {
85 $query .= ' AND lti_timestamp <= ' . $DIC->database()->quote($endDate->get(IL_CAL_DATETIME), 'timestamp');
86 }
87
88 $query .= ' ORDER BY lti_timestamp DESC';
89
90 $res = $DIC->database()->query($query);
91
92 $results = [];
93
94 while ($row = $DIC->database()->fetchAssoc($res)) {
95 $results[] = $row;
96 }
97
98 return $results;
99 }
const IL_CAL_DATETIME
$res
Definition: ltiservices.php:69
$results
global $DIC
Definition: shib_login.php:26
$objId
Definition: xapitoken.php:57

References $DIC, $objId, $res, $results, and IL_CAL_DATETIME.

Referenced by ilLTIConsumerGradeSynchronizationGUI\showCmd().

+ Here is the caller graph for this function:

◆ getId()

ilLTIConsumerGradeSynchronization::getId ( )

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

References $id.

◆ getObjId()

ilLTIConsumerGradeSynchronization::getObjId ( )

◆ getResult()

ilLTIConsumerGradeSynchronization::getResult ( )

Definition at line 56 of file class.ilLTIConsumerGradeSynchronization.php.

References $result.

◆ getUsrId()

ilLTIConsumerGradeSynchronization::getUsrId ( )

Field Documentation

◆ $id

int ilLTIConsumerGradeSynchronization::$id

Definition at line 31 of file class.ilLTIConsumerGradeSynchronization.php.

Referenced by getId().

◆ $obj_id

int ilLTIConsumerGradeSynchronization::$obj_id

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

Referenced by getObjId().

◆ $result

float ilLTIConsumerGradeSynchronization::$result = null

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

Referenced by getResult().

◆ $usr_id

int ilLTIConsumerGradeSynchronization::$usr_id

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

Referenced by getUsrId().


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