Keyholder profile

Keyholder profile

by Tanja Böhnke -
Number of replies: 5

Hello, I need help regarding the keyholder-role. 

I set up a keyholder following these instructions: https://docs.moodle.org/310/en/Keyholder_role

All works fine and the keyholder appears on the enrolment page.

However, if someone wants to click on the keyholders name or profile image on the enrolment page, the link does not function. 

It is not guiding to the profile of the keyholder to be able to contact him. 

Where and how can I change this? 



Attachment Bildschirmfoto 2021-02-14 um 11.06.29.jpg
Average of ratings: -
In reply to Tanja Böhnke

Re: Keyholder profile

by Randy Thornton -
Picture of Documentation writers
Tanja,

To me this looks like a bug.

The url on on the screen for the user profile includes not only the user id but also contains the course id: e.g. https://thornedu.com/moodle310a/user/view.php?id=7&course=3. That means it is trying to show the Keyholder via the course context, because the Keyhold is enrolled inside the course. Since the user on this page is not yet in the course, that is impossible to do. So it does nothing.

If you change the url to just the user profile with id, it works: https://thornedu.com/moodle310a/user/view.php?id=7&;

Are you also showing the Keyhollder on the main front page course list as one of the Course contacts (in Site admin > Appearence > Courses) then that does work. And it works since it is not in the course context.

To work around this issue, you might try not enrolling the Keyholder in the course, but setting it up from the category level instead. Perhaps, if you are lucky, that would work here even in course context.


Randy
In reply to Randy Thornton

Re: Keyholder profile

by Tanja Böhnke -
Dear Randy,

Thanks for the feedback. What you say makes sense.

I tried set up in the n Site admin > Appearance > Courses. But if I set the keyholder to be shown, it is not appearing on the front page course list.

How can I do this: "you might try not enrolling the Keyholder in the course, but setting it up from the category level instead"? I thought that I assigned the keyholder on the category - level  - but it does not work either (see screenshot)

Where and how can I change the url to just the user profile id? I think this would make th etrick, right? 

Thanks for your help,

Tanja
Attachment Bildschirmfoto 2021-02-17 um 17.38.24.jpg
In reply to Tanja Böhnke

Re: Keyholder profile

by Randy Thornton -
Picture of Documentation writers
Tanja,


So, I was wondering if you set the Keyholder as a Category level role or even system level role instead of enrolling them in the course and make the url change. But I just tested this and it does not work. It always puts that $course=# onto the end.

I think the only other way to change the url would be to look at the code.

How to do that is explained is this old Tracker https://tracker.moodle.org/browse/MDL-26017 where there is some code showing how the context is set to the course in the array that defines this. Perhaps setting this to context of SYSTEM might get around this (?)
In reply to Randy Thornton

Re: Keyholder profile

by Tanja Böhnke -
oh, coding is beyond my technical skills.

I guess I'll have to leave it at that the link just doesn't work.

But thanks for your answer and advice. So I know I don't have to keep looking for wrong settings.