Blocks: Filtered course list

block_filtered_course_list
Maintained by Picture of Kevin WiliartyKevin Wiliarty
The Filtered Course List block displays a configurable list of courses. It is intended as a replacement for the My Courses block, although both may be used. It is maintained by the Collaborative Liberal Arts Moodle Project (CLAMP).
540 sites
352 downloads
34 fans

The Filtered Course List block displays a configurable list of courses. It is intended as a replacement for the My Courses block, although both may be used. It is maintained by the Collaborative Liberal Arts Moodle Project (CLAMP).

An administrator can apply various filters by which to organize a user's course listing in the block. Courses can be sorted by category, shortname matches or completion status. If all of the courses in a given semester have a shortname ending in a semester code, for instance, then the administrator can designate those courses to appear under "Current courses," "Future courses" or any other heading. Regex matching is supported.

Administrators can designate multiple collapsible headings and choose which of those headings, if any, should be expanded by default.

Other options include the ability to hide the block from guests or anonymous visitors, to choose whether an admin sees all courses or her own, and to hide or reveal a link to a more comprehensive course search.

Screenshots

Screenshot #0

Contributors

Picture of Kevin Wiliarty
Kevin Wiliarty (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Frédérique Seillec
    Mon, Mar 11, 2019, 8:39 PM
    Hi,

    I have the organization for my courses

    SCHOOL / YEAR / UNIT / courses
    I can only display with the plugin the level UNIT

    I'd like to display the SCHOOL and the YEAR ! Is it possible ?
  • Picture of Kevin Wiliarty
    Mon, Mar 11, 2019, 9:04 PM
    Hi, Frédérique. The Filtered Course List does not display nested rubrics, if that is was you are looking for, but you may be able to achieve what you want by some other method. Here are some ideas:

    1. If your course short names are systematic, you could probably create shortname or regex filters based on those. You would have to supply the SCHOOL / YEAR as the label. Depending on how many of those you need this might be impractical.
    2. If you are using a category filter, you could try setting the "Category rubric template" to include "ANCESTRY". That could work very well, perhaps in combination with including "CATEGORY" in the "Course name template."

    The second choice will perhaps be exactly what you want if you don't have any courses above the UNIT level.

    SCHOOL 1
    - YEAR 1
    - UNIT 1
    Course 1
    Course 2
    - UNIT 2
    Course 3
    Course 4
    - YEAR 2
    ...
    SCHOOL 2
    ...

    Give that a try and let me know if you have any other questions.

    Cheers,
    Kevin
  • Picture of Brandon Jimenez
    Wed, Apr 10, 2019, 12:52 AM
    Hi Kevin

    I have two things to say, one comment and one question:
    Comment: Regarding our discussion a few months back, I tried your solution, but it wouldn't work, as the plugin would sort the data after it has already been fetched, and it only fetches the courses the user is already logged in. That being said, if it's just me who would benefit from a solution of those sorts, then i'll keep doing it on my end.

    Question:
    For a different site, i'm trying to use your solution but i'm running short in understanding your documentation. My categories are as follows
    Category 1
    - Sub category 1
    -- course 1
    Category 2
    - Sub category 2
    - Course 2

    However, i tried building it using your documentation (and i need to replicate the structure), using
    category | collapsed | 0 | 0
    which should fetch all the subcategories from the top category, but only creates
    -sub category 1
    -- course 1
    - Sub category 2
    -- course 2

    and i tried using ancestries or
    category | collapsed | 2 | 0

    What am i doing wrong?

    thanks!!
  • Picture of Kevin Wiliarty
    Wed, Apr 10, 2019, 1:49 AM
    Hi, Brandon, nice to hear from you again.

    About your comment:
    I'm afraid I'm not sure which suggestion of mine you're referring to. Did you try creating a filter of your own? If that is what you're doing then you should be able to fetch the courses any way you like. Or are you doing something else? I'll be happy to help, but I don't yet understand what you are describing.

    About your question:
    The results that you are describing are expected if your structure is like this:
    Category 1
    - Sub category 1
    -- course 1
    Category 2
    - Sub category 2
    -- Course 2

    What I've listed above is slightly different from your version, but maybe it's what you meant, because that would explain the output. It often trips people up that the filtered course list does not recreate a category hierarchy. It's just not what it does. It can scan down into categories to find a user's courses, but it doesn't try to represent the whole tree. When it finds a course, it will show that course under a rubric based on the category it is in, even if that category is several levels deep. In your case, if the user is not enrolled in any courses directly in Category 1 or Category 2, then those categories will not show up. If the hierarchy is important then it may help to modify your "Category rubric template." If you change that template to "ANCESTRY / NAME", for instance, you are asking the block to display the rubric title as a string that consists of the category's ancestry and then the category name. Applied to the example above you ought to get:

    Category 1 / Sub category 1
    - course 1
    Category 2 / Sub category 2
    - Course 2

    It's still not a tree; it won't ever be, but at least in the label for the rubric you can see the hierarchy. The main idea behind the configurable templates is to help resolve ambiguities. Imagine you had a structure like the following:

    2019
    - History
    -- History 101
    2020
    - History
    -- History 101

    In a case like this the default templates would yield:

    History
    - History 101
    History
    - History 101

    That's not so helpful, but you can change the category template to something like "NAME (PARENT)" to yield:

    History (2019)
    - History 101
    History (2020)
    - History 101

    Does that help?

    If the behavior you're seeing is different, please give me as many details as you can, and I will do my best to help sort it out.
  • Picture of Brandon Jimenez
    Wed, Apr 10, 2019, 2:21 AM
    Hi Kevin

    Ok now I understand, but this issue seems to be something that i've seen several user asked (the ancestry question). Can we make this into a request for a future version? (version 4.1.3 for example? - I joke)

    As usual, thanks for your support.
  • Picture of Kevin Wiliarty
    Wed, Apr 10, 2019, 4:25 AM
    I know that the flatness of the structure sometimes disappoints people but I don't really foresee trying to change it. It's baked pretty deeply into the way the block works, and it's a good fit with the other filter types. Anyway, it sounds like my explanation was helpful, so I'm glad of that.
  • Picture of Jonathan Tulloch
    Fri, Nov 15, 2019, 4:43 PM
    Hi Kevin! The updates to this block are brilliant, and we are looking to make this a core part of student navigation advice - but I was wondering whether it is possible to change the restriction that the block only appears on the Dashboard? We can't seem to change this setting! Cheers! Jon
  • Picture of Kevin Wiliarty
    Fri, Nov 15, 2019, 9:27 PM
    Hi, Jonathan. I'm not sure what restriction you are referring to. You should be able to place instances of the block anywhere you like. Can you explain a bit more about what you are trying to do and what is not working as expected? Can you also mention which version of the block you are using and which version of Moodle? I'll be happy to help sort things out.
  • Picture of ALEXANDER VELASQUE
    Sat, Feb 22, 2020, 5:40 AM

    Hi Kevin. Could you have a filtering by categories and completion status at the same time? Cheers!
  • Picture of Brandon Jimenez
    Sat, Feb 22, 2020, 9:29 PM
    Hello Alexander, I think your best bet would be to use the API to create that functionality yourself. I haven't done it personally, but from what I've read in the documentation, it seems it could provide you with that kind of behavior.
  • Picture of Kevin Wiliarty
    Mon, Feb 24, 2020, 8:11 PM
    Hi Alexander, There's no ready-made filter that would simultaneously organize by category and completion status. Brandon is correct: Your best bet would be to write a filter of your own. This page has some instructions: https://github.com/CLAMP-IT/moodle-blocks_filtered_course_list/wiki/External-filters
  • Picture of Andrés Molina
    Tue, Apr 7, 2020, 7:21 AM
    Hi there!
    I need your help, I don't know how to show all the courses without generating a link to the category, that is, I want the list of courses that fall within that category to appear in the block itself.
    Thank you so much!
  • Picture of Kevin Wiliarty
    Tue, Apr 7, 2020, 8:40 PM
    Hi Andrés, there are a couple reasons you might be seeing a list of category links rather than links to the courses in the categories. The most likely reason is that you are a site admin and you have the "Manager view" setting at "A manager sees all courses." A second possibility is that you have the "Manager view" at "A manager sees own courses" but you are not enrolled in any courses. Any user, admin or otherwise, will see that generic category list if they are not enrolled in any courses. A third possibility comes into play if your site has only one category. In that case you may want to adjust the setting "Max for single category". The default is 10, and the way that works is this: Anyone who would see the generic list will see a list of courses as long as there are only 10 or fewer. If there are more than 10 they will see a link to the category page. The idea is to prevent a situation where a manager or guest sees a list with hundreds of courses, but it's configurable, in case that is the issue. If none of these addresses your question, please offer some more details about the category structure of your site and how you would like the block to work. Cheers!
  • Picture of Andrés Molina
    Tue, Apr 7, 2020, 9:23 PM
    Hi Kevin!
    Thank you very much for answering my question, yesterday I was testing the block more thoroughly and I understand what you are saying, in effect the block only shows the courses in which the user is enrolled.
    Is there a way to show all the courses () visible to the user of the platform? (regardless of whether you are enrolled or not).
    Thank you very much and success!

    PD: The structure of the platform is as follows

    -Subjects
    Institutions
    Subjects (courses)
    -Postgraduate
    -Tutorials
  • Picture of Kevin Wiliarty
    Tue, Apr 7, 2020, 9:45 PM
    You might find that an enrolment-method filter does what you would like. It would allow you, for instance, to show all the courses that have guest- or self-enrollment. In practice, those would be the courses that a user would have access to, but you could use that filter on any enrolment method you prefer. The documentation for that type in particular is here: https://github.com/CLAMP-IT/moodle-blocks_filtered_course_list/wiki/Filter-by-enrolment-method. Just let me know if you have any other questions.
1 2 3 4 5
Please login to post comments