FilterCodes

Filters ::: filter_filtercodes
Maintained by Michael Milette
The FilterCodes filter enables Moodle content creators to easily customize and personalize site and course content using over 140 plain text tags. Version 2.2 introduces 12 new FilterCodes including tags to list teacher, course request link, a conditional tag based on custom profile fields, tags to display support information, a menu of tools for developer and more. You can now even create your own global tags.
Latest release:
2110 sites
1k downloads
113 fans
Moodle 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11

The FilterCodes plugin for Moodle enables you to insert plain text tags like {firstname} into your Moodle site or course content in order to personalize the site to the individual students.

Here are just a few examples of the way you could use this plugin include:

  • Personalizing your course content with the learner's name and even their photo.
  • Display certain content depending on the user's role.
  • Conditionally display content depending on whether the user is enrolled in the current course.
  • Create links that normally require the users ID as part of the URL.
  • Insert default user information into Contact Form for Moodle forms.
  • Display your list of available courses and categories on the Front page (Home page) as cards.
  • Display alert type boxes.
  • Create your own popup Help just like Moodle does (popup info icon also available)
  • Display the amount of disk space available to Moodle, number of courses, number of active students and more.
  • Display several pre-configured templates for use with the Contact Form plugin.
  • Add notes or reminders within your course content - which is only visible when editing the content.
  • Create dynamic and context aware custom menus for students, teachers, managers and administrators (only supported by a few themes unless you apply a patch).
  • Customize your dashboard with dynamic content.
  • Display course progress bar and percentage.
  • Easily display FontAwesome icons almost anywhere.
  • Display content from custom user and custom course fields in your course outline page. (useful for creating course templates for your organization).
  • Conditionally display content depending on which cohort, group, role or Workplace tenant is looking at the content.
  • Insert support information in every course and manage that information centrally.
  • Easily list teachers in your course.

Share with us how you use this plugin on your site.

Development efforts for this project are sponsored by the kind folks at TNG Consulting Inc.. Special thanks go out to several developers who have contributed to the development, documentation and testing of this release of FilterCodes, as well as to those who offered suggestions for several of the new tags. We appreciate your contributions!

Once installed and enabled, the following plain-text tags (no HTML required) will become available to you anywhere that Moodle supports filtering.

List of FilterCode tags

Creating FilterCodes Documentation

  • [{ }] : You can escape tags so they are not processed by adding [brackets] around the tag. Can be disabled in the plugin's settings if it causes you problems.
  • [%7B %7D] : You can escape %7Bencoded%7D tags too so they are not processed by adding [brackets] around them.

Profile

  • {firstname} : Display the user's first name.
  • {surname} or {lastname} : Display the user's surname (family/last name).
  • {fullname} : Display the user's first name and surname.
  • {alternatename} : Display the user's alternate name. If blank, will display user's first name instead.
  • {city} : Display the user's city.
  • {country} : Display the user's country.
  • {timezone} : Display the user's preferred timezone.
  • {preferredlanguage} : Display the user's preferred language in that language. Because of this, it will be encapulated in an HTML span tag with an appropriately set lang attribute.
  • {email} : Display the user's email address.
  • {userid} or %7Buserid%7D : Display the user's Moodle ID.
  • {idnumber} : Display the user's idnumber from their profile.
  • {username} : Display the user's username.
  • {userdescription} : Display the user's description.
  • {webpage} : Display the user's webpage as seen in their profile.
  • {institution} : Display the name of the institution from the user's profile.
  • {department} : Display the name of the department from the user's profile.
  • {userpictureurl X} : Display the user's profile picture URL. X indicates the size and can be sm (small), md (medium) or lg (large). If the user does not have a profile picture or is logged out, the default faceless profile photo URL will be shown instead.
  • {userpictureimg X} : Generates an HTML tag containing the user's profile picture. X indicates the size and can be sm (small), md (medium) or  lg (large). If the user does not have profile picture or is logged out, the default faceless profile photo will be used instead.
  • {profile_field_shortname} : Display's custom profile field. Replace "shortname" with the shortname of a custom profile field all in lowercase. NOTE: Will not display if custom profile field's settings are set to Not Visible.
  • {profilefullname}: Similar to {fullname} except that it displays a profile owner's name when placed on the Profile page.
  • {firstaccessdate dateTimeFormat} : Date that the user first accessd the site. For information on the optional dateTimeFormat format, see Supported dateTimeFormats Formats in the FAQ section of the documentation.

System Information

  • {filtercodes} : Will display version and release of FilterCodes plugin. Not that this information is only available to those who can edit the tag.
  • {usercount} : Count total number of registered users on the site. Does not included deleted users, primary admin or guest.
  • {usersactive} : Count total number of registered users on the site. Does not included deleted users, disabled users, primary admin or guest.
  • {usersonline} : Total number of users who were online in the last 5 minutes.
  • {siteyear} : 4-digit current year.
  • {now dateTimeFormat} : Display's the current date. For information on the optional dateTimeFormat format, see Supported dateTimeFormats Formats in the FAQ section of the documentation.
  • {coursecount} : Total number of courses on this Moodle site (not including Front Page).
  • {diskfreespace} : Display amount of free disk space for application folder. Infinite symbol will be displayed if greater than about 84,703.29 Yottabyte (YB) or failure to get size from operating system.
  • {diskfreespacedata} : Display amount of free disk space for moodledata folder. Infinite symbol will be displayed if greater than about 84,703.29 Yottabyte (YB) or failure to get size from operating system.
  • {wwwroot} : Root URL of the Moodle site.

UI Elements

  • {coursecards}: (ALPHA) Display available courses as cards. Has only been tested on Front Page.
  • {coursecards id}: (ALPHA) Same as {coursecards} but you can specify the top level category ID number to be displayed.
  • {courseprogress}: (ALPHA) Displays course progress status in words. Only works within a course.
  • {courseprogressbar}: (ALPHA) Displays course progress status as a status bar. Only works within a course.
  • {categorycards}: (ALPHA) Display top level categories as cards. Has only been tested on Front Page.
  • {courserequest}: Display a Request a Course link.

For use in courses

  • {coursename} : Display the full name of the current course or the site name if not in a course.
  • {courseshortname} : Display the short name of the current course or the site short name if not in a course.
  • {coursestartdate dateTimeFormat} : Course start date. Will display "Open event" if there is no start date. For information on the optional dateTimeFormat format, see Supported dateTimeFormats Formats in the FAQ section of the documentation.
  • {courseenddate dateTimeFormat} : Course end date. Will display "Open event" if there is no end date. For information on the optional dateTimeFormat format, see Supported dateTimeFormats Formats in the FAQ section of the documentation.
  • {coursecompletiondate dateTimeFormat} : Course completion date. If not completed, will display "Not completed". Will also detect if completion is not enabled. For information on the optional dateTimeFormat format, see Supported dateTimeFormats Formats in the FAQ section of the documentation.
  • {courseprogress}: (ALPHA) Displays course progress status in words.
  • {courseprogressbar}: (ALPHA) Displays course progress status as a status bar.
  • {course_fields}: Displays the custom course fields. NOTE: Respects a custom course field's Visible To setting.
  • {course_field_shortname} : Display's custom course field. Replace "shortname" with the shortname of a custom course field all in lowercase. NOTE: Respects a custom course field's Visible To setting.
  • {coursesummary} : Display's the course summary. If placed in a site page, displays the site summary.
  • {courseimage} : Display's the course image.
  • {courseparticipantcount} : Displays the number of students enrolled in the current course.
  • {courseid} or %7Bcourseid%7D : Display a course's ID.
  • {coursecontextid}: Display a course's context ID.
  • %7Bcoursecontextid%7D : Display a course's context ID - for use in URLs. Only for use in course activity modules.
  • {courseidnumber} : Display a course's ID number.
  • {sectionid} : Display the section ID (not to be confused with the section number).
  • {courseteachers} : (ALPHA) List of course teachers with optional link to their profile, email address or Moodle messaging.

Also see Courses section below.

Categories

  • {categoryid} : If in a course, the ID of the course's parent category, the category ID of a course category page, otherwise 0.
  • {categoryname} : If in a course, the name of the course's parent category, otherwise blank.
  • {categorynumber} : If in a course, the number of the course's parent category, otherwise blank.
  • {categorydescription} : If in a course, the number of the description of a course's parent category, otherwise blank.
  • {categories} : Display an unordered list of links to all course categories.
  • {categories0} : Display an unordered list of just top level links to all course categories.
  • {categoriesx} : Display an unordered list of other categories in the current category.

Custom menu

Note: Filtering must be supported in custom menu by your theme. See README.md for more information.

  • {categoriesmenu} : A second level list of categories with links for use in custom menus.
  • {categories0menu} : A second level list of just top level categories with links for use in custom menus.
  • {categoriesxmenu} : A second level list of other categories in the current category with links for use in custom menus.
  • {toggleeditingmenu} : A Turn Editing On or Turn Editing Off custom menu item. Note that you need to add your own dash(es).
  • {mycoursesmenu} : A second level list of courses with links for use in custom menus (filtering must be supported by the theme).
  • {courserequestmenu0} : Request a course / Course request in a top level custom menu.
  • {courserequestmenu} : Request a course / Course request in submenu.
  • {menudev} : Useful menu for Moodle developers.

URL

  • {pagepath} : Path of the current page without wwwroot.
  • {thisurl} : The complete URL of the current page.
  • {thisurl_enc} : The complete encoded URL of the current page.
  • {urlencode}{/urlencode} : URL encodes any content between the tages.
  • {referer} : Referring URL
  • {protocol} : http or https
  • {referrer} : Alias of {referer}
  • {ipaddress} : User's IP Address.
  • {sesskey} or %7Bsesskey%7D : Moodle session key.
  • {wwwcontactform} : Action URL for Contact Form forms. (requires Contact Form plugin).

Content

  • {global_...} : Use your own custom FilterCodes tags in the filter's settings. This is sometimes referred to as global blocks. An example of this might be if you wanted to define a standardized copyright or other text, email address, website URL, phone number, name, link, support information and more. Define and centrally manage up to 20 global block tags.
  • {note}content{/note} : Enables you to include a note which will not be displayed.
  • {help}content{/help} : Enables you to create popup help icons just like Moodle does.
  • {info}content{/info} : Enables you to create popup help icons just like the popup Help icons but with an "i" information icon.
  • {alert style}content{/alert}: (ALPHA) Creates an alert box containing the specified content. You can change the style by specifying an optional parameter. Example: {alert primary} or {alert success} . See List of styles.
  • {highlight}{/highlight} : Highlight text. NOTE: Must only be used within a paragraph.
  • {scrape url="..." tag="..." class="..." id="..." code="..."} : Scrapes the content from another web page. Must be enabled in FilterCodes settings.
  • {getstring:component_name}stringidentifier{/getstring} or {getstring}stringidentifier{/getstring}: Display a Moodle language string in the current language. If no component name (plugin) is specified, will default to "moodle".
  • {fa/fas/far/fal fa-...} : Insert FontAwesome icon. Note: FontAwesome Font/CSS must be loaded as part of your theme.
  • {glyphicon glyphicon-...} : Insert Glyphicons icon. Note: Glyphicons Font/CSS must be loaded as part of your theme.
  • {mycourses} : Display an unordered list of links to all my enrolled courses

Contact Form templates

The following tags are replaced by Contact Form templates and therefore require that you have the Contact Form for Moodle plugin installed.

  • {formquickquestion} : Adds a "quick question" form to your course. Form includes Subject and Message fields. Note: User must be logged in or the form will not be displayed.
  • {formcontactus} : Adds a "Contact Us" form to your site (example: in a page). Form includes Name, Email address, Subject and Message fields.
  • {formcourserequest} : Adds a "Course Request" form to your site (example: in a page). Unlike Moodle's request-a-course feature where you can request to create your own course, this tag allows users to request that a course they are interested in be created. Could also be used to request to take a course. Form includes Name, Email address, Course name, Course Description.
  • {formsupport} : Adds a "Support Request" form to your site (example: in a page). Form includes Name, Email address, pre-determined Subject, specific Subject, URL and Message fields.
  • {formcheckin} : Adds a "I'm here!" button to your to your course. Form does not include any other fields. Note: User must be logged in or the button will not be displayed.

Useful for creating Custom Contact Forms and Links

  • {lang} : 2-letter language code of current Moodle language.
  • {recaptcha} : Display the ReCAPTCHA field - for use with Contact Form for Moodle. Note: Will be blank if user is logged-in using a non-guest account.
  • {readonly} : To be used within form input fields to make them read-only if the user is logged-in.
  • {editingtoggle} : "off" if in edit page mode. Otherwise "on". Useful for creating Turn Editing On/Off links.
  • {wwwcontactform} : Action URL for Contact Form forms. (requires Contact Form plugin).
  • {formsesskey} : Not a form. This can be used instead of having to insert the required hidden input field and JavaScript Snippet.

Conditionally display content filters (All versions of Moodle)

Note: {ifrolename} and {ifminrolename} type tags are based on role archetypes, not role shortnames. For example, you could have a role called students but, if the archetype for the role is teacher, the role will be identified as a teacher. Roles not based on archetypes will not with these tags.

Logged in/out

  • {ifloggedin}{/ifloggedin} : Will display the enclosed content only if the user is logged in as non-guest.
  • {ifloggedout}{/ifloggedout} : Will display the enclosed content only if the user is logged out or is loggedin as guest.
  • {ifloggedinas}{/ifloggedinas} : Will display the enclosed content only if you are logged-in-as (loginas) a different user.
  • {ifnotloggedinas}{/ifnotloggedinas} : Will display the enclosed content only if you are logged-in as yourself and not a different user.

Courses

  • {ifenrolled}{/ifenrolled} : Will display the enclosed content only if the user is enrolled as a student in the current course. This tag does not take any other roles into consideration.
  • {ifnotenrolled}{/ifnotenrolled} : Will display the enclosed content only if the user is not enrolled as a student in the current course. This tag does not take any other roles into consideration.
  • {ifincourse}{/ifincourse} : Will display the enclosed content only if the user is in a course other than the Front page.
  • {ifinsection}{/ifinsection} : Will display the enclosed content only if the user is in a section of a course which is not the Front Page.
  • {ifnotinsection}{/ifnotinsection} : Will display the enclosed content only if the user is not in a section of a course.
  • {ifingroup id|idnumber}{/ifingroup} : Display content if the user is part of the specified course group ID or group ID number.
  • {ifprofile_field_shortname}{/ifprofile_field_shortname} : Will display the enclosed content if the custom profile field is not blank/zero.

Roles

  • {ifguest}{/ifguest} : Will display the enclosed content only if the user is logged-in as guest.
  • {ifstudent}{/ifstudent} : Will display the enclosed content only if the user is logged-in and enrolled in the course (no other roles).
  • {ifassistant}{/ifassistant} : Will display the enclosed content only if the user is logged-in as a non-editing teacher in the current course.
  • {ifminassistant}{/ifminassistant} : Will display the enclosed content only if the user is logged-in as a non-editing teacher or above in the current course.
  • {ifteacher}{/ifteacher} : Will display the enclosed content only if the user is logged-in as a teacher in the current course.
  • {ifminteacher}{/ifminteacher} : Will display the enclosed content only if the user is logged-in as a teacher or above in the current course.
  • {ifcreator}{/ifcreator} : Will display the enclosed content only if the user is logged-in as a course creator.
  • {ifmincreator}{/ifmincreator} : Will display the enclosed content only if the user is logged-in as a course creator or above.
  • {ifmanager}{/ifmanager} : Will display the enclosed content only if the user is logged-in as a manager.
  • {ifminmanager}{/ifminmanager} : Will display the enclosed content only if the user is logged-in as a manager or above.
  • {ifminsitemanager}{/ifminsitemanager} : Will display the enclosed content only if the user is logged-in as a site manager or above.
  • {ifadmin}{/ifadmin} : Will display the enclosed content only if the user is logged-in as an administrator.
  • {ifcustomrole roleshortname}{/ifcustomrole} : Will display enclosed content only if the user has the custom role specified by its shortname within the current context.
  • {ifnotcustomrole roleshortname}{/ifnotcustomrole} : Will display enclosed content only if the user does not have the custom role specified by its shortname within the current context.
  • {ifincohort CohortID|idnumber}{/ifincohort} : Will display enclosed content only if user is a member of the specified cohort. You can specify the Cohort ID in your cohort settings or its ID number. Cohort ID can contain a combination of letters from a to z, A to Z, numbers 0 to 9 and underscores. It will not work if it contains spaces, dashes or other special characters.

Miscellanious

  • {ifdev}{/ifdev} : Will display the enclosed content only if the user is logged-in as an administrator and developer debugging mode is enabled.
  • {ifhome}{/ifhome} : Will display the enclosed content only if the user is on the Moodle Home Front Page.
  • {ifdashboard}{/ifdashboard} : Will display the enclosed content only if the user is on the Moodle Dashboard.
  • {ifcourserequests}{/ifcourserequests} : Will display enclosed contents only if the Request a Course feature is enabled.
  • {ifeditmode}{/ifeditmode} : Will display the enclosed content only if editing mode is turned on.

If the condition is not met in the particular context, the specified tag and it's content will be removed.

Conditionally display content filters (For Moodle Workplace)

  • {iftenant idnumber|tenantid}{/iftenant} : (ALPHA) Will display the content if a tenant idnumber or tenant id is specified. Only {iftenant 1} will work in Moodle classic.
  • {ifworkplace}{/ifworkplace} : (ALPHA) Will display the content only if displayed in Moodle Workplace.

HTML and "lang" tagging

  • {-} : Is substituted for a soft hyphen that only appears when needed.
  • {nbsp} : Is substituted for a non-breaking space when displayed.
  • {langx xx}{/langx} : Tag specific text in a particular language by wrapping the text in a plain text pair of {langx xx} {/langx} or {langx xx-XX} {/langx} tags. This makes no visible changes to the content but wraps the content in an HTML <span lang="xx" xml:lang="xx"></span> inline tag. As a result, screen readers will make use of this localization information to apply a particular pronunciation if the text is in a different language than the language of the rest of the page. This is required for compliance with W3C Web Content Accessibility Guidelines (WCAG 2.0)
  • {details}{summary}{/summary}{/details} : An easy way to create an HTML 5 Details/Summary expandable section in your page. IMPORTANT: {details}{summary}{/summary} must all be on one line (it is ok if the line wraps). The rest of the details can be on multiple lines followed by the {/details}. This is an experimental feature which may result in invalid HTML but it works.

For more information and an up-to-date list of tags, see the documentation link.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Michael Milette (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tue, Jul 27, 2021, 8:41 AM
    Es un excelente plugin, muy valioso el aporte.

    Quería consultar, si es posible añadir una función en la que se pueda visualizar a través de una etiqueta el número total de certificados emitidos. Gracias.
  • Tue, Jul 27, 2021, 9:54 PM
    Hola Mariuxi,

    No hablo español así que espero que Google Translate funcione bien. Muchas gracias. Me alegra saber que lo encuentra útil. Utilice el enlace "Bug Tracker" en la página del complemento FilterCodes para enviar una Solicitud de función para que podamos discutir esto. También puede contribuir enviando una solicitud de extracción con su código.

    Saludos cordiales,

    Michael
  • Sat, Jul 31, 2021, 7:11 AM
    Saludos, tengo una inquietud, he utilizado el código {coursecards} sin embargo este código muestra actualmente todos los cursos disponibles sin diferencia del estado en el que se encuentran. Es decir, he añadido cursos que están ocultos, o cursos que ya han finalizado y se muestran todos sin excepción. ¿Es posible que se muestren únicamente los cursos que están vigentes?, y no mostrar los cursos invisibles o que ya se encuentran finalizados.

    Adicional, hay alguna manera de mostrar un número de terminado de cursos por ejemplo 4 en una fila, o a manera de slider para que no sea tan grande la página al incrustar el código en la página de inicio. Gracias.
  • Sun, Aug 1, 2021, 1:09 AM
    (Answer in English included below)

    Hola Mariuxi,

    No hablo español, así que espero que Google Translate funcione bien. Filtrar los cursos ocultos y los cursos cuya fecha de finalización haya pasado son excelentes sugerencias. Utilice el enlace Bug Tracker (seguimiento de errores) en la página del complemento para hacer estas sugerencias y me aseguraré de implementarlas.

    En cuanto al número de cartas seguidas, este cambia automáticamente en función del ancho del espacio disponible. Intente cambiar el tamaño de su navegador web para ver que esto suceda. De lo contrario, es probable que su tema no responda y tendrá que pedirle al desarrollador que lo solucione. Pruébelo con el tema Boost o Classic incluido con Moodle para ver a qué me refiero.

    English

    Filtering out hidden courses and courses whose end-date has passed are great suggestions. Please use the Bug Tracker link on the plugin's page to make these suggestions and I'll be sure to implement them.

    With regards to controlling the number of cards in a row, this changes automatically depending on the width of the available space. Try resizing your web browser to see this happen. If it does not, your theme is probably not responsive and you will need to get the developer to fix this. Try it out with the Boost or Classic theme included with Moodle to see what I mean.

    Saludos cordiales,

    Michael
  • Sat, Aug 21, 2021, 6:07 AM
    I continue to love, love, LOVE this plugin! It just gets better and better! I just created a little custom plugin that simply displays a block with information in it. I included the filtercodes, since I want this block to appear on all courses. However, the block doesn't translate the filters and instead just shows them as code. Is there a trick to getting the filter codes to work when coded into a plugin? I hope I explained that clearly. I couldn't attach a pic which would have been worth 1000 words.
  • Sat, Aug 21, 2021, 6:50 AM
    I've just realized how silly my previous question is. Of course, I shouldn't be relying on the the filtercodes and instead should be using the Moodle variables, themselves. Duh. Now I just have to figure out what those are and give that a shot. I hope that I made you laugh with my little flub!
  • Fri, Sep 3, 2021, 8:18 PM
    Hi Blair,

    FilterCodes does work in blocks. You see this yourself by trying something like {firstname} in the HTML block. However, if you are creating your own block plugin, you must process all output through the Output API functions format_text() or format_string() in order for filters to be applied. You can lean more about these by going to https://docs.moodle.org/dev/Output_functions

    If it is not working in an existing plugin, you will need to contact the developer / maintainer of the plugin and ask them to fix it using this information.

    To easily use Moodle strings, take a look at the {getstring} tag.

    Hope you find this information helpful.

    Best regards,

    Michael

    Hop
  • Fri, Sep 17, 2021, 5:05 PM
    Hi Michael, is there a possibility to add in a conditional field based on a user profile field? You currently have one for the course profile field, but I cannot see something similar for a user profile field e.g. something like:

    {ifuser_profile_field_shortname}{/ifuser_profile_field_shortname}
  • Fri, Sep 17, 2021, 7:59 PM
    Hi Dave,

    Give {ifprofile_field_shortname}{/ifprofile_field_shortname} a try. It will display the enclosed content if the custom profile field is not blank/zero.

    Best regards,

    Michael
  • Fri, Sep 17, 2021, 8:58 PM
    Hi Michael - yes that works, and now I come to think about it, I think I have asked the very same question previously. The confusion for me, is in the information at the top of this page, that particular format suggests that it is used for course profile fields, not user profile fields.

  • Sat, Sep 18, 2021, 3:35 AM
    I think you already did. Good idea though wink

    But seriously, no worries. I updated the documentation on GitHub last time you asked but that change will only be included here on moodle.org with the next release in December 2021.

    Best regards,

    Michael
  • Fri, Oct 1, 2021, 5:55 PM
    Wow, very clever and powerful tool! Is there a way to display a student’s current grade in a course? I’d like to create text that says something like, “Your current grade in this course is X%.” Thanks.
  • Fri, Oct 1, 2021, 11:06 PM
    Hi Albert, not yet but that would be a great idea. If you would like this feature added to FilterCodes, please go to https://github.com/michael-milette/moodle-filter_filtercodes/issues/ and submit a feature request so that we can discuss the details. I might be able to get this into the next release of FilterCodes scheduled for release in December 2021.
  • Fri, Oct 8, 2021, 7:28 PM
    Moodle3.9
    Hello,
    Is it possible to use these filter codes to create a dynamic list of courses by enrolment attribute? I have many courses, some are openly available to anyone registered on my site and some are available only to registered students / members. Some are available to every one simply because I have not set the correct enrolment options!!
    It would be great if the list was automatically updated each time I added a new course.
    I would use the list to show students which courses could be available to them if they registered
    I would use the list to show students which courses are only available if they have not registered
    I would use the list as an admin check to make sure I have put the correct enrolment options against each course

    I can see {categoryid} {categoriesmenu}{ifcustomrole roleshortname}{/ifcustomrole} : {ifnotcustomrole roleshortname}{/ifnotcustomrole} would all be useful but am clueless as to how to put them together to create the functionality I need.

    Has anyone created a similar function and be willing to share the code for it? I am not a coder but am getting pretty good at copy and past others HTML

    ps...am I imagining it or was there a thread where people shared their use cases and examples? If you could let me know the link that would be great - thank you.

    Many thanks in advance
    Marie
  • Sat, Oct 9, 2021, 10:03 PM
    Hi Marie,

    It might be beneficial if you ask your question in the discussion forum at https://moodle.org/mod/forum/discuss.php?d=359252 . I recommend you split up your requirements into separate questions as there is not single answer to all of them. It will also make it easier to discuss.

    You can see a list of all courses by going to your Dashboard and them replacing "my" in the URL with "course". This will take you to the All Courses page. Tip: Add a link to this page on the dashboard for your learners.

    To display a list of courses in which the learner is currently enrolled, see the {mycourses} FilterCode.

    It sounds like you might be looking for custom reports. See if there might be anything useful to you by going to https://docs.moodle.org/39/en/ad-hoc_contributed_reports

    As for the showcase link, you might be thinking of Generico, another really useful Moodle filter plugin which you may find helpful in achieving your desired outcomes.

    Hope you find something useful in all of this.

    Best regards,

    Michael
1 2 3 4 5 6 7
Please login to post comments