Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64999

block_myoverview: Replace / accompany the time-based course filter with a semantic course filter based on custom course fields

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 3.7
    • Dashboard (My home)

      This issue is to cover especially these user stories at universities and schools:

      • As a student or teacher at a university or school, I am living in lecture terms. Lecture terms are centrally defined by my university or school. They are not defined by individual teachers and not by individual courses. The current lecture term is the most important term for me and most of the time I neither care about the previous terms nor about future terms.
      • As a student, I normally want to see only these and exactly these courses in the course overview block on my Dashboard which I attend in the current lecture term. The courses have to be listed regardless if I have completed this course already or not and regardless of the start and end dates which a teacher has set in a particular course.
      • As a teacher, I normally want to see only these and exactly these courses in the course overview block on my Dashboard which I teach in the current lecture term. This is especially important as I don't complete the courses which I teach and as the course's start and end date isn't necessarily set exactly to the day when the lecture term starts or ends.
      • As a student, I sometimes need to access a course which I attended in a particular previous lecture term. Picking the course from the list of all past courses might be quite tedious. I want a quick and precise way to filter the courses which I attended in a particular lecture term and to pick the needed course from the resulting list of normally only few courses.
      • As a teacher, I sometimes need to access a course which I taught in a particular previous lecture term. Picking the course from the list of all courses is error-prone as I often teach the same course every term or year, so my list of all past courses has multiple entries with the same course name. I need a quick and precise way to filter the courses which I taught in a particular lecture term and to pick the needed course from the resulting list of normally only few courses.
      • As an admin, I want to be sure that courses are clearly allocated to a particular lecture term, regardless of their start and end date and regardless of their course category. The lecture term for a particular course should be settable by admins, by teachers or by an external system via webservices.
      • As a university, we have to face that there are not only lecture courses in our Moodle instance which are allocated to a particular lecture term, but also timeless / term-independent / long-running courses for internal training or self-service elearning courses. Thus, the mechanism for allocating a course to a particular lecture term should also support these kind of timeless courses.

      Moodle would be able to store the information about the allocation of a course to a particular lecture term in several areas:

      • The obvious possibility would be to store exactly the start and stop date of the lecture term into the start and end date of the course. However, the user stories tell us that these dates might not be the same and they also don't fulfil the requirement for timeless courses.
      • Another possibility would be to use the tag subsystem and add a lecture term tag to a course.
      • Another possibility would be to store the lecture term information in the custom course fields subsystem which was integrated in MDL-57898.

      From our point of view, custom courses fields make most sense, even as it is a young subsystem. The most important argument is that, besides storing the lecture term, you can also use it to store other metadata about a course (like room number, presence session times and so on) in a structured way in the same location.


      This issue is now the proposal to replace / accompany the time-based course filter in block_myoverview with a semantic course filter based on custom course fields.

      Part 1: Configure the filter options of the time-based course filter

      I propose to have the filter options configurable as an admin setting.

      As this block doesn't have admin settings yet, this will mean:

      • Create a new settings page below /admin/category.php?category=blocksettings for the My Overview block
      • Add a setting "block_myoverview | filteroptions" as a multiselect setting.
      • This setting has four values:
        • All (except hidden)
        • Time based filters (In progress / Future / Past)
        • Starred
        • Hidden
      • All four values are selected by default
      • If the admin disables one up to n-1 of these values, the filter option isn't listed in the course filter anymore.
      • If the admin disables all of these values (for whatever reason), the course filter isn't shown anymore at all and the list in always shown in "All (including hidden)" mode.
      • We can argue if it really makes sense to disable the "All (but hidden)" option. And we should think about the side-effects of disabling the "Starred" and "Hidden" options. But in any case, the admin should be able to disable the Time based filters (In progress / Future / Past) if his users don't need them.

      Part 2: Add a semantic course filter based on custom course fields

      I propose to add a semantic course filter based on custom course fields configurable as an admin setting.

      This will mean:

      • Add a setting "block_myoverview | customfilter" as a singleselect setting.
        • This setting shows the titles of all existing custom course fields.
        • If there aren't any custom course fields, it might be useful to show an explanation what custom course fields are and where they can be created and configured.
        • The admin can select one of the existing custom course fields.
      • As soon as the admin has selected a custom course field here, the course filter in block_myoverview for a particular user is amended with this algorithm:
        • Collect the value of the custom course field of all courses which I am enrolled into into a list.
        • Remove duplicates from the list
        • Sort the list by a reasonable order for the particular custom course field type
        • Add one filter option per list entry to the course filter.
        • If there are courses where the custom field is empty, add a filter option saying "No <Name of the custom field>" to the course filter.
      • Add a webservice, in addition to or as an enhancement of core_course_get_enrolled_courses_by_timeline_classification, which provided a course list filtered by a custom course field value.
      • The user will then be able to filter his courses in block_myoverview based on the custom course field values. Apart from the filter results, this filter will exactly behave like the other existing filter options.

      Part 3: Add the same semantic course filter based on custom course fields to the Mobile App Dashboard

      For the sake of consistency, I propose to add the same semantic course filter based on custom course fields to the Mobile App Dashboard. It will be able to use the same webservice as block_myoverview does, but it will have to implement the UI and logic independently.

      See a mockup to illustrate the proposal:

      It should hopefully be clear that this proposal isn't necessarily limited to filter by lecture terms, but that you will be able to filter by anything which you put into your custom course field.


      This proposal isn't final yet, it is up for discussion. It has especially to be discussed:

      • Is it ok to limit this custom course field filter to exactly one custom course field or are the more complex scenarios where you will need to filter for more than one custom course field or for combinations of multiple fields?
      • How will the course filter deal with the case that a user's courses will have many (say 10+) different custom course field values which would let the list of filter options grow very long. Solution approaches could be:
        • Only create options for the first 10 field values (which is bad usability and not really deterministic)
        • Let the admin configure the particular custom field values of all existing custom field values which should appear in the filter (which has to be managed consistently)
      • It has to be evaluated if the admin settings can be supported by the new hideIf functionality which has been integrated in MDL-52167.

        1. Screenshot_06_03_19__13_02.png
          230 kB
          Alexander Bias
        2. Screenshot_08_03_19__13_21.png
          204 kB
          Alexander Bias

            abias Alexander Bias
            abias Alexander Bias
            Votes:
            18 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 4 hours, 55 minutes
                4d 4h 55m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.