Moodle

Hidden teacher

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.1, 1.8
  • Fix Version/s: 1.9
  • Component/s: Roles / Access
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

The function of a hidden teacher in courses is gone with 1.7. In the logic of the roles system a hidden teacher should be a new role, but it is not possible to add this function in the role settings. Or am I wrong?

Issue Links

Activity

Hide
Jeff Wood added a comment -

Not sure if this is the same issue but:

When a course is hidden from students and a user has the role of teacher (according to course roles) that person does not see the course as one they teach and can only gain access to the course when the course is made available to students.

Show
Jeff Wood added a comment - Not sure if this is the same issue but: When a course is hidden from students and a user has the role of teacher (according to course roles) that person does not see the course as one they teach and can only gain access to the course when the course is made available to students.
Hide
Chardelle Busch added a comment -

I agree with Ralph. We really need a hide feature, not only to hide teachers but to hide the course creator-I don't think it is appropriate to show the course creator in the course info. ALSO, not only is the hide feature gone from course teachers, but so is the ordering. It is nice to be able to order the teacherslead teacher first, etc., for the course info, but my main concern is that I used the ordering (authority =) code to print the teachers in order on certificates (certificate mod), now I am at a loss as to how to do that-I think this is also an important issue.

In sum, we need the hidden and the authority code put back into the course teacher/creator roles.

Could one of the role gurus comment on this please.

Thanks

And Jeff, you're right, an editing teacher does not see a hidden course-this is definitely a bug-maybe it needs its own issue.

Show
Chardelle Busch added a comment - I agree with Ralph. We really need a hide feature, not only to hide teachers but to hide the course creator-I don't think it is appropriate to show the course creator in the course info. ALSO, not only is the hide feature gone from course teachers, but so is the ordering. It is nice to be able to order the teacherslead teacher first, etc., for the course info, but my main concern is that I used the ordering (authority =) code to print the teachers in order on certificates (certificate mod), now I am at a loss as to how to do that-I think this is also an important issue. In sum, we need the hidden and the authority code put back into the course teacher/creator roles. Could one of the role gurus comment on this please. Thanks And Jeff, you're right, an editing teacher does not see a hidden course-this is definitely a bug-maybe it needs its own issue.
Hide
Yu Zhang added a comment -

Hi,

The "Hide" feature is in 1.8. It hides users from both participants listing and course description area from users without the capability to view. Jeff could you please file a separate bug on the hidden course issue?

Cheers,

Yu

Show
Yu Zhang added a comment - Hi, The "Hide" feature is in 1.8. It hides users from both participants listing and course description area from users without the capability to view. Jeff could you please file a separate bug on the hidden course issue? Cheers, Yu
Hide
Jeff Wood added a comment -

Turns out there was a setting in the user roles profile for teachers that was inherent and should have been allow (moodle/course:viewhiddencourses)

Setting this to allow enables teachers to see hidden courses.

Yu - should I still list this as a bug?

Jeff

Show
Jeff Wood added a comment - Turns out there was a setting in the user roles profile for teachers that was inherent and should have been allow (moodle/course:viewhiddencourses) Setting this to allow enables teachers to see hidden courses. Yu - should I still list this as a bug? Jeff
Hide
Helen Foster added a comment -

Thanks Yu, working perfectly in 1.8

Show
Helen Foster added a comment - Thanks Yu, working perfectly in 1.8
Hide
Pablo Etcheverry added a comment -

I need this solved for the 1.7 branch. I agree with Chardelle about this: it's not only about hiding teachers, the order is VERY important also. Another thing is that before these changes we could add a "Role in course", something like a description of the teacher's work in that particular course. For instance, "Group A teacher", "Big Boss", "Secretary" and so on.

Show
Pablo Etcheverry added a comment - I need this solved for the 1.7 branch. I agree with Chardelle about this: it's not only about hiding teachers, the order is VERY important also. Another thing is that before these changes we could add a "Role in course", something like a description of the teacher's work in that particular course. For instance, "Group A teacher", "Big Boss", "Secretary" and so on.
Hide
Martin Dougiamas added a comment -

About hidden teachers: it's there though the GUI is not very intuitive I know (and there is no help).

When assigning a role, you can check the "hidden" icon (the eye) just before you hit the move button ... this will make that role assignment hidden.

Yu, can you check that the 1.7 upgrade is honouring the old hidden field from user_teachers and fix it if it isn't?

Can you also add some help?

Unfortunately I think the only solution for Pablo at this point is to go through and unassign the teachers that should be hidden and then re-assign them again with that checkbox turned on.

Show
Martin Dougiamas added a comment - About hidden teachers: it's there though the GUI is not very intuitive I know (and there is no help). When assigning a role, you can check the "hidden" icon (the eye) just before you hit the move button ... this will make that role assignment hidden. Yu, can you check that the 1.7 upgrade is honouring the old hidden field from user_teachers and fix it if it isn't? Can you also add some help? Unfortunately I think the only solution for Pablo at this point is to go through and unassign the teachers that should be hidden and then re-assign them again with that checkbox turned on.
Hide
Martin Dougiamas added a comment -

I've added Pablo as a watcher

Show
Martin Dougiamas added a comment - I've added Pablo as a watcher
Hide
Pablo Etcheverry added a comment -

Martin, do you think I should file a separate request for the order and the "course roles" issues, leaving here just the ones related to hidden teachers?

Show
Pablo Etcheverry added a comment - Martin, do you think I should file a separate request for the order and the "course roles" issues, leaving here just the ones related to hidden teachers?
Hide
Pablo Etcheverry added a comment -

The old screen. The different problems are coloured. In red: the option to hide a teacher. In green: the order of appearance. In blue: the "local role" or "function in the course".

Show
Pablo Etcheverry added a comment - The old screen. The different problems are coloured. In red: the option to hide a teacher. In green: the order of appearance. In blue: the "local role" or "function in the course".
Hide
Pablo Etcheverry added a comment -

Martin, I have attached an image illustrating the three different problems. Do you mean that after migration all this information has been lost?

Show
Pablo Etcheverry added a comment - Martin, I have attached an image illustrating the three different problems. Do you mean that after migration all this information has been lost?
Hide
Yu Zhang added a comment -

Hi Pablo,

This information is lost unfortunately because hidden assignments did it make it to 1.7. I have backported hidden assignment features to 1.7 so now when you assign a teacher (any user in fact), you can click the box with the eye icon, just like martin said, to hide these users. They will not appear on the participants screen or the course description page.

You can either manually unassign, then assign them with hidden box clicked, or, if all these users have hidden assignments throughout moodle, you can simple do something like

update mdl_role_assignments set hidden="1" where userid="100", and they will not show up to your students anymore.

Show
Yu Zhang added a comment - Hi Pablo, This information is lost unfortunately because hidden assignments did it make it to 1.7. I have backported hidden assignment features to 1.7 so now when you assign a teacher (any user in fact), you can click the box with the eye icon, just like martin said, to hide these users. They will not appear on the participants screen or the course description page. You can either manually unassign, then assign them with hidden box clicked, or, if all these users have hidden assignments throughout moodle, you can simple do something like update mdl_role_assignments set hidden="1" where userid="100", and they will not show up to your students anymore.
Hide
Pablo Etcheverry added a comment -

Hi Yu,

I have tested this, but unfortunately it still doesn't work well. All the "course creators" appeared in every course, so I removed them from the site roles. After that I put them back as "course creators", but this time clicked the eye icon before doing so. Anyway, they keep on appearing as visible under "Participants" in every course... am I forgetting something?

Show
Pablo Etcheverry added a comment - Hi Yu, I have tested this, but unfortunately it still doesn't work well. All the "course creators" appeared in every course, so I removed them from the site roles. After that I put them back as "course creators", but this time clicked the eye icon before doing so. Anyway, they keep on appearing as visible under "Participants" in every course... am I forgetting something?
Hide
Yu Zhang added a comment -

Hi Pablo,

1) Could you please make sure these users don't have a normal role (like a student) that's not hidden?

2) What participants page is it on, is it something like
http://17.moodle.com/user/index.php?contextid=3?

Cheers,

Yu

Show
Yu Zhang added a comment - Hi Pablo, 1) Could you please make sure these users don't have a normal role (like a student) that's not hidden? 2) What participants page is it on, is it something like http://17.moodle.com/user/index.php?contextid=3? Cheers, Yu
Hide
Pablo Etcheverry added a comment -

1) Do you mean that, if I want a user to be hidden she must be hidden in EVERY context? If that's the case... do you think we can get to a better solution to avoid this situation?

2) Yes, that's the page.

Cheers,
Pablo

Show
Pablo Etcheverry added a comment - 1) Do you mean that, if I want a user to be hidden she must be hidden in EVERY context? If that's the case... do you think we can get to a better solution to avoid this situation? 2) Yes, that's the page. Cheers, Pablo
Hide
Yu Zhang added a comment -

Hi Pablo,

I think if a user is a course creator (of the site context), and a student in a course, and her student role is not hidden, then she will show up in the participants list (under ALL roles and the "student" role), and this should be the correct behavior.

Show
Yu Zhang added a comment - Hi Pablo, I think if a user is a course creator (of the site context), and a student in a course, and her student role is not hidden, then she will show up in the participants list (under ALL roles and the "student" role), and this should be the correct behavior.
Hide
Pablo Etcheverry added a comment -

Hi Yu,

Sorry, but I don't quite understand this. Suppose I have four courses: A,B,C and D. I also have user "Susan" who is a course creator in the site context.

1) I don't want her to appear as visible in course A, B or C, since students could be confused about this.
2) She is also an editing teacher in course "D", so in that course she should be visible, since she is the real teacher.

Is that possible?
Cheers,
Pablo

P.S. Please tell me what should I do about the other tow problems (http://tracker.moodle.org/browse/MDL-7552#action_27459)

Show
Pablo Etcheverry added a comment - Hi Yu, Sorry, but I don't quite understand this. Suppose I have four courses: A,B,C and D. I also have user "Susan" who is a course creator in the site context. 1) I don't want her to appear as visible in course A, B or C, since students could be confused about this. 2) She is also an editing teacher in course "D", so in that course she should be visible, since she is the real teacher. Is that possible? Cheers, Pablo P.S. Please tell me what should I do about the other tow problems (http://tracker.moodle.org/browse/MDL-7552#action_27459)
Hide
Yu Zhang added a comment -

Hi Pablo,

It is, you should assign her in site context a hidden course creator role. In course D, just assign her normally as a teacher. This configuration works for me. On your installation she might have more than 2 role assignments, so I am suggesting you take a look at the db (mdl_role_assignments table) to see if she's got more than 2 role assignments. I will get back to you regarding your other problems.

Cheers

Show
Yu Zhang added a comment - Hi Pablo, It is, you should assign her in site context a hidden course creator role. In course D, just assign her normally as a teacher. This configuration works for me. On your installation she might have more than 2 role assignments, so I am suggesting you take a look at the db (mdl_role_assignments table) to see if she's got more than 2 role assignments. I will get back to you regarding your other problems. Cheers
Hide
Yu Zhang added a comment -

Hi Pablo,

Regarding the sortorder and different naming of roles, we suggest you create duplicate roles (duplicate the "teacher" role) with different role names, as roles order is sortable.

Show
Yu Zhang added a comment - Hi Pablo, Regarding the sortorder and different naming of roles, we suggest you create duplicate roles (duplicate the "teacher" role) with different role names, as roles order is sortable.
Hide
Pablo Etcheverry added a comment -

Hi Yu,

I have tested this until I found that this is still not in 1.7! That's why I couldn't make it work... I found it only in 1.162.2.5, not in 1.142.2.10...
I can't think I'm the only one having problems with this kind of hidden assignments, could this be solved for the 1.7 branch?

Regarding your message dated 3/12, the solution with different role names is not good enough since I can't create roles at course level. I mean that EVERY course sitewide would see the roles for the others. Let me explain this: suppose I have Course A, where they want to call their teachers "Facilitators" and assign them to "Groups". So I would have a role named "Facilitator for Group 1", "Facilitator for Group 2" and so on. Now suppose I have course B, where they use the "Teacher" word. In this case they would have "Teacher for Group 1", "Teacher for Group 2" and so on.

I would face the following problems:
1) I would have to define this roles at site level.
2) Everyone on Course A would see a combo box with the Roles "Teacher for Group x", which belong to Course B.
3) The interface for defining roles does not have a "Copy" or "Clone Role" button, so all of this multiple "fake roles" (I mean fake because they would have the same capabilities) would have to be built through a lenghty process.
4) This roles could only be built by an Administrator (they are site level).
5) The sort wouldn't work, since I would be sorting the roles for EVERY course, not the roles within a single course. I would have to sort "Teacher for Group 1", "Facilitator for Group 1", "Headmaster", "Course Director", etc., all belonging to different courses.

I think this subject needs further discussion, maybe even moving the subject to moodle.org forums. What do you think?

TIA,
Pablo

Show
Pablo Etcheverry added a comment - Hi Yu, I have tested this until I found that this is still not in 1.7! That's why I couldn't make it work... I found it only in 1.162.2.5, not in 1.142.2.10... I can't think I'm the only one having problems with this kind of hidden assignments, could this be solved for the 1.7 branch? Regarding your message dated 3/12, the solution with different role names is not good enough since I can't create roles at course level. I mean that EVERY course sitewide would see the roles for the others. Let me explain this: suppose I have Course A, where they want to call their teachers "Facilitators" and assign them to "Groups". So I would have a role named "Facilitator for Group 1", "Facilitator for Group 2" and so on. Now suppose I have course B, where they use the "Teacher" word. In this case they would have "Teacher for Group 1", "Teacher for Group 2" and so on. I would face the following problems: 1) I would have to define this roles at site level. 2) Everyone on Course A would see a combo box with the Roles "Teacher for Group x", which belong to Course B. 3) The interface for defining roles does not have a "Copy" or "Clone Role" button, so all of this multiple "fake roles" (I mean fake because they would have the same capabilities) would have to be built through a lenghty process. 4) This roles could only be built by an Administrator (they are site level). 5) The sort wouldn't work, since I would be sorting the roles for EVERY course, not the roles within a single course. I would have to sort "Teacher for Group 1", "Facilitator for Group 1", "Headmaster", "Course Director", etc., all belonging to different courses. I think this subject needs further discussion, maybe even moving the subject to moodle.org forums. What do you think? TIA, Pablo
Hide
Yu Zhang added a comment -

Hi Pablo,

You need to be using the latest 1.7.1+ to use the backported hidden assignment features.

Show
Yu Zhang added a comment - Hi Pablo, You need to be using the latest 1.7.1+ to use the backported hidden assignment features.
Hide
Yu Zhang added a comment -

Hi Pablo,

To implement what you want we need to make a separate database table to keep track of the different customized display role names within each course, and change code in many places to pull names out from this table in a course context.

The "duplicate role" function is introduced in 1.8.

Cheers,

Yu

Show
Yu Zhang added a comment - Hi Pablo, To implement what you want we need to make a separate database table to keep track of the different customized display role names within each course, and change code in many places to pull names out from this table in a course context. The "duplicate role" function is introduced in 1.8. Cheers, Yu
Hide
Pablo Etcheverry added a comment -

Thanks for your efforts, Yu. I'm surely doing a very stupid mistake here, but when I issue a "cvs status index.php" inside /user, I get:

File: index.php Status: Up-to-date

Working revision: 1.142.2.10
Repository revision: 1.142.2.10 /cvsroot/moodle/moodle/user/index.php,v
Sticky Tag: MOODLE_17_STABLE (branch: 1.142.2)
Sticky Date: (none)
Sticky Options: (none)

In this version the hidden feature does not work. So I tried diffing it against 18_STABLE:
"cvs diff -r 1.142.2.9 -r 1.162.2.5 index.php" and it returned a lot of differences, of course, but I can see a line reading:

"170 > $hiddensql = has_capability('moodle/role:viewhiddenassigns', $context)? '':' AND r.hidden = 0 ';".

Isn't this one of the lines that should be in 1.7 branch? What am I doing wrong?

Thanks again for your pacience,
Pablo

Show
Pablo Etcheverry added a comment - Thanks for your efforts, Yu. I'm surely doing a very stupid mistake here, but when I issue a "cvs status index.php" inside /user, I get: File: index.php Status: Up-to-date Working revision: 1.142.2.10 Repository revision: 1.142.2.10 /cvsroot/moodle/moodle/user/index.php,v Sticky Tag: MOODLE_17_STABLE (branch: 1.142.2) Sticky Date: (none) Sticky Options: (none) In this version the hidden feature does not work. So I tried diffing it against 18_STABLE: "cvs diff -r 1.142.2.9 -r 1.162.2.5 index.php" and it returned a lot of differences, of course, but I can see a line reading: "170 > $hiddensql = has_capability('moodle/role:viewhiddenassigns', $context)? '':' AND r.hidden = 0 ';". Isn't this one of the lines that should be in 1.7 branch? What am I doing wrong? Thanks again for your pacience, Pablo
Hide
Yu Zhang added a comment -

Hi Pablo,

I am so sorry, this somehow didn't get into cvs. I have checked in the 2 missing lines. Please update, the newest version for user/index.php is 1.142.2.11.

Cheers,

Yu

Show
Yu Zhang added a comment - Hi Pablo, I am so sorry, this somehow didn't get into cvs. I have checked in the 2 missing lines. Please update, the newest version for user/index.php is 1.142.2.11. Cheers, Yu
Hide
Yu Zhang added a comment -

Hidden teachers is working, sorting has to wait till 1.9

Show
Yu Zhang added a comment - Hidden teachers is working, sorting has to wait till 1.9

People

Dates

  • Created:
    Updated:
    Resolved: