unable to view hidden categories and courses

unable to view hidden categories and courses

by Michael Rodgers -
Number of replies: 9
Hello there I am using Moodle version 1.7.1+ and am having a problem using the hidden category and course facility. The idea that I want to achieve is to create a category and courses that are hidden to students but can be seen by teachers and higher roles. The way that I attempted this was to create the category and course and make each one hidden by 'closing the eye'. I marked the course as hidden to students., therefore when logged in as admin both categoery and course appear grey as I beleive they should do.

I then edited the teacher role and set 'view hidden courses' and view hidden categories' to allow / show using the radio button. I then assigned this teacher role to a user and then assigned the user to both category and course. After logging out and then back in as a teacher, with the course and category displayed as a combo list,this function didnt work i.e. neither category or course was displayed. Following conversation with another Moodle forum member in this post http://moodle.org/mod/forum/discuss.php?d=66524 (half way down approx) he said that it seems the only way it would appear for the hidden selections to be viewable was if the setting is set to 'list of courses' which cannot be right?

In the link to the thread above it also seems that if you create a new user that inherits the teacher role but also has allow new role to see hidden category and courses then they cant see the display regardless of the setting.

Does anyone have any past experience or information on this?
Average of ratings: -
In reply to Michael Rodgers

Re: unable to view hidden categories and courses

by Michael Rodgers -
Hello again, although I only created this post yesterday I noticed the lack of responses and wasn't sure if it was a case of people not knowing a resolution or not understanding my problem? I'd have thought this would be a more familiar topic area?

Thanks,
Michael
In reply to Michael Rodgers

Re: unable to view hidden categories and courses

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
I then assigned this teacher role to a user and then assigned the user to both category and course.

Hmm, I'm not sure what you mean by the above statement. thoughtful

Please try accessing a hidden course when logged in as admin, then assign a user the role of teacher via the Assign roles link in course administration block i.e. in the course context. If you then log out and then log in as the user, you should be able to view the hidden course.
In reply to Helen Foster

Re: unable to view hidden categories and courses

by Markus Knierim -
Hi Helen,

I had a similar problem (after upgrading to 1.7.1, teachers couldn't see any of their hidden courses), and I followed your suggestion by re-assigning them the role of a teacher from within each course. This didn't solve the problem, though. Only after I changed the role definition at the site level by enabling the capability moodle/course:viewhiddencourses for teachers, everything returned to "normal" wink I'm still wondering, though, why teachers aren't allowed to see (their own) hidden courses in the first place?

Markus
In reply to Markus Knierim

Re: unable to view hidden categories and courses

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Yes, there was a bug regarding hidden courses - MDL-7939 - in which Yu says:

This is fixed in 1.7, 1.8 and 1.9. All new installs and upgrades will enable teachers, non-editing teachers and course creators to see respective hidden courses by default. However we can not change that for any existing installations. To fix this you just need to log in as admin, go to users->permission->define role and set viewhiddencourses to allow for all these roles.
In reply to Helen Foster

Re: unable to view hidden categories and courses

by Michael Rodgers -
Hi Helen I will try to clarify what I originally meant.

The link http://moodle.org/mod/forum/discuss.php?d=66524 provides a lot of the background information about the process I tried. John Isner (spelling?) originally informed me that a role i.e. teacher can be edited to allow for hidden categories and courses to be seen be only that role. He initially suggested creating a new role based on the current teacher role and allowing for hidden catrgories and courses to be seen, then assigning this role to a user (users > permisions > assign roles). Then create a new category and course and hiding them by closing the eye button and then assign the role to that category. However it apprared that creating the new role didn't work.

After this it was then suggested to edit the current teacher role by allowing /enabling the radio buttons for course and category. The category and course was still hidden from the previous attempt. Then assign a user to the edited teacher role (users > permissons > assign roles) and then assign the teacher role to the hidden category and course (courses > add/edit courses > course category > theh click on the assign roles link and apply the teacher role to that category). I also applied the teacher role to the hidden course (courses > add / edit courses > choose course category > choose assign category face icon for the hidden course > assign teacher role to course)

I think that should all make sense hopefully and the explanation is more detailed? By the way if you assign a role to a category, does that automatically assign the role to all courses within the catergory or do you then need to also individually assign the role to each course as well?

Thanks,
Michael
In reply to Michael Rodgers

Re: unable to view hidden categories and courses

by Michael Rodgers -
Helen I forgot to add to my last post that as well as the above, some other information was also established concerning roles and capabilities.

With the help of John, having created the hidden areas I initially couldn't see the hidden category or course when logged in as a teacher. They were fine using admin access whereby both category and course was displayed in grey to signify they were hidden. It later turned out that in order for the course to be seen by the teacher role, I had to change the front page display (appearance > front page ) when logged in from 'combo list' to 'list of courses' instead. It would seem that hidden areas are only displayed when using list of courses and not combo list as per my site settings which surely shouldn't be the case. Would this also be another bug identified?

I would be interested to know your opinions and thoughts on the above issues?

Thanks,
Michael
In reply to Michael Rodgers

Re: unable to view hidden categories and courses

by Matt Campbell -
You might want to note that MDL-8869 has this as an unresolved bug.

I've got this partly working by changing /course/category.php - look for where it prints out the sub-categories and change the capability from moodle/course:create to moodle/category:visibility.

Thanks,
Matt
In reply to Matt Campbell

Re: unable to view hidden categories and courses

by Gary Weinstein -

Hi Matt,

I want to see hidden course categories as opposed to sub-categories.  The above change doesn't work for this, so can you recommend an edit I can make at course category level.

Regards ... Gary

In reply to Helen Foster

Re: unable to view hidden categories and courses

by Eslam Gamie -

no that was not fixed on 1.9 the same problem exists