{"id":12,"date":"2024-05-23T16:12:19","date_gmt":"2024-05-23T15:12:19","guid":{"rendered":"http:\/\/docs.brickfield.ie\/tool-coursetagger\/?page_id=12"},"modified":"2025-10-02T10:20:17","modified_gmt":"2025-10-02T09:20:17","slug":"custom-role","status":"publish","type":"page","link":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/custom-role\/","title":{"rendered":"Custom role"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"12\" class=\"elementor elementor-12\" data-elementor-post-type=\"page\">\n\t\t\t\t<header class=\"elementor-element elementor-element-a6e3c89 e-flex e-con-boxed e-con e-parent\" data-id=\"a6e3c89\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0b1022d elementor-widget elementor-widget-template\" data-id=\"0b1022d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"template.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-template\">\n\t\t\t\t\t<div data-elementor-type=\"container\" data-elementor-id=\"210\" class=\"elementor elementor-210\" data-elementor-post-type=\"elementor_library\">\n\t\t\t\t<div class=\"elementor-element elementor-element-94518a5 e-flex e-con-boxed e-con e-parent\" data-id=\"94518a5\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a72ef30 elementor-widget elementor-widget-image\" data-id=\"a72ef30\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"811\" height=\"186\" src=\"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-content\/uploads\/sites\/12\/2024\/05\/brickfield-logo-2.png\" class=\"attachment-full size-full wp-image-24\" alt=\"Brickfield Education Labs\" srcset=\"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-content\/uploads\/sites\/12\/2024\/05\/brickfield-logo-2.png 811w, https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-content\/uploads\/sites\/12\/2024\/05\/brickfield-logo-2-300x69.png 300w, https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-content\/uploads\/sites\/12\/2024\/05\/brickfield-logo-2-768x176.png 768w\" sizes=\"(max-width: 811px) 100vw, 811px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/header>\n\t\t<nav class=\"elementor-element elementor-element-be51656 e-flex e-con-boxed e-con e-parent\" data-id=\"be51656\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f816b0b elementor-widget elementor-widget-text-editor\" data-id=\"f816b0b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><a href=\"https:\/\/docs.brickfield.ie\/tool-coursetagger\/\">Home<\/a> &#8211; Custom role<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/nav>\n\t\t<main class=\"elementor-element elementor-element-130fdb9 e-flex e-con-boxed e-con e-parent\" data-id=\"130fdb9\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-5e5736d e-con-full e-flex e-con e-child\" data-id=\"5e5736d\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-6c8b85a banner e-con-full e-flex e-con e-child\" data-id=\"6c8b85a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-bfeb111 elementor-widget elementor-widget-heading\" data-id=\"bfeb111\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Course Tag API: Custom role<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-592b6cb e-flex e-con-boxed e-con e-child\" data-id=\"592b6cb\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<aside class=\"elementor-element elementor-element-af03477 e-con-full e-flex e-con e-child\" data-id=\"af03477\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ba6225a elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents\" data-id=\"ba6225a\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;exclude_headings_by_selector&quot;:[],&quot;no_headings_message&quot;:&quot;No headings were found on this page.&quot;,&quot;headings_by_tags&quot;:[&quot;h2&quot;,&quot;h3&quot;,&quot;h4&quot;,&quot;h5&quot;,&quot;h6&quot;],&quot;marker_view&quot;:&quot;numbers&quot;,&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}\" data-widget_type=\"table-of-contents.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-toc__header\">\n\t\t\t\t\t\t<h2 class=\"elementor-toc__header-title\">\n\t\t\t\tTable of Contents\t\t\t<\/h2>\n\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--expand\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__ba6225a\" aria-expanded=\"true\" aria-label=\"Open table of contents\"><svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-chevron-down\" viewBox=\"0 0 448 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z\"><\/path><\/svg><\/div>\n\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--collapse\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__ba6225a\" aria-expanded=\"true\" aria-label=\"Close table of contents\"><svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-chevron-up\" viewBox=\"0 0 448 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z\"><\/path><\/svg><\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<div id=\"elementor-toc__ba6225a\" class=\"elementor-toc__body\">\n\t\t\t<div class=\"elementor-toc__spinner-container\">\n\t\t\t\t<svg class=\"elementor-toc__spinner eicon-animation-spin e-font-icon-svg e-eicon-loading\" aria-hidden=\"true\" viewBox=\"0 0 1000 1000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z\"><\/path><\/svg>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/aside>\n\t\t<section class=\"elementor-element elementor-element-d5cefb9 e-con-full e-flex e-con e-child\" data-id=\"d5cefb9\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a5590c4 elementor-widget elementor-widget-heading\" data-id=\"a5590c4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Introduction<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ed1c48d elementor-widget elementor-widget-text-editor\" data-id=\"ed1c48d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This involves calling the API web service using the token provided by the administrator and configuring the service parameters accordingly for the courses to be tagged.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c68581e e-con-full e-flex e-con e-child\" data-id=\"c68581e\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-351ff14 elementor-widget elementor-widget-image\" data-id=\"351ff14\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"749\" height=\"94\" src=\"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-content\/uploads\/sites\/12\/2024\/05\/tool_coursetagger_1.png\" class=\"attachment-full size-full wp-image-85\" alt=\"The page output after successfully adding tags to a course. It displays the following text: This XML file does not appear to have any style information associated with it. The document tree is shown below. The JSON output is: Success 2, taginstances created or already existing.\" srcset=\"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-content\/uploads\/sites\/12\/2024\/05\/tool_coursetagger_1.png 749w, https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-content\/uploads\/sites\/12\/2024\/05\/tool_coursetagger_1-300x38.png 300w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4fe53ec elementor-widget elementor-widget-heading\" data-id=\"4fe53ec\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Adding tags to courses<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-38dfcb8 elementor-widget elementor-widget-text-editor\" data-id=\"38dfcb8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>By whichever means you wish, you just need to send a web service request to the moodle Course Tag API tool. The relevant web service protocol also needs to be enabled on your Moodle site. In this user guide, we have been using the REST protocol as part of the described configuration process.<\/p><p>\u00a0<\/p><p>To call the REST web service, you need to include the following parameters:<\/p><ul><li><strong>wsfunction<\/strong> = tool_coursetagger_create_coursetags (it must be this exact value)<\/li><li><strong>wstoken<\/strong> = the user token<\/li><li><strong>coursetype <\/strong>(optional) = {id|shortname|idnumber} \/\/ Defaults to shortname for identifying courses.<\/li><li><strong>courselist <\/strong>= course1,course2,course3 \/\/ The courses as a comma separated list, identified as specified by the coursetype param.<\/li><li><strong>taglist<\/strong> = tag1,tag2,tag3 \/\/ The tags to be added to all the specified courses, as a comma separated list.<\/li><li><strong>removeprev<\/strong> (optional) (if set to &#8216;removeprev&#8217;, will remove all existing course tags from the specified courses first).<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cfd7f64 elementor-widget elementor-widget-heading\" data-id=\"cfd7f64\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Example REST URL<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c34dba3 elementor-widget elementor-widget-text-editor\" data-id=\"c34dba3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>An example REST URL for the Course Tag API tool:<\/p><ul><li>https:\/\/&lt;siteurl&gt;\/webservice\/rest\/server.php?wsfunction=tool_coursetagger_create_coursetags&amp;wstoken=xxx&amp;coursetype=&amp;courselist=Lesson,yoga 103,LETS Cite&amp;taglist=art,culture,history,blah&amp;removeprev=<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eb6f68f elementor-widget elementor-widget-heading\" data-id=\"eb6f68f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Web service call tips<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21bde92 elementor-widget elementor-widget-text-editor\" data-id=\"21bde92\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n \t<li>The coursetype value can optionally be set to idnumber or id, it defaults to shortname if not set.<\/li>\n \t<li>Leave removeprev as blank if you want to retain old tags and have them in addition to the new list, or set to \u201cremoveprev=removeprev\u201d to remove all previously assigned tags, existing at the time of the web service call, from the specified courses.<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/main>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Home &#8211; Custom role Course Tag API: Custom role Table of Contents Introduction This involves calling the API web service using the token provided by the administrator and configuring the service parameters accordingly for the courses to be tagged. Adding tags to courses By whichever means you wish, you just need to send a web [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"footnotes":""},"class_list":["post-12","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/pages\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":43,"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/pages\/12\/revisions"}],"predecessor-version":[{"id":219,"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/pages\/12\/revisions\/219"}],"wp:attachment":[{"href":"https:\/\/docs.brickfield.ie\/tool-coursetagger\/wp-json\/wp\/v2\/media?parent=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}