## Activities: Course element

mod_customlabel
Maintained by Valery Fremaux
Course elements is a content strategy to improve course writing quality and editorial stability by providing preshaped pedagogic elements. The integrator or administrator (through custom CSS rules) can take over the styling of the elements. Some elements can have local dynamic behaviour, or have an internal logic strategy based on other data of Moodle. This plugin is supported by Edunao.
311 sites
238 downloads
18 fans

The course elements provide pre-shaped pedagogic bricks that can be used as ressources in a course. They behave like labels and are rendered in the course sequence (not like resources in separate content).

Course elements provide high semantic level objects that are commonly used on written learning content, such as "Important, local goals, reminder, example, work description, soluce elements, tips and tricks, see also"...

Contact points elements can clearly mark a location in a course where teacher ans learners should meet some way (face to face, phone call, online synchronous session, mail, other...)

Other course elements provide a pre-styled constant way of rendering course headings, section and sequences headings.

Course elements complete the logic of a flexipage format (or any multi-paged format) in order to improve authors productivity, and content homogeneity, by applying the samel HTML template each time an element is rendered.

Course elements come with a default icon set and layout templates. An overriding strategy is being developped and will be soon documented to let each administrator and integrator freely adapt output HTML and aspect

Course elements need to be used with the Enhanced Multilang Filter in order to display properly.

this plugin is supported by MyLearningFactory distributors as ActiveProLearn SAS and Edunao SAS (French Moodle Partner).

### Contributors

Valery Fremaux (Lead maintainer)
Please login to view contributors details and/or to contact them

### Comments

Show comments
• Fri, 9 May 2014, 10:01 PM
Valery, apologies for the incomplete report. I have the same problem that Rene reported earlier. Since there was no response to manisha's comment, and there is no 2.5 version listed, I thought the plugin hadn't been updated to 2.5 yet. I will do more troubleshooting when I am in the office on Monday. Thanks for the update.
• Mon, 12 May 2014, 11:14 PM
I am able to make the master from github work on Moodle 2.5, but icons for some of the elements do not display. The Unit Heading image is blank, rather than displaying the defaultunitheading.jpg image, and the "Work to do" clock image shows a broken image icon. Are these known problems?
• Thu, 17 Jul 2014, 8:52 PM
Hi Valery Fremaux,

I was going through this plugin and this plugin is very good and is very helpful for everyone using moodle. I found a small issue ( Might be taken as an improvement smile) in this plugin. I actually installed this plugin on my local system and found that the images ( example: If I take an example of Important Label or tips and tricks) are not being displayed.

After some tinkering I discovered that if the following changes are made in (customelabel->type->important->customelabel.css) for all the subtypes then this issue can be resolved and images can be visible.

I just saw that the path of the background image "background-image: url("/mod/customlabel/type/localgoals/icon_goals.png");" was creating this issue.

I just changed the path in order to view the image. In the path I just added the full moodle path background-image: url("/mymoodlename/mod/customlabel/type/localgoals/icon_goals.png");].

After changing the path, the image was visible.

Alternatively, we can simply give the name of the image without any path e.g,

background-image: url("icon_goals.png");.

If we follow either of the above then the image is visible properly.
Please have a look into this issue. Hope this is correct and help as I am not a PHP developer.

Best
Lokesh
• Thu, 17 Jul 2014, 9:02 PM
i guess this is because you are not using moodle on a primary path domain, but as a subpath , right ? i'm not actually so happy about the path resolution to images in customlabel, as image is mostly an integrator concern or styler concern and should not interfere with component core code. What you aslo can do to take full control over images is (what i do most often) adding a customlabel.css style sheet in styles, and a customlabel_icons directory in your theme, and map all image paths to that..., thus the original code of customlabel does not trouble your image choice and routing....
• Thu, 13 Nov 2014, 10:27 PM
I have found that if Moodle is installed in a subdirectory, many features do not work correctly, not just the images. I temporarily fixed this on my test server by the command (at the web root)

sudo ln -s moodle/mod mod

However, I think it would be better to fix this in the code. I suspect many of the places where $CFG->dirroot is used should be$CFG->wwwroot instead. This is defined in config.php to point to the moodle root directory. Is there a reason you used $CFG->dirroot instead? • Fri, 17 Jul 2015, 11:49 PM Bonjour, Une version compatible avec Moodle 2.9 est-elle prévue? Merci. • Tue, 22 Sep 2015, 7:52 PM et Moodle 2.8? • Thu, 21 Jan 2016, 6:04 PM I've just come across this plugin and like the format, but I need to make a lot of changes to the English text. I've tested making changes to the Work to Do text by editing items in mod/customlabel/type/worktodo/lang/en/customlabeltype_worktodo.php but this has not changed what appears on Moodle when trying to create a new activity. Is there something else needed for the updated text strings to appear? I am using Moodle 2.7. • Mon, 13 Mar 2017, 7:08 AM I can get it working in 3.2. Any help? TIA • Mon, 13 Mar 2017, 10:00 AM I, also, am not getting this to work. Each time I choose an item from the pre-defined list a dialog box appears in the browser, [my site] says: "you are about to change the internal data structure of this element...." This then takes me to the following: Invalid course module ID More information about this error Using Moodle 3.1+ (Build: 20160609) • Mon, 13 Mar 2017, 8:40 PM version 3.2.2 In$plugin->version = 2013041802; type localgoals is present, but in \$plugin->version = 2017020700; type localgoals is missing. plugin checker complains.
• Mon, 13 Mar 2017, 9:20 PM
Some answers here for the last tracks ;
- Changing strings : the best practice is to edit the local language package and override strings in customlabeltype_xxxxxx entry. If you change in the component strings you anyway will have to clear all caches to get strings taen into account.
- localgoals missing : Misfit indeed as it has been eroneously discarded as supposed being part of the special CMMI elements (it was not indeed). I reintroduce it in the public pack.
- Invalid course module ID : I invetigate if reproduceable here. The alert message is normal. As course elements contain a micro data model that is not liely to be compatible across elements, the course label type change cannot maintain payload integrity when the type is changed.
• Mon, 13 Mar 2017, 9:36 PM
Actually located a regression following the travis-ci and code integrity checker constraints review. Issue located on the mod_form reloading path. Fix in progress.
• Mon, 13 Mar 2017, 10:30 PM
Reviewed and tested back. Regression was comming from a silly JSHint code check rule that forces strict equality in logical tests, thus (somevar === 0) and (somevar === '0') do not give identical result !
• Mon, 3 Jul 2017, 9:58 PM
Hi,
This plug-in seems to be really useful, but I have exactly the same problem as Paul Finton (March the 13th).
I'm on Moodle 3.2 and plugin version 3.2.0
Thanks.
Please login to post comments