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

Make modules to declare and use Groupings

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9
    • 1.9
    • Groups
    • None

      Groupings were introduced in version 1.8 as a way to organize groups within a course. However, groupings do not have any practical use in version 1.8 or current 1.9 (HEAD). As in 1.8/1.9 Groupings are more a useless complication than a useful feature. To be productive Groupings must be USED by activity modules. I have proposed a whole new range of groups/groupings features combining the design goals (but not yet implemented) of OU and the implemented version of Groupings working at ULPGC. The spec proposal may be found at http://docs.moodle.org/en/Development:Groupings_and_Groups

      At this stage I will concentrate in two new features:

      a) Making possible to use different groupings by different activities.
      Activities can declare a grouping to use. This means that when that particular activity is set as visible/separate groups, the particular groups used are those belonging to the declared grouping. Hence, we can have simultaneous activities where users are distributed according to different criteria, activities & resources may be targeted to different audiences.

      The needed changes are adding a field "groupingid" to the courses and course_modules tables to hold the grouping that the course itself or each module instance will use when set in visible/separate groupmode. By "using grouping" I mean that grouping-aware functions should operate nor on all groups associated with a course but only those associated with a grouping. So, you may have a forum declaring a grouping and thus using a particular set of groups. At the same time other activity in the course, let say an assignment may declare other grouping and thus treat the same users as distributed in a completely different set of groups.

      "Use grouping" must be added to the configuration form for each module instance, parallel to "groupmode" attribute. Best way is to add to te common module settings

      Module code must be adapted to ensure that $cm->groupingid property now existing is passed to groups-API functions within the module code to return/manage only those groups belonging to the declared grouping.

      b) Group-based content delivery
      Once each activity, and resources, may declare a grouping to use, it is possible to make that those users that are not members of any group of that grouping cannot access to the module content (being it an interactive activity or a Resource module instance)
      A simple checking for group membership at the beggining of the view.php file for each module would do the trick
      Group-membership may be checked at course page (function print_section() ) to make links to forbidden modules invisible to users without suitable access.

      At ULPGC we have a test site with these features ENABLED, that is, already coded. You may find it at http://moodle.ulpgc.es/moodle19ulpgc/course/view.php?id=3
      Try login as user "prof01", "prof02" or "estudiante01", "estudiante02" ... with password "moodle" for all

      The file attached is a unified diff against HEAD that can be used to explore proposed code changes.

        1. diff-ulpgc_groupings-08-07-07
          69 kB
          Enrique Castro
        2. groups.dia
          2 kB
          Petr Skoda
        3. patch-MDL-10383-groups-db-v6.diff
          57 kB
          Nick Freear
        4. patch-Bugz-2617-group_cm.diff
          44 kB
          Nick Freear
        5. patch-MDL-10383-groups-lib-clean-p1.diff
          30 kB
          Nick Freear
        6. groups-db-libchanges.diff
          55 kB
          Matt Clarkson
        7. groups_cleanup2.patch
          114 kB
          Petr Skoda
        There are no Sub-Tasks for this issue.

            skodak Petr Skoda
            ecastro Enrique Castro
            Nobody Nobody (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.