Skip to content

Commit

Permalink
PM-46464 adjusting typing to appease bug in moodle-plugin-ci linting …
Browse files Browse the repository at this point in the history
…rules
  • Loading branch information
mk-kialo committed Aug 28, 2024
1 parent 10d315b commit ed8a077
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions classes/lti_flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public static function init_resource_link(
string $deploymentid,
string $moodleuserid,
string $discussionurl,
?string $groupid = null,
?string $groupname = null
string $groupid,
string $groupname
): LtiMessageInterface {
$context = context_module::instance($coursemoduleid);
$roles = self::assign_lti_roles($context);
Expand Down
10 changes: 9 additions & 1 deletion tests/classes/lti_flow_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,15 @@ public function test_init_resource_link(): void {
// Construct the initial LTI message sent to Kialo when the user clicks on the activity.
$deploymentid = "random-string-123";
$discussionurl = "random-discussion-url.com";
$message = lti_flow::init_resource_link($this->course->id, $this->cmid, $deploymentid, $this->user->id, $discussionurl);
$message = lti_flow::init_resource_link(
$this->course->id,
$this->cmid,
$deploymentid,
$this->user->id,
$discussionurl,
"",
""
);
$this->assertNotNull($message);

$params = $message->getParameters()->jsonSerialize();
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 ed8a077

Please sign in to comment.