Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40843

Bugs in several modules when accessing groups in recent activity report

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      run behat tests from MDL-44955 (some of them unfortunately fail with seg fault close to the end)

      The only module that I did not cover with behat is chat:

      1. Create chat activity in separate group mode, create groups, enrol several students and assign them to the groups.
      2. Open two browser windows and login as two students in the same group, open chat window, start typing
      3. Make sure students see each other's presence in recent activity block (this is not reflected in the recent activity report)
      4. Open two browser windows and login as two students in different groups, open chat window, start typing
      5. Make sure students don't see other person's presence in recent activity block
      Show
      run behat tests from MDL-44955 (some of them unfortunately fail with seg fault close to the end) The only module that I did not cover with behat is chat: Create chat activity in separate group mode, create groups, enrol several students and assign them to the groups. Open two browser windows and login as two students in the same group, open chat window, start typing Make sure students see each other's presence in recent activity block (this is not reflected in the recent activity report) Open two browser windows and login as two students in different groups, open chat window, start typing Make sure students don't see other person's presence in recent activity block
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      wip-MDL-40843-master
    • Sprint:
      BACKEND Sprint 11

      Description

      While working on MDL-34397 I was reviewing all cases of writing to course_modinfo objects (returned by get_fast_modinfo()). I found copy-pasted code for accessing module groups in following files:

      • course/recent.php
      • mod/assign/lib.php
      • mod/assignment/lib.php
      • mod/chat/lib.php
      • mod/feedback/lib.php
      • mod/forum/lib.php
      • mod/quiz/lib.php
      • mod/wiki/lib.php
      • mod/workshop/lib.php

      Of which assign, assignment, feedback, quiz and workshop access the $modinfo->groups incorrectly - this array is indexed by groupping id but acceed with module id as a key instead.

      Also mod_glossary accesses groups incorrectly

      Will try to understand the error it can cause and create tests.

      Creating separate issue for it because it may need fixing in stable versions too.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marina Marina Glancy
                Reporter:
                marina Marina Glancy
                Peer reviewer:
                Andrew Davis
                Integrator:
                Damyon Wiese
                Tester:
                Frédéric Massart
                Participants:
                Component watchers:
                Damyon Wiese, Adrian Greeve, Mihail Geshoski, Peter Dias, Adrian Greeve, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/May/14