ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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

Referenced by ilLTIConsumerGradeSynchronizationGUI\initTableData().

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  }
$res
Definition: ltiservices.php:66
const IL_CAL_DATETIME
$objId
Definition: xapitoken.php:57
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
$results
+ 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 ( )

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

References $obj_id.

◆ getResult()

ilLTIConsumerGradeSynchronization::getResult ( )

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

References $result.

56  : ?float
57  {
58  return $this->result;
59  }

◆ getUsrId()

ilLTIConsumerGradeSynchronization::getUsrId ( )

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

References $usr_id.

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: