Adding a special character side bar.

Adding a special character side bar.

by Thomas Hawkins -
Number of replies: 7
We are preforming language teaching at the university. Students have difficulty typing in accented and other special characters. Previously the lab was using Hot Potatoes for practice, and I created a popout side bar for typing accents. We decided to go with Moodle because we are doing some testing as well as practice, but I have not found an easy way to emulate that behaviour. I recently did a course on web applications, so I was able to soup up my bar for multiple languages, but it consists of 4 files currently (although I could probably cram it into one if I had to)

Anyway...what I'm getting at is that I want to integrate this into Moodle for when students are taking tests. It looks like the attempt.php is the file I am going to want to fool with but much of the code seems generated. I am going to try to hack in my code into the file...after this point:

/// Print the quiz page ////////////////////////////////////////////////////////

I guess this is me telling you my intentions, more so then a question, but if I have any trouble, I'll be back. And if you can see anything wrong or have any suggestions, let me know. smile

Thanks
Thomas

Edit: Ah ha! A question. smile
I was scanning the code, and I want to edit the headers to insert my own javascript and css needed to generate the popout bar but I couldn't find where <head> and similar tags are printed. (Linking to the sheets/JS would be simpler then including all of the css and script in the code, but I will if I have to.) So where can I access that?
Average of ratings: -
In reply to Thomas Hawkins

Re: Adding a special character side bar.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Thomas,
you can still use your Hot Potatoes quizzes from within Moodle, which means that you can still have the Hot Potatoes "keypad" for non-roman characters for input in HotPot activities.

However, perhaps what you want is a similar keypad for the whole Moodle site, i.e. it can be used anywhere that Moodle allows input? How about putting this idea in as a "new feature request" on the Moodle tracker?

FYI, the <HEAD> tag is printed in the "header.html" file in the folder for the theme you are using: e.g. "moodle/theme/standard/header.html"

cheers
Gordon
Average of ratings:Useful (1)
In reply to Gordon Bateson

Re: Adding a special character side bar.

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The Moodle WYSIWYG editor has a character entry pop-up window. Doesn't that do what you need? Or am I misunderstanding?
In reply to Tim Hunt

Re: Adding a special character side bar.

by Thomas Hawkins -
As far as I know, that only works for text areas, and most of the questions on a quiz are short answer (textbox) formats. I have expanded the special characters box to include IPA characters, but it has a limited usefulness.

Thomas
In reply to Gordon Bateson

Re: Adding a special character side bar.

by Thomas Hawkins -
We have imported HP to some degree. And you are right, the bar is still present. But we want a similar feature for our new Moodle activities and tests. I might submit this as a new feature request, but I'd like to get it ASAP and since I have already programmed the bar, I've got the tough work done (I hope ;)).

I would also like to make this more modular in the future so that it can be fully integrated into a Moodle install, like a pluggin or something.

I'll check out that file, I wouldn't want to include my CSS and JS on every page that is generated though, I'll need to find a way to limit the scope to only pages it will be useful.

Thanks for the help.
Thomas
In reply to Gordon Bateson

Re: Adding a special character side bar.

by Thomas Hawkins -
Modifying the header has proven successful. Theoretically, it can now appear on any activity. All that the developer has to do is insert the HTML code for the sidebar on the page that they want the bar to appear.

Here are some screenshots of it in action. It is hardly finished though. The bar doesn't work properly in IE (probably a CSS issue) and it is a pain to install. Very hacky, and not pluggin-y at all. I hope to intergrate this fully with Moodle in the future, so far as it is an option when creating activities.

But that could be a ways off. Anyway...on to the screenshots.
Attachment accentbar.JPG
In reply to Thomas Hawkins

Re: Adding a special character side bar.

by Michael Penney -
Hi Thomas, that is a really nice feature for language testing! I hope you can get it worked into a suitable version to be included in standard Moodle. Have you entered it as a feature request in the tracker yet?
In reply to Michael Penney

Re: Adding a special character side bar.

by Thomas Hawkins -
No, I have not added it yet.

I figured I would just do it myself, and if someone wants to use it or adapt it they can.