custom help tags

custom help tags

by Rij Blr -
Number of replies: 4

How can I use standard help framework () that pops up a small window with help messages and images to insert new help tags at various places such as-

1) inserted along with offline content

2) inserted with Quiz instructions

3) inserted with Quiz/Question Feedbacks

Do I need to create custom module to be able to add help tags. Any code snippet would be great help.

Thanks,
RJ

Average of ratings: -
In reply to Rij Blr

Re: custom help tags

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

At the moment there is no way to use the help icon system in user-input content.

Probably, if you wanted to make that possible the way to do it would be a new text filter that took some appropriate input syntax (e.g. [helpicon|title goes here|content goes here] and converted it into a help icon.

Filters are one of the easiest sorts of plugin to create.

In reply to Tim Hunt

Re: custom help tags

by Rij Blr -

How about inserting such help tags inside a module.

One of  the places I am trying to add such help  tags, is inside a custom course format.
Is there any reference document or code snippet that I can use to code that piece?

Thanks,
RJ

In reply to Rij Blr

Re: custom help tags

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Oh, sorry, I misunderstood. In your own code:

In 1.9, the function is called print_help_icon, if I remember right. There is also print_heading_with_help.

In Moodle 2.0, it would be $OUTPUT->help_icon.

In either case, search for existing code to see how the function is used.