-
Improvement
-
Resolution: Fixed
-
Minor
-
1.9.15
-
None
-
Adobe Connect Module Number: 2011072100
-
Any
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE, MOODLE_20_STABLE
Description of the issue
---------------------------------------------------------------------------------
Scenario: You have a course with no groups defined in it. You try to create an Adobe Connect activity with "groups mode" set to "separate groups" or "visible groups"
Result: Upon clicking "save", you are taken to a page with the following error: "Could not add a new instance of adobeconnect"
Expected Behaviour
---------------------------------------------------------------------------------
It is unclear to the user what has just happened. As a user, I would expect:
1. A descriptive error message or
2. Not to have been able to select anything other than "no groups" in the first place.
This is especially true because the Adobe Connect module differs from other Moodle activities in that "group mode" needs to be set correctly at the time of activity creation (the number of meetings attached to a given Adobe Connect activity cannot be updated once it has been created). When you first create the activity and hit 'save':
- If group mode is set to "no groups" the activity module creates a single meeting for the activity
- If group mode is set to "separate groups" or "visible groups", the activity module tries to create a meeting for each group in the course site. If there are 0 groups defined for the site when the activity created, no meeting can be created, hence the error.
Resolution
---------------------------------------------------------------------------------
The bit of code causing the 'Could not add a new instance of adobeconnect' message is:
adobeconnect/lib.php
Line 73-75:
if (empty($crsgroups)) {
return;
}
I see two options.
1. A descriptive error message (and make sure the newly created adobeconnect record is deleted, otherwise the user won't be able to create a meeting with the same title):
ADD
notify("You cannot create an Adobe Connect meeting in group mode because the course has no defined groups.");
if (!delete_records('adobeconnect', 'id', $recid)) {
notify("Error occurred while deleting the adobeconnect record.");
}
BEFORE
return;
(I haven't made this a patch, a proper one can be made once we work out what the module's expected behaviour is If we go with an error message, it should be put in the language file anyway...)
Pro: The user knows what happened, and how to fix it.
Con: The user would have liked to know that before submitting the form and losing all the data they filled in.
2. Not to have been able to select anything other than "no groups" in the first place.
Given the special 'group mode' requirements for this activity module as outlined above, mod_form.php could check the number of groups in a course. If there are none, it could grey out the checkbox and force the value of 'groupmode' to '0' (no groups). Another possibility would be to leave the drop-down enabled but to make sure that 'groupmode' == '0' (could it throw a validation error with a red box otherwise?)
Pro: groupmode will be locked to 'no groups' so the error will never be seen
Con: I don't believe group mode is disabled on activity creation elsewhere in the site, the inconsistency might confuse the user if there is no explanation
...So, what do you think?