Skip to content

Commit

Permalink
PM-46464 fix optional params
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-kialo committed Aug 28, 2024
1 parent ed8a077 commit a29ae40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions classes/lti_flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ public static function assign_lti_roles($context): array {
* @param string $deploymentid
* @param string $moodleuserid
* @param string $discussionurl
* @param string $groupid
* @param string $groupname
* @param string|null $groupid
* @param string|null $groupname
* @return LtiMessageInterface
* @throws LtiExceptionInterface
* @throws \coding_exception
Expand All @@ -154,8 +154,8 @@ public static function init_resource_link(
string $deploymentid,
string $moodleuserid,
string $discussionurl,
string $groupid,
string $groupname
?string $groupid = null,
?string $groupname = null
): LtiMessageInterface {
$context = context_module::instance($coursemoduleid);
$roles = self::assign_lti_roles($context);
Expand Down
4 changes: 1 addition & 3 deletions tests/classes/lti_flow_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,7 @@ public function test_init_resource_link(): void {
$this->cmid,
$deploymentid,
$this->user->id,
$discussionurl,
"",
""
$discussionurl
);
$this->assertNotNull($message);

Expand Down
4 changes: 2 additions & 2 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
$moduleinstance->deployment_id,
$USER->id,
$moduleinstance->discussion_url,
$groupinfo->groupid ?? "",
$groupinfo->groupname ?? "",
$groupinfo->groupid,
$groupinfo->groupname,
);

$output = $PAGE->get_renderer('mod_kialo');
Expand Down

0 comments on commit a29ae40

Please sign in to comment.