Pages

Tuesday, May 20, 2014

Soup up your Moodle Quiz with Javascript, CSS and JQuery magic (Frankie Kam, iMoot 2014, Super Session - South East Asia)

Here's my presentation at iMoot 2014. "How I enhanced the look and feel of the standard Moodle quiz to create a feature-rich quiz by using Javascript, CSS and a dose of JQuery".

Screenshot only.
Image shows the Main Title Screen.

This was my first iMoot. Had a hair-raising peroid when preparing my slides before the start of the online Conference (iMoot). My Moodle site's JQuery refused to work. Praise God, I managed to sort the problem only ten days before my session was due. It was a great experience presenting live to a global audience.

Screenshot only.
Me presenting live. Unplugged. With less hair on the top than Tintin,
and with more 'hair' on the sides than Princess Leia.

Here's my iMoot 2014 Video Presentation. Enjoy!



Many thanks to Wendi Kirwan-Elliott and Vinny Stocker of Pukunui for the invite. My presentation contains a visual joke at page 57. You have been warned. Total pages is 135 (only!). Note: The PowerPoint Presentation was temporarily taken offline, and is now online again. The last page of the presentation contains a Youtube demonstration of the souped up Moodle Quiz. You can view the Youtube video here: http://www.youtube.com/watch?v=57i3rhT-tKI







Presented by Frankie Kam at iMoot2014, on 18th May 2014.

The first two slides of the presentation were taken from a science-fiction movie starring Sigourney Weaver. If  you know the movie name, that would betray your age-range. :-)

Keep on Moodlin'
Frankie Kam

Thursday, November 7, 2013

The best site on the web for newbies to learn Regular Expressions with simple, interactive examples

Source: https://wiki.cercomp.ufg.br/Equipe_Web/RoR/Express%C3%A3o_Regular (see the white arrow?)

I'm in the process of learning regular Expressions (regex). What is regex? Simply put, regex is
"a special text string for describing a search pattern. So that we can think of regular expressions as wildcards on steroids. we are probably familiar with wildcard notations such as *.txt to find all text files in a file manager. The regex equivalent is.*\.txt$." (Source)
Why do I need to learn regex? Simple. To create complex Moodle quiz questions! Here is one such Moodle question type - the Perl-Compatible Regular Expression (Preg). To use this advanced question type, you have to read and wade through Moodle.org's detailed help page on the Preg question type.

To write good quiz questions, I need more power, Scotty! Regex code is goobledegook to me unless I can clearly see the nuances and intricacies of the regex syntax. You also need to have a understanding of Regex basics otherwise you can end up looking pretty foolish on Stackoverflow. Case in point.

The best site for newbies to learn regex, in my humble opinion, is...drum-roll....

for these four reasons:

  1. You get to learn regex in bite-sized pieces;
  2. There are mini-quizzes to test your understanding;
  3. Each quiz question has a solution with a clear explanation
  4. I love it!
I hope this website helps you too.

Go forth and program your search strings with regex!
Frankie Kam

Other related regex links.
Regex tester http://gskinner.com/RegExr/
Regular Expressions Tutorial http://www.regular-expressions.info

Friday, October 25, 2013

Getting enough sleep is key to improving Moodle

Source: http://www.flickr.com/photos/barkbud/4126277314/
Copyrighted by Bark.
Here's the thing. Advances in Moodle depends on code customisation to fulfil your user requirements, right? Well then, if Moodle code customisation depends on the brain power and creativity of a Moodle developer, shouldn't we should take sleep - or the lack of sleep - more seriously?

What does one require to modifying Moodle intelligently? A logical mind for detailed problem solving with an eye for details. A reasonable good memory to keep track of which core PHP files were modified, how, why and when. A brain that was cold booted with a duration of deep sleep before starting work.
In my recent past, I was like thinking that I could get by with 6 or at the very least 5 hours of sleep.

The reason for my lack of sleep was a combination of job-related stress, waking up early to send the kids to school, spending too much time coding after office hours, excessive programming and late night Net surfing. It was taking a toll on me.The result was that I was yawning more during the daytime and my memory seemed to be less effective. Does this sound familiar to you?

Monday, October 21, 2013

How to hide the Description Question Type boxes in the Quiz Navigation 'block'/section of Moodle 2.x.

School quiz. Source: http://upload.wikimedia.org/wikipedia/commons/a/a6/2013_school_wikipedia_quiz.JPG

The Description Question Type is useful when you want to include text or graphics before a quiz section. The one problem I find is that the Quiz Navigation block will show up a  [i] box for every Description question type. Not very user-friendly for the student who is taking the quiz.

For three days I searched for a solution to the problem. Talk about tough!




After many hits and misses, I finally got it! I just had to add the following code

   if (!$this->attemptobj->is_real_question($slot)) {
      continue;
   }

to the file named attemptlib.php. The magic code goes immediately inside the foreach loop of the public function get_question_buttons() function, like so:



The effect of this code hack is immediately apparent. Here's what the Quiz Navigation block looks like now.



I find this a very elegant solution to a real design and usability problem. Do you agree? I hope this will be useful for your quizzes.

regards
Frankie Kam

Ratings and Recommendations by outbrain