Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3290

'Could not add a new instance of adobeconnect' message when you try to create an activity in group mode in a course site without groups



    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.9.15
    • 1.9.16, 2.0.2
    • Module: Adobeconnect
    • None
    • Adobe Connect Module Number: 2011072100
    • Any


      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.

      The bit of code causing the 'Could not add a new instance of adobeconnect' message is:
      Line 73-75:
      if (empty($crsgroups)) {

      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):


      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.");



      (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?




            adelamarre Akin Delamarre
            jedmondson Jennifer Edmondson
            Akin Delamarre
            0 Vote for this issue
            2 Start watching this issue