LTI Integration Library  3.1.0
PHP class library for building LTI integrations
MoodleApiResourceLink.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
17 {
18  use MoodleApi;
19 
27  public function getMemberships($withGroups)
28  {
29  $this->sourceObject = $this->resourceLink;
30  if (!empty($this->resourceLink->getContextId())) {
31  $this->courseId = $this->resourceLink->getContext()->ltiContextId;
32  }
33  $this->courseId = '2';
34 
35  $users = $this->get($withGroups);
36 
37  if (!empty($this->resourceLink->getContextId())) {
38  $this->resourceLink->getContext()->groupSets = $this->resourceLink->groupSets;
39  $this->resourceLink->getContext()->groups = $this->resourceLink->groups;
40  }
41 
42  return $users;
43  }
44 
45 }
Class to handle Moodle web service requests.
Definition: MoodleApi.php:17