Posts made by Joseph Rézeau

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Philip!

This is in answer to your queries regarding correct answer analysis of student responses entered in the short answer exercise type of the Lesson module.

The correct way to match complex reponses to a short answer question is to use regular expressions. Mastering regular expressions is not so easy, but once you understand them they are a very powerful tool for answer analysis (which is what you are after).

Unfortunately, at the moment regular expressions are not implemented in the lesson module (nor in the Quiz module).

I have developed a working version of the lesson.php module which includes regular expressions and sent it to Ray some time in July. Ray, are you still interested in incorporating regular expressions into the Lesson Module ?

In the meantime, Philip, if you want to test the "power" of regular expressions, you can go to my testing page: http://rezeau.org/webCT/expandRegexpToString.htm

in the regExp box enter: int\s*\[\] dataArray\s*=\s*new int\s*\[\s*total\s*\]

in the String box, enter: int [] dataArray = new int [total]

Finally, the answer to your question of allowing any number of spaces (and no other characters) is dealt with by the \s* string in the REgular Expression to be matched (\s = ny single white-space character ; * = the preceding character 0 or infinite number of times)

Hope that helps,

Joseph_R

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Philip and David and thanks for the detailed explanations.

Now I understand it all and I've been able to implement my own stylesheet, over-riding the admin-imposed theme. There is a minor drawback in this otherwise perfectly valid workaround: since it is only possible to impose one's own style through a "regular" CSS file, we lose the interesting facility of the "variable color parameters" as originally coded in the styles.php of the themes directories. Which means putting all those variables back to where they belong in one's own CSS file. A little tiresome, but well worth the new customizing freedom it gives me as a teacher.

I'm looking forward to the new "rendering mechanisms" mentioned in David's post (version 2).

Joseph_R

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi David!

Your post answers a query I've had since I became acquainted with Moodle. It is for me - as a teacher - quite necessary to be able to override in my own course(s) the default theme/stylesheet set by admin for the whole Moodle site.

However, being ignorant of php, I do not understand how your workaround works. I'd be grateful if you could answer the following questions/guesses...

  1. As fas as I can see, stylesheets in the current Moodle Themes are .php files, not plain .css ones; in your workaround you mention a style.css file: would that be a plain .css file or would it have to be a .php file ?
  2. In your formula : href="<?php echo "$CFG->wwwroot/file.php/$course->id/style.css"; ?>", where does the name of my course go?
  3. If one teacher wants to have his own .css stylesheet for more than one course OR if a number of teachers want to thus customize their course(s), would admin have to add as many extra lines as needed to the header.html file?

Actually, what is badly needed in a forthcoming new version of Moodle is a facility for individual teachers to customize their own course.

Thanks in advance,

Joseph_R

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks, Martin.

I should have read more carefully this passage from the Download Moodle page:

From a Windows computer

To get started with a fresh copy of Moodle, follow the following steps:

6- For the STABLE version, click on the "Revision" tab and then check the radio button labelled "Choose branch or tag". From the drop-down menu select MOODLE_14_STABLE. For the latest development version just leave out this step.

May I suggest rephrasing point 6 thus:

6- For the STABLE version, click on the "Revision" tab and then check the radio button labelled "Choose branch or tag". From the drop-down menu select MOODLE_14_STABLE.

For the latest development version just leave out step 6 (under the Revision tab, the radio-button Use HEAD branch is checked by default).

Joseph_R