microsoft / o365-moodle

Office 365 and Azure Active Directory plugins for Moodle
GNU General Public License v3.0
184 stars 138 forks source link

Better notification that a hidden course will only be processed for Teams group creation when it is set to visible #1814

Open kinnectus opened 3 years ago

kinnectus commented 3 years ago

Please could we improve the UI to inform administrators/users that a Teams group will only be created/processed when the Moodle course has been set to "show" in the course administration? I have wasted a whole day troubleshooting a potential database issue when it turns out a small piece of the code to process a group requires the course visibility be true (1).

https://github.com/microsoft/moodle-local_o365/blob/8459fb2c97094e8cbd136fb44ffad9bcdf64d1c2/classes/feature/usergroups/coursegroups.php#L115

The "crs.visible != 0" is used to filter out courses in the process of copy or restore, which may contain incorrect or incomplete contents.

It would be helpful on the 'acp.php?mode=usergroupcustom' page to have a column (within the search results table) with the course visibility and an additional piece of text informing the reason why a Teams group won't be processed, just as the code itself contains a PHP comment stating the reason.

The fix should be very simple because the plugin is already grabbing all the course values (lines 112 and 113)

$sql = 'SELECT crs.*
           FROM {course} crs

An additional language string for the explanation also wouldn't be difficult

Possible UI improvement:

image

weilai-irl commented 3 years ago

Hi @kinnectus,

This is very valid point. We can convert this to a configuration settings to allow site admins to choose whether to sync hidden courses.

It's queued now and will be processed in the coming months.

Regards, Lai

kinnectus commented 1 year ago

Do we have any update on this? Having been away from this for a while we forgot that hidden courses don't get synced and inadvertently spent (wasted) some time investigating why it wasn't working, only to remember the course was hidden.

A simple column on the page to identify the course as hidden would be an easy implementation, if the time to implement the admin ability to sync hidden courses is to take some time.

Thank you