Moodle

Enable the user to show/hide the list of courses

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8.2
  • Fix Version/s: DEV backlog
  • Component/s: Administration
  • Labels:
    None
  • Difficulty:
    Difficult
  • Affected Branches:
    MOODLE_18_STABLE

Description

As per default the list of courses is visible to other teachers or students, some of the users may wish to hide their list of courses.

The proposition is to enable the user to show/hide this list of courses.

Poposed solution: Additonal option in the Edit Profile page (similar to the options for showing the emailadress)

Issue Links

Activity

Hide
Christian Grune added a comment -

This proposition is a result from the Moodle-Privacy workshop at the 4th International Moodle Conference in Graz/Austria.
The focus of the workshop was to enable Moodle users with restrictive data protection/data privacy policies to configure Moodle according to their needs.
The relevant privacy issues should have a basis in the Moodle role definitions. Some of them are implemented up from Moodle 1.7. To meet special needs concerning the access to log and personal data should be implemented:

  • just a few additional role definitions / capabilities (site level) and
  • options in the user profile page (user level):

A detailed description of the results is described in the following document and could help the understanding of the whole problem:
http://tracker.moodle.org/secure/attachment/11825/results-privacy-workshop.pdf

Connected issues:

http://tracker.moodle.org/browse/MDL-11247
http://tracker.moodle.org/browse/MDL-11253
http://tracker.moodle.org/browse/MDL-11265
http://tracker.moodle.org/browse/MDL-11257
http://tracker.moodle.org/browse/MDL-11259
http://tracker.moodle.org/browse/MDL-11261
http://tracker.moodle.org/browse/MDL-11262
http://tracker.moodle.org/browse/MDL-11266

Show
Christian Grune added a comment - This proposition is a result from the Moodle-Privacy workshop at the 4th International Moodle Conference in Graz/Austria. The focus of the workshop was to enable Moodle users with restrictive data protection/data privacy policies to configure Moodle according to their needs. The relevant privacy issues should have a basis in the Moodle role definitions. Some of them are implemented up from Moodle 1.7. To meet special needs concerning the access to log and personal data should be implemented:
  • just a few additional role definitions / capabilities (site level) and
  • options in the user profile page (user level):
A detailed description of the results is described in the following document and could help the understanding of the whole problem: http://tracker.moodle.org/secure/attachment/11825/results-privacy-workshop.pdf Connected issues: http://tracker.moodle.org/browse/MDL-11247 http://tracker.moodle.org/browse/MDL-11253 http://tracker.moodle.org/browse/MDL-11265 http://tracker.moodle.org/browse/MDL-11257 http://tracker.moodle.org/browse/MDL-11259 http://tracker.moodle.org/browse/MDL-11261 http://tracker.moodle.org/browse/MDL-11262 http://tracker.moodle.org/browse/MDL-11266
Hide
Jason Meinzer added a comment -

Here is a patch against 1.9 that implements this using a new profilecourses column in mdl_user (profilecourses int2 NOT NULL DEFAULT 0). The patch does not include db migration code, but it should be trivial for someone who knows more about that area than I.

Show
Jason Meinzer added a comment - Here is a patch against 1.9 that implements this using a new profilecourses column in mdl_user (profilecourses int2 NOT NULL DEFAULT 0). The patch does not include db migration code, but it should be trivial for someone who knows more about that area than I.
Hide
André Krüger added a comment -

Martin says to me on Moodlemoot in Heidelberg I should make a reminder for this issue. I hope we can make this tings available asap.

Show
André Krüger added a comment - Martin says to me on Moodlemoot in Heidelberg I should make a reminder for this issue. I hope we can make this tings available asap.
Hide
Teresa Gibbison added a comment -

Is there a patch for version 1.9? I have attempted to apply this to a dev 1.9 version, the interface is great however the option is ignored. All courses are always hidden regardless of the setting the user has selected! Even the Admin cannot see the papers on a user's profile!! Many thanks in anticipation.

Show
Teresa Gibbison added a comment - Is there a patch for version 1.9? I have attempted to apply this to a dev 1.9 version, the interface is great however the option is ignored. All courses are always hidden regardless of the setting the user has selected! Even the Admin cannot see the papers on a user's profile!! Many thanks in anticipation.
Hide
Jason Meinzer added a comment -

Teresa - Did you add a column called profilecourses to the user table in your database? Without this the interface has nowhere to store the setting. The data type should be "int not null default 0"

Show
Jason Meinzer added a comment - Teresa - Did you add a column called profilecourses to the user table in your database? Without this the interface has nowhere to store the setting. The data type should be "int not null default 0"
Hide
Teresa Gibbison added a comment -

Thanks Jason - this works well. I wonder if we could have a capability around this as it would be useful for Admins, Teachers or other defined roles to have the ability to view the papers (e.g. a moodle/site:viewprofilecourses capability).

Also, how do we maintain the database change - is this what you mean by "db migration code"? Do you know if there is documentation that explains how to do this for future Moodle updates (I couldn't find anything in docs.moodle...)?

Show
Teresa Gibbison added a comment - Thanks Jason - this works well. I wonder if we could have a capability around this as it would be useful for Admins, Teachers or other defined roles to have the ability to view the papers (e.g. a moodle/site:viewprofilecourses capability). Also, how do we maintain the database change - is this what you mean by "db migration code"? Do you know if there is documentation that explains how to do this for future Moodle updates (I couldn't find anything in docs.moodle...)?
Hide
Teresa Gibbison added a comment -

OK - I'm attempting to add a capability here so users with a (yet to be created) capability can still see the list even if the user doesn't want them displayed... I've modified the if statement in user\view.php slightly to test my syntax and this works:
...
if ((has_capability('moodle/user:viewhiddendetails', $coursecontext)||($user->profilecourses)) && $mycourses = get_my_courses($user->id, null, null, false, 21)) {
...

Now I'm going to suss out creating a new capability (moodle/site:viewprofilecourses)!

Show
Teresa Gibbison added a comment - OK - I'm attempting to add a capability here so users with a (yet to be created) capability can still see the list even if the user doesn't want them displayed... I've modified the if statement in user\view.php slightly to test my syntax and this works: ... if ((has_capability('moodle/user:viewhiddendetails', $coursecontext)||($user->profilecourses)) && $mycourses = get_my_courses($user->id, null, null, false, 21)) { ... Now I'm going to suss out creating a new capability (moodle/site:viewprofilecourses)!
Hide
Dean Stringer added a comment - - edited

(see diff attachment custom-user-profile-field.patch)

This is how we've decided to implement this locally, using the custom user profile fields instead of a mdl_user table field as mentioned in the original solution above. The patch checks to see if the specific profile field exists and if it doesn't will display courses as usual.

Show
Dean Stringer added a comment - - edited (see diff attachment custom-user-profile-field.patch) This is how we've decided to implement this locally, using the custom user profile fields instead of a mdl_user table field as mentioned in the original solution above. The patch checks to see if the specific profile field exists and if it doesn't will display courses as usual.
Hide
Greg Kraus added a comment -

I would like to second the importance of this issue. It is a violation of FERPA (United States Student Privacy Law) for us not to have a feature like this. The only alternatives for us are to apply the patch or to disallow moodle/course:viewparticipants.

Show
Greg Kraus added a comment - I would like to second the importance of this issue. It is a violation of FERPA (United States Student Privacy Law) for us not to have a feature like this. The only alternatives for us are to apply the patch or to disallow moodle/course:viewparticipants.
Hide
Petr Škoda (skodak) added a comment -

See the linked bug MDL-17486, now you can at least make this field hidden in profiles if you are running latest 1.9.x.

Show
Petr Škoda (skodak) added a comment - See the linked bug MDL-17486, now you can at least make this field hidden in profiles if you are running latest 1.9.x.

Dates

  • Created:
    Updated: