X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/lib/lti1p3/src
home
/
cbholdings
/
pasukulu
/
lib
/
lti1p3
/
src
/
📁
..
📁
Helpers
📁
ImsStorage
📁
Interfaces
📄
JwksEndpoint.php
(1.52 KB)
📄
LtiAbstractService.php
(1.36 KB)
📄
LtiAssignmentsGradesService.php
(6.65 KB)
📄
LtiConstants.php
(7.56 KB)
📄
LtiCourseGroupsService.php
(1.99 KB)
📄
LtiDeepLink.php
(2.11 KB)
📄
LtiDeepLinkResource.php
(3.28 KB)
📄
LtiDeepLinkResourceIcon.php
(1.27 KB)
📄
LtiDeployment.php
(392 B)
📄
LtiException.php
(92 B)
📄
LtiGrade.php
(3.77 KB)
📄
LtiGradeSubmissionReview.php
(1.8 KB)
📄
LtiLineitem.php
(3.07 KB)
📄
LtiMessageLaunch.php
(17.73 KB)
📄
LtiNamesRolesProvisioningService.php
(708 B)
📄
LtiOidcLogin.php
(4.69 KB)
📄
LtiRegistration.php
(2.69 KB)
📄
LtiServiceConnector.php
(6.69 KB)
📁
MessageValidators
📄
OidcException.php
(93 B)
📄
Redirect.php
(2.46 KB)
📄
ServiceRequest.php
(4.14 KB)
Editing: LtiCourseGroupsService.php
<?php namespace Packback\Lti1p3; class LtiCourseGroupsService extends LtiAbstractService { public const CONTENTTYPE_CONTEXTGROUPCONTAINER = 'application/vnd.ims.lti-gs.v1.contextgroupcontainer+json'; public function getScope(): array { return $this->getServiceData()['scope']; } public function getGroups(): array { $request = new ServiceRequest( ServiceRequest::METHOD_GET, $this->getServiceData()['context_groups_url'], ServiceRequest::TYPE_GET_GROUPS ); $request->setAccept(static::CONTENTTYPE_CONTEXTGROUPCONTAINER); return $this->getAll($request, 'groups'); } public function getSets(): array { // Sets are optional. if (!isset($this->getServiceData()['context_group_sets_url'])) { return []; } $request = new ServiceRequest( ServiceRequest::METHOD_GET, $this->getServiceData()['context_group_sets_url'], ServiceRequest::TYPE_GET_SETS ); $request->setAccept(static::CONTENTTYPE_CONTEXTGROUPCONTAINER); return $this->getAll($request, 'sets'); } public function getGroupsBySet() { $groups = $this->getGroups(); $sets = $this->getSets(); $groupsBySet = []; $unsetted = []; foreach ($sets as $key => $set) { $groupsBySet[$set['id']] = $set; $groupsBySet[$set['id']]['groups'] = []; } foreach ($groups as $key => $group) { if (isset($group['set_id']) && isset($groupsBySet[$group['set_id']])) { $groupsBySet[$group['set_id']]['groups'][$group['id']] = $group; } else { $unsetted[$group['id']] = $group; } } if (!empty($unsetted)) { $groupsBySet['none'] = [ 'name' => 'None', 'id' => 'none', 'groups' => $unsetted, ]; } return $groupsBySet; } }
Upload File
Create Folder