Invalid URL message in Microsoft Block #2533
Labels
Issue type - bug
Bugs in existing code that needs to be fixed.
Plugin - block_microsoft
Status - PR ready / pending release
Dev is done and PR ready. Will be included in the next release.
Milestone
Moodle 4.1
Plugins
moodle-local_o365 - MOODLE_401_STABLE
moodle-block_microsoft - MOODLE_401_STABLE
Leaving
$config->odburl
empty inmoodle-local_o365
settings results inInvalid URL
message inmoodle-block_microsoft
moodle-local_o365
moodle-block_microsoft
This is due to the
onedrive
andnotebook
urls being malformed here:https://github.com/microsoft/moodle-local_o365/blob/MOODLE_401_STABLE/classes/rest/unified.php#L491
Which will throw an exception here:
https://github.com/microsoft/moodle-block_microsoft/blob/MOODLE_401_STABLE/block_microsoft.php#L186
Suggest
unified::get_group_urls(object)
should check if$config->odburl
is empty before generating a malformed url foronedrive
andnotebook
.Resulting malformed urls:
https:///_layouts/groupstatus.aspx?id=xxxxxxx-xxxx-xxxx-xxxxxx&target=notebook
https:///_layouts/groupstatus.aspx?id=xxxxxxx-xxxx-xxxx-xxxxxx&target=documents
The text was updated successfully, but these errors were encountered: