Hi all,
The groups
implementation in Moodle is orientated to class cohorts, but not to
work with small groups. Ideal features would involve teams of
students assigned on a per-activity basis, and different activities
(or activity topic) assigned to each team.
One key change for
that objective is making possible that a single student will be a
member of different groups or teams. Thus, you can use different
grouping arrangements in different activities, quite unlike the
scenario now: you need to close an activity if you want to start a
new one with different teams.
I like the idea of adding a
"category" field to groups. That way you can have
"Laboratory", "Seminars", "Field projects"
"Assignment1", Assignment 2" groups etc. Within each
category the same students are arranged and grouped in different
sets.
I have browsed the code quickly. I have realized that
some library functions that check group membership are prepared to
return an array of group a user is member of. But usually when those
functions are really used in code its is expected to return a single
group.
I would like to ask for advice from people with a
better knowledge of Moodle code. Would it be a dramatic workload to
refactor all group-managing functions to allow multiple membership?
Are those functions used in many
I have the idea that if the
"category" membership is added as an extra default
parameter, old code would not be broken. As an example:
function
user_group($courseid, $userid)
can become
function
user_group($courseid, $userid, $category="")
Existing
references to the "new" user_group() may return the first or
default category groups, without breaking existing scripts. But new
code can exploit the $category to add new features.
I am only
an "aficionado" at application programming. I feel that the
groups categories could be easily stored in the database with quite
simple tables.
What do you think?