FilterCodes

Filters ::: filter_filtercodes
Maintained by Michael Milette
Transform your Moodle site with the FilterCodes Plugin! Elevate engagement by inserting over 195 dynamic plain-text tags like {firstname} to create personalized learning experiences, customize your site and course content, display progress bars, simplify Contact Form customization effortlessly and much more. FilterCodes empowers educators to revolutionize Moodle into a dynamic, personalized platform. Join the community of FilterCodes enthusiasts to unlock the potential of your Moodle LMS site.
Latest release:
4869 sites
2k downloads
194 fans
Current versions available: 1

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 individual students.

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

  • Personalize 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 user's 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, the number of courses, the 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 the custom user and custom course fields on your course outline page. This can be 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, and non-editing teachers (assistants) in your course.
  • Create buttons and charts.

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 many of the new tags. We appreciate your contributions!

Useful links

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} : Displays the user's first name.
  • {surname} or {lastname} : Displays the user's surname (family/last name).
  • {fullname} : Displays the user's first name and surname.
  • {alternatename} : Displays the user's alternate name. If blank, will display the user's first name instead.
  • {city} : Displays the user's city.
  • {country} : Displays the user's country.
  • {timezone} : Displays the user's preferred time zone.
  • {preferredlanguage} : Displays the user's preferred language in that language. Because of this, it will be encapsulated in an HTML span tag with an appropriately set lang attribute.
  • {email} : Displays the user's email address.
  • {userid} or %7Buserid%7D : Displays the user's Moodle ID.
  • {idnumber} : Displays the user's id number from their profile.
  • {username} : Displays the user's username.
  • {userdescription} : Display the user's description.
  • {webpage} : Displays the user's webpage as seen in their profile.
  • {institution} : Displays the name of the institution from the user's profile.
  • {department} : Displays the name of the department from the user's profile.
  • {userpictureurl X} : Displays 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 a profile picture or is logged out, the default faceless profile photo will be used instead.
  • {profile_field_shortname} : Display the content of a custom profile field. Replace "shortname" with the shortname of a custom profile field all in lowercase. NOTE: Will not display if the 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 accessed the site. For information on the optional dateTimeFormat format, see Supported dateTimeFormats Formats in the FAQ section of the documentation.
  • {lastlogin dateTimeFormat} : Date/Time that you last logged into the site.

System Information

  • {filtercodes} : Will display the version and release of FilterCodes plugin. Not that this information is only available to those who can edit the tag.
  • {usercount} : Count the total number of registered users on the site. Does not include deleted users, primary admin or guests.
  • {usersactive} : Count the total number of registered users on the site. Does not include deleted users, disabled users, primary admin or guests.
  • {usersonline} : Total number of users who were online in the last 5 minutes.
  • {siteyear} : 4-digit current year.
  • {now dateTimeFormat} : Display 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} : Displays the amount of free disk space for the application directory. An infinite symbol will be displayed if greater than about 84,703.29 Yottabyte (YB) or if it fails to get the size from the operating system.
  • {diskfreespacedata} : Displays the amount of free disk space for moodledata directory. An infinite symbol will be displayed if greater than about 84,703.29 Yottabyte (YB) or if it fails to get the size from the operating system.
  • {wwwroot} : Root URL of the Moodle site.
  • {userscountrycount} : Total number of countries that users are from according to their profile.
  • {supportname} : Support name as seen on Site Administration > Server > Support contact.
  • {supportemail} : Support email address as seen on Site Administration > Server > Support contact.
  • {supportpage} : Support page URL as seen on Site Administration > Server > Support contact.
  • {supportservicespage} : Support services page URL as seen on Site Administration > Server > Support contact in Moodle LMS 4.2 and later.

UI Elements

  • {coursecard id} : (ALPHA) Displays an individual course card.
  • {coursecards} : (ALPHA) Displays 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.
  • {courseprogresspercent}: Displays course progress percentage as a number without a percentage symbol. 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.
  • {chart pie}: (ALPHA) : Display a 2-section pie chart.
  • {chart progressbar} : (ALPHA) Displays a progress bar.
  • {chart progresspie} : (ALPHA) Create a (circle / doughnut) progress chart.
  • {chart radial} : (ALPHA) Displays a radial chart.
  • {button url}Label{/button} : Displays link as a button.
  • {hr} : Displays a horizontal rule line.
  • {label backgroundtype}{/label} : Displays text over a colour background.
  • {markborder}{/markborder} : Surrounds text with a red dashed border.
  • {marktext}{/marktext} : Highlight text using HTML5's mark tag.
  • {qrcode}{/qrcode} : Generates and displays a QR Code for the content between the tags.
  • {showmore}{/showmore} : (ALPHA) Toggle showing content between opening and closing more tags.
  • {mycoursescards} : Displays a series of cards for my enrolled courses.
  • {teamcards} : Displays photos, names (optionally linked) and optional descriptions of the users who are teachers. Great for Faculty pages.

For use in courses

  • {coursename} : Displays the full name of the current course or the site name if not in a course.
  • {courseshortname} : Displays the short name of the current course or, if not in a course, the site's short name.
  • {courseenrolmentdate dateTimeFormat} : Date and time at which the user was enrolled in the current course. For information on the optional dateTimeFormat format, see Supported dateTimeFormats Formats in the FAQ section of the documentation.
  • {coursestartdate dateTimeFormat} : Course start date. Displays "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. Displays "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} : Displays custom course field. Replace "shortname" with the short name of a custom course field all in lowercase. NOTE: Respects a custom course field's Visible To setting.
  • {coursesummary} : Displays the course summary. If placed on a site page, displays the site summary.
  • {courseimage} : Displays the course image.
  • {courseimage-url} : URL of the course image.
  • {courseparticipantcount} : Displays the number of students enrolled in the current course.
  • {courseid} or %7Bcourseid%7D : Displays a course's ID.
  • {coursecontextid}: Displays a course's context ID.
  • %7Bcoursecontextid%7D : Displays a course's context ID - for use in URLs. Only for use in course activity modules.
  • {courseidnumber} : Displays a course's ID number.
  • {sectionid}  or %7Bsectionid%7D : Displays the section ID (not to be confused with the section number).
  • {sectionname} : Displays the section name in which the activity is located.
  • {coursemoduleid} or %7Bcoursemoduleid%7D : Course module ID. Only works inside a course activity or resource module.
  • {coursecontacts} : (ALPHA) List of the course teachers with optional links to their profile, email address or Moodle messaging.
  • {mygroups} : Displays a list of groups to which you are a member.
  • {courseunenrolurl} : The course unenrolment URL for you to place in a button or a link anywhere in the course.
  • {coursecount students} : Displays the number of students enrolled in the course.
  • {coursecount students:active} : Displays the number of users with the role of 'student' in a course who are not suspended in the course.
  • {coursegradepercent} : Displays the current accumulated course grade of the student (no percentage symbol).
  • {coursegrade} : Displays the student's current overall course grade (with percentage symbol).

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, is otherwise blank.
  • {categorynumber} : If in a course, the number of the course's parent category, is otherwise blank.
  • {categorydescription} : If in a course, the number of the description of a course's parent category, is otherwise blank.
  • {categories} : Displays an unordered list of links to all course categories.
  • {categories0} : Displays an unordered list of just top-level links to all course categories.
  • {categoriesx} : Displays an unordered list of other categories in the current category.

Custom menu

Note: Filtering must be supported in a 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 a submenu.
  • {menudev} : Useful menu for Moodle developers.
  • {menuadmin} : Userful dynamic menu for Moodle administrators, managers and teachers (is context sensitive).

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} or {referrer} : Referring URL
  • {protocol} : http or https
  • {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/fa-solid/fab/fa-brands fa-...} : Insert FontAwesome icon. Note: FontAwesome Font/CSS must be loaded as part of your theme. For FontAwesome v6.0 icons, you need Moodle 4.2+.
  • {glyphicon glyphicon-...} : Insert Glyphicons icon. Note: Glyphicons Font/CSS must be loaded as part of your theme.
  • {mycourses} : Displays an unordered list of links to all my enrolled courses.
  • {myccourses} : Displays an unordered list of links to all my completed courses - only includes courses with completion tracking enabled.

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. The form includes Subject and Message fields. Note: The 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). The 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. The form includes Name, Email address, Course name, and Course Description.
  • {formsupport} : Adds a "Support Request" form to your site (example: in a page). The form includes Name, Email address, pre-determined Subject, specific Subject, URL and Message fields.
  • {formcheckin} : Adds an "I'm here!" button to your course. The form does not include any other fields. Note: The 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} : Displays the ReCAPTCHA field - for use with Contact Form for Moodle. Note: Will be blank if a 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 short names. 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} : Displays the enclosed content only if the user is logged in as a non-guest.
  • {ifloggedout}{/ifloggedout} : Displays the enclosed content only if the user is logged out or is logged in as a guest.
  • {ifloggedinas}{/ifloggedinas} : Displays the enclosed content only if you are logged-in-as (loginas) a different user.
  • {ifnotloggedinas}{/ifnotloggedinas} : Displays the enclosed content only if you are logged in as yourself and not a different user.

Courses

  • {ifenrolled}{/ifenrolled} : Displays 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} : Displays 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} : Displays the enclosed content only if the user is in a course other than the Front page.
  • {ifnotincourse}{/ifnotincourse} : Displays the enclosed content only if the user is not in a course.
  • {ifinsection}{/ifinsection} : Displays the enclosed content only if the user is in a section of a course which is not the Front Page.
  • {ifnotinsection}{/ifnotinsection} : Displays the enclosed content only if the user is not in a section of a course.
  • {ifingroup id|idnumber}{/ifingroup} : Displays content if the user is part of the specified course group ID or group ID number.
  • {ifnotingroup id}{/ifnotingroup} : Displays content if the user is NOT part of the specified course group ID or group ID number.
  • {ifprofile_field_shortname}{/ifprofile_field_shortname} : Displays the enclosed content if the custom profile field is not blank/zero.
  • {ifactivitycompleted id}{/ifactivitycompleted} : Displays content if the activity or resource specified by ID has been completed.
  • {ifnotactivitycompleted id}{/ifnotactivitycompleted} : Displays content if the activity or resource specified by ID has not been completed.
  • {ifinactivity}{/ifinactivity} : Displays enclosed content if the user is currently inside an activity or resource.
  • {ifnotinactivity}{/ifnotinactivity} : Displays enclosed content if the user is not currently inside an activity or resource.
  • {ifvisible}{/ifvisible} : Displays the enclosed content if the course visibility is set to Show.
  • {ifnotvisible}{/ifnotvisible} : Displays the enclosed content if the course visibility is set to Hide.

Roles

  • {ifguest}{/ifguest} : Displays the enclosed content only if the user is logged in as a guest.
  • {ifstudent}{/ifstudent} : Displays the enclosed content only if the user is logged in and enrolled in the course (no other roles).
  • {ifassistant}{/ifassistant} : Displays the enclosed content only if the user is logged in as a non-editing teacher in the current course.
  • {ifminassistant}{/ifminassistant} : Displays the enclosed content only if the user is logged in as a non-editing teacher or above in the current course.
  • {ifteacher}{/ifteacher} : Displays the enclosed content only if the user is logged in as a teacher in the current course.
  • {ifminteacher}{/ifminteacher} : Displays the enclosed content only if the user is logged in as a teacher or above in the current course.
  • {ifcreator}{/ifcreator} : Displays the enclosed content only if the user is logged in as a course creator.
  • {ifmincreator}{/ifmincreator} : Displays the enclosed content only if the user is logged in as a course creator or above.
  • {ifmanager}{/ifmanager} : Displays the enclosed content only if the user is logged in as a manager.
  • {ifminmanager}{/ifminmanager} : Displays the enclosed content only if the user is logged in as a manager or above.
  • {ifminsitemanager}{/ifminsitemanager} : Displays the enclosed content only if the user is logged in as a site manager or above.
  • {ifadmin}{/ifadmin} : Displays the enclosed content only if the user is logged in as an administrator.
  • {ifcustomrole roleshortname}{/ifcustomrole} : Displays enclosed content only if the user has the custom role specified by its short name within the current context.
  • {ifnotcustomrole roleshortname}{/ifnotcustomrole} : Displays enclosed content only if the user does not have the custom role specified by its short name within the current context.
  • {ifincohort CohortID|idnumber}{/ifincohort} : Displays enclosed content only if the 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, dash and underscores. It will not work if it contains spaces or other special characters.
  • {ifhasarolename roleshortname}{/ifhasarolename}: Displays enclosed content if the user has been assigned the specified role anywhere in the Moodle site within any context.

Miscellanious

  • {ifdev}{/ifdev} : Displays the enclosed content only if the user is logged in as an administrator and developer debugging mode is enabled.
  • {ifhome}{/ifhome} : Displays the enclosed content only if the user is on the Moodle Home Frontpage.
  • {ifnothome}{/ifnothome} : Displays the enclosed content only if the user is not on the Moodle Home Frontpage.
  • {ifdashboard}{/ifdashboard} : Displays the enclosed content only if the user is on the Moodle Dashboard.
  • {ifcourserequests}{/ifcourserequests} : Displays enclosed contents only if the Request a Course feature is enabled.
  • {ifeditmode}{/ifeditmode} : Displays the enclosed content only if editing mode is turned on.
  • {ifmobile}{/ifmobile} : Displays the enclosed content if it is being accessed from the mobile app or through a Web service.
  • {ifnotmobile}{/ifnotmobile} : Displays the enclosed content if not being accessed from the mobile app or through a Web service.

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

Conditionally display content filters (For Moodle Workplace)

  • {iftenant idnumber|tenantid}{/iftenant} : Displays the content if a tenant id number or tenant id is specified. Only {iftenant 1} will work in Moodle classic.
  • {ifworkplace}{/ifworkplace} : Displays 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 use this localization information to apply a particular pronunciation if the text is in a different language than the rest of the page. This is required for compliance with W3C Web Content Accessibility Guidelines (WCAG 2.0)
  • {multilang}{/multilang} : A plain-text substitute for Moodle core's Multi-Language Content filter span tags. For this tag to work, the Multi-Language Content filter must be enabled as FilterCodes doesn't do any language filtering itself. It just makes it easier to tag the text.
  • {details}{summary}{/summary}{/details} : An easy way to create an HTML 5 Details/Summary expandable section on 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 experimental feature may result in invalid HTML, but it works.
  • {hr}: Displays a horizontal rule line.

For more information and an up-to-date list of tags, see the README.md documentation file included with the plugin.

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

Megjegyzések megjelenítése
  • Krishna Mohan Prasad
    2024. febr.. 10., 14:09
    Hi Michael,
    I would request for a new type of conditional fiter support, based on user fields like country or language etc. Suppose I want to some content to users of a particular country only, then {ifuserfield_country countrycode}{/ifuserfield_country} would be helpful. Please let us know if you have any plans to add support for this kind of conditional filter.
  • Michael Milette
    2024. febr.. 10., 17:09
    Hi Krishna,

    Please submit your feature request to https://github.com/michael-milette/moodle-filter_filtercodes/issues

    Best regards,

    Michael
  • Dave Foord
    2024. febr.. 10., 21:00
    @Krishna - it is possible to achieve what you want as is with regards filtering by country. What I do is I use this plugin https://moodle.org/plugins/local_profilecohort to dynamically put all people from a certain country into a 'cohort' - I then use the ifincohort filter code to show specific content to them. I don't believe there is a ifnotincohort filter code option, so if you need the negative, just create another cohort using the aforementioned plugin but with different logic, to put everyone apart from the people in that country into that cohort, and again use the filter code to show content to that cohort.

    In terms of filtering by language that is already covered either with this plugin or by using https://moodle.org/plugins/filter_multilang2
  • Krishna Mohan Prasad
    2024. febr.. 11., 20:04
    Hi @Dave, thanks for guiding me to achieve with existing solutions.
    But I still feel that creating a cohort for small things would not be nice for me, and I will have to do multiple navigation for a single task. For time being I will use this method as suggested. But still I will put a feature request for the userfields. I hope it will be helpful in some cases.
  • Daniel Sulea
    2024. febr.. 15., 22:23
    Hello,

    I have installed the ContactForm and FilterCodes plugins.

    Now I am trying to add the ReCAPTCHA to the contact form created and is not shown.

    I cannot find the ReCAPTCHA setting to enable it: Local Plugins > Contact Form

    image

    Found this KBA:
    https://moodle.org/plugins/local_contact

    moodle-local-contact-settings

    I have used {formcontactus} and also {recaptcha}. Unfortunately ReCAPTCHA is not displayed:

    Capture

    We are using the AlmondB Theme.

    Could you please advise how to solve this issue?

    Thank you.

    Kind regards,
    Daniel
  • Michael Milette
    2024. febr.. 15., 23:11
    Hi Daniel,

    You need to enable and configure Moodle's Recaptcha. You can find it by going to Site Administration and doing a search for "recaptcha".

    Contact Form has other anti-spam features. Have you tried it without the recaptcha?

    Best regards,

    Michael
  • Daniel Sulea
    2024. febr.. 21., 22:14
    Hi Michael,

    Contact form it works, only the Recaptcha not.

    I saw that setting, is now disabled, but is no only for login?

    I want to implement the Recaptcha to the contact us page.

    Thank you.

    Kind regards,
    Daniel
  • Michael Milette
    2024. febr.. 22., 05:23
    Hi Daniel, I understand. However, the recapthca is implemented using Moodle API. Unless you turn it on in the Moodle settings, it will not work in FilterCodes.
  • Daniel Sulea
    2024. febr.. 27., 17:33
    Hi Michael,
    I have enabled "Enable reCAPTCHA for login". What I have to do further in order the {recaptcha} to work with my {formcontactus}?
    The contact form I have it already and it works perfect.
    Thank you in advance.
    Kind regards,
    Daniel
  • Michael Milette
    2024. febr.. 27., 19:37
    Did you enter the API key information?
  • Daniel Sulea
    2024. febr.. 28., 19:02
    Yes, both key and secret key.
  • Ezzeddin Hamed
    2024. márc.. 1., 17:22
    Hello Michael,

    Again, this is a very wonderful plugin that helps in making everything easier.

    My question today, how possible to make only the forced language courses show in the list of courses when only that language is selected in the language selector?
    Or showing specific categories based on the language selector?

    Are these possible using filtercodes?

    Thanks,
  • Michael Milette
    2024. márc.. 1., 17:53
    Hi Ezzeddin,

    It is not currently possible to do that using FilterCodes but it sounds like a useful idea. Please submit this as a feature request by going to https://github.com/michael-milette/moodle-filter_filtercodes/issues.

    Best regards,

    Michael Milette
  • mohamed hassan
    2024. márc.. 28., 04:27
    hi Michael, congratulations for this great plugin. however I have a problem displaying the number of currently enrolled users into course description on the home page . I used this code {courseparticipantcount} and it display total number of all users enrolled into all courses not only current course , and when used this codes {coursecount students} or
    {coursecount students:active} both display 0. any help
  • Michael Milette
    2024. márc.. 28., 05:40
    Hi Mohamed,

    When you display courses on the Home page, the context is the home page, not the course. Internally, the home page is actually a course (course id: 1). So, when the {courseparticipantcount} tag goes to get the number of enrolled students, it reports the number of users on the site since everyone is enrolled in the Home page.

    Unfortunately, your options are very limited. It would either involve:

    1. Hard-coding the number into the course description (and manually updating it periodically).

    2. Modifying your Moodle theme with some custom programming to display the number of enrolled students in the courses.

    3. Modifying the FilterCodes {coursecards} tag to include options to display the number of enrolled users in the course.

    If you are interested in the 3rd option, use the Feature Request link on the FilterCodes plugin page to create a ticket. If you are in a hurry, contact me directly for premium service.

    Best regards,

    Michael
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Please login to post comments