Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart menus show hidden courses to all users that have the according capability #407

Open
wiebkemueller-hsh opened this issue Sep 27, 2023 · 7 comments
Assignees
Labels
bug Something which isn't working

Comments

@wiebkemueller-hsh
Copy link
Collaborator

wiebkemueller-hsh commented Sep 27, 2023

This is a follow-up issue to #300

  • As a teacher, I want to see my hidden course sorted within the rest of the items of the smart menu. As a teacher I need frequent access to my hidden courses during preparation for the term. I expect my courses in the menu as I am used to see them in the dashboard/mycourses view.
  • As a student, courses that are hidden are not accessible for me, so I do not want to see the courses in my smart menu nor on the mycourses/dashboard.

possible following CR could be:

CR 1 would be to make an admin setting so the admin can decide how users that have the according capability should see the hidden courses in the smart menu (at the end of the list or sorted according to the specified sort order).

CR 2 would be to make an admin setting so the admin can decide whether or not users that have the according capability should see the hidden courses in the smart menu.

CR 3 would be to make an admin setting so the admin can decide whether or not users without the according capability should see the hidden courses in the smart menu with an extra "coming soon hint" (you are subscribed but course is still in preparation).

Note: There is a capability for this that can be used.

@wiebkemueller-hsh wiebkemueller-hsh added the bug Something which isn't working label Sep 27, 2023
@HsH-Wolf HsH-Wolf added the discussion needed Something which needs to be discussed before writing the first line of code label Oct 24, 2023
@HsH-Wolf HsH-Wolf moved this to To do REQ in Boost Union Planning Board Oct 24, 2023
@abias abias moved this from To do REQ to Ready for DEV in Boost Union Planning Board Nov 2, 2023
@wiebkemueller-hsh wiebkemueller-hsh removed the discussion needed Something which needs to be discussed before writing the first line of code label Nov 9, 2023
@wiebkemueller-hsh
Copy link
Collaborator Author

wiebkemueller-hsh commented Nov 28, 2023

Hello @ksteitz

would CR 3 in the above description cover your use case of "Verborgene Kurse: user deren Vorhandensein anzeigen

  • Mo., 20. November 2023, 14:51" (just reading your mails in the HU Forum)?

Regards :-)
Wiebke

@ksteitz
Copy link
Member

ksteitz commented Nov 29, 2023

Hi @wiebkemueller-hsh

thanks a lot! Indeed CR 3 would be of great help!
A few points for clarification:

  1. The outcome would be that every user (meaning also students) see courses they are enrolled into in the smart menu, independent of any other settings or capabilitites?
  2. The hidden course may be clicked, but then the message "This course is currently unavailable to students" appears (which is the intended behaviour)?
  3. Which capability do you mean by "There is a capability for this that can be used"? course:viewhiddencourses? But that one would enable to also enter a hidden course, therefore it may be used for CR1 and CR2 but not for C3. Or another or even new capability?

kind regards
Klaus

@wiebkemueller-hsh
Copy link
Collaborator Author

Hi @ksteitz Klaus,

to 1 yes, and no
for teachers they see the courses in the menu and can access
for students in a way only the title is displayed plus maybe a standard message could be helpful "you are in and content is coming soon"

to 2 a hint before even having to click would be helpful I guess

to 3
regarding this capability I know as much as I put in the description. This was a sum-up of a discussion we had with @abias and @stefanscholz. Maybe - when working on the bug itsself, team @stefanscholz can have a look in the CRs of this and we'll clarify and plan this for the next development period. As for now, this hasn't been agreed to be done, only the bug.

Regards
Wiebke

@ksteitz
Copy link
Member

ksteitz commented Nov 13, 2024

Note on Wiebkes point: "As a student, courses that are hidden are not accessible for me, so I do not want to see the courses in my smart menu nor on the mycourses/dashboard."

As commented above on CR 3, it is important for us that students can see which hidden courses they are enrolled in. Through our campus management interface, all courses are initially hidden and, especially at the start of the semester, the enquiries ‘my course is not there / I am not enrolled’ accumulate.
Therefore, a modular development would be good so that the administration can set via config / capabilities whether students are shown the existence of hidden courses.

thanks!

kind regards
Klaus

@stefanscholz
Copy link
Collaborator

Hi @wiebkemueller-hsh and @ksteitz,

I would like to propose the following specification to address this issue:

Background

  • Smart menus in Boost Union can dynamically show courses based on specific conditions, e.g. by course category, start/end date, enrolment status etc.
  • In addition to the selected conditions, courses must be visible, otherwise they are hidden in smart menus.
  • This even applies for users that have the capability to see hidden courses (moodle/course:viewhiddencourses), such as teachers, and even the administrators.
  • This is inconsistent with Moodle’s core behavior if compared to the “My courses” page or the “Course overview” block.

This issue will be addressed in two stages:

  1. Add support for the capability moodle/course:viewhiddencourses
  2. Implement additional options for appearance and behavior menu items, in particular for hidden courses

See below for the implementation of the first phase which effectively addresses the issue itself and CR2, a follow up issue will be created for the second phase (covering CR1, CR3).

New global setting

A new settings section shall be added to the “Feel” settings category called “Smart menus” below the “Primary navigation” section (i.e. above the “User menu” section) with the following settings:

  • Display only visible courses — checkbox
    • False — default — hidden courses shall be displayed for administrators and users with the appropriate capability moodle/course:viewhiddencourses in the course. A class “menu-item-hiddencourse” shall be added to menu items of a hidden course to enable site administrators to style courses according to their needs. In the first phase, no styling will be added to the courses by Union, this will be implemented in the second phase. (see below)
    • True — current behavior — no hidden courses will be displayed in any smart menu, even for administrators and users that have the capability moodle/course:viewhiddencourses in the course (e.g. teachers).

Why do we need a setting for it?

The current proposal means that the smart menu system will behave differently after the update. The new setting makes administrators aware of the change during the update. This enables them to take action immediately, before any user will be affected.
We assume that most installations want to show “hidden” courses to users that have the capability to see them, because it consistent with Moodle’s core behavior on the “My courses” page. This is why we suggest setting it to “false” by default.

Out of scope for Phase 1

Users which do not have the capability to access the course won’t be able to see the course. This will be dealt with in the second phase, after careful consideration of which appearance and behavior options are required, such as

  • A text hint that the course is hidden (like on “My courses” page)
  • Showing a menu item, but without a link
  • A visual hint about the status of the course (e.g. a small dot) — this could potentially be expanded to indicate the status of the course, including but not limited to completion status or course dates.
  • A custom hint that the course is “Coming soon”
  • The introduction of a new dynamic course condition “Course visibility”, e.g. to create smart menus for “Upcoming courses”.

Test scenarios

Basic setup

  • Create a course “Hidden course” in the category “Hidden courses” and set it to invisible.
  • Create a user called “Terry Teacher” and enrol the teacher in the “Hidden course” as editing teacher.
  • Create a user called “Lisa Learner”.
  • Create a smart menu called “Hidden courses” and add it to the main navigation.
  • Create a smart menu item called “Hidden courses” with the type “Dynamic courses” and the course category “Hidden courses”.

Scenario 1

Set Display only visible courses to true.

  • No user should see the “Hidden courses” smart menu, including the administrator, teachers, authenticated users and guests.

Scenario 2

Set Display only visible courses to false.

  • As an administrator, I should see the course “Hidden course” in the “Hidden courses” smart menu.
  • As the teacher “Terry Teacher”, I should see the course “Hidden course” in the “Hidden courses” smart menu.
  • As the authenticated user “Lisa Learner”, I should not see the “Hidden courses” smart menu at all.
  • As a guest, I should not see the “Hidden courses” smart menu at all.

Please share your thoughts on the suggested approach.

Looking forward to your feedback!

Thanks,
Stefan

@abias
Copy link
Member

abias commented Nov 21, 2024

Hi @stefanscholz and all,

thank you for working on this issue.

I agree with your position that the initial issue (that teachers and other users with the course:viewhiddencourses capability never see hidden courses in the smart menu) should be fixed.

I also agree with CR 2 in a way that the admin should be able to configure this behaviour and be able to disable the presentation of hidden courses if he really wants to.

So far, so good.

However, regarding the implementation of CR 2 (and the necessary implementation of the admin setting), I do not agree that we should have a global BU setting for that. I mainly do not agree because the placement of the setting on the "Feel" settings page would be outside of the "smart menu" settings scope. And it would force admins to decide globally and would not allow them to decide this per dynamic course menu.

Instead, I would propose to implement this setting within the settings of each smart menu item, just below the existing "Dynamic courses: Course list sorting" setting.

I agree that the default of this setting should be false (to avoid changing existing smart menus after the plugin update). And we will simply announce the new possibility in the BU changelog which should be enough from my point of view.


As a sidenote: If we ever come to the point that we will need global smart menu settings, we should adopt the approach of adding tabs to external settings page which we are just preparing in #710 within the CSS snippets feature.


Regarding the styling of the newly presented hidden courses in the smart menu, I am torn if they should really not be styled at all in the first implementation.

Moodle 3 core used to present hidden courses with a dimmed text style in the course list in the navigation drawer. This has been replaced in Moodle 4 core with the "Hidden from students" badge which is added to the course name on the "My courses" page. Both approaches are not really feasible in the smart menu. And I do not have a better idea for a really good first styling. Maybe someone else has a nice idea before the implementation starts. Otherwise, this should be covered later with CR 3.


Furthermore, I miss CR 1 in your specification.
I think this should be supported in the first implementation, simply by adding a "Dynamic courses: Hidden courses sorting" setting to the smart menu item with the two values "Show hidden courses at the end of the course list" and "Sort hidden and visible courses together".


Regarding CR 3, I agree that this is out of scope for the first implementation and should be postponed into a follow-up issue. The questions and necessary decisions which you have already noted will be helpful for the future specification.

Cheers,
Alex

@wiebkemueller-hsh
Copy link
Collaborator Author

Hi @stefanscholz and @abias,

thank you for your proposals and the work on this! In order to keep it simple (Phase 1): The "redaktionsgruppe" has the following opinion on this.

Please prioritise the display of the hidden course to be identifyable as hidden. See screenshot, we recommend to follow the behaviour of the starred courses popover menu for now:

starredcourses

The hidden course is greyed out, the sort order is then according to what has been defined in the setting "course list sorting".

Regards
Wiebke, Yvonne and Wolfgang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something which isn't working
Projects
Status: Ready for DEV
Development

No branches or pull requests

5 participants