Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11180 19PERF META BUG: Inspect and merge Catalyst accesslib improvements into HEAD
  3. MDL-11381

Participants who have X > 1 roles in a course appear X times on the participant list

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Roles / Access
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Just noticed I was appearing twice in the participant list because I was a teacher and a student in the same course.

      Adding a "GROUP BY u.id" works on MySQL, eg something like the code below, but I suspect it might have some problems on PostgreSQL, even though looking at the data it SEEMS that all the data in the rows are identical.

      Index: user/index.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/user/index.php,v
      retrieving revision 1.190
      diff -c -r1.190 index.php

          • user/index.php 20 Sep 2007 05:54:32 -0000 1.190
          • user/index.php 21 Sep 2007 06:48:25 -0000
            ***************
          • 383,389 ****
            }

      if ($table->get_sql_sort())

      { ! $sort = ' ORDER BY '.$table->get_sql_sort(); }

      else

      { $sort = ''; }
      — 383,389 ----
      }

      if ($table->get_sql_sort()) { ! $sort = 'GROUP BY u.id ORDER BY '.$table->get_sql_sort(); } else { $sort = ''; }

        Attachments

          Activity

            People

            Assignee:
            martinlanghoff Martín Langhoff
            Reporter:
            dougiamas Martin Dougiamas
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08