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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.15
    • Fix Version/s: 1.9.16, 2.0.2
    • Component/s: Module: Adobeconnect
    • Labels:
      None
    • Environment:
      Adobe Connect Module Number: 2011072100
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      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?

        Attachments

        1. CONTRIB-3290_20-post-patch.png
          154 kB
          Jennifer Edmondson
        2. CONTRIB-3290_20-pre-patch.png
          137 kB
          Jennifer Edmondson
        3. CONTRIB-3290-after-patch.png
          97 kB
          Jennifer Edmondson
        4. CONTRIB-3290-before-patch.png
          17 kB
          Jennifer Edmondson
        5. CONTRIB-3290-groupmode-validation_20_STABLE.patch
          2 kB
          Jennifer Edmondson
        6. CONTRIB-3290-groupmode-validation-3_19_STABLE.patch
          2 kB
          Jennifer Edmondson
        7. CONTRIB-3920-groupmode-validation_19_STABLE.patch
          2 kB
          Jennifer Edmondson
        8. CONTRIB-3920-groupmode-validation-2_19_STABLE.patch
          2 kB
          Jennifer Edmondson

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                21/Feb/11