Joseph Rézeau hozzászólásai

Kép Kép Kép Kép

Hi Tim,

I have examined your get_numbering_styles and number_in_style methods. They work fine for standard, ascii characters, but do not allow the use of Japanese, roman, etc. methods of numbering.

1- Based on your work I am therefore proposing a new method, which entirely relies on the CSS2 list-style-type types. As show on attached screen shot, this allows for the entire range of CSS2 list-style-type types available, except for the bullets, which we are agreed are useless in this context. And of course it includes Japanese styles, etc.

Another advantage of my method is that numbering styles only have to be declared upon installation, in the answernumbering column/field of the question_multichoice table. They are then retrieved from that table for use in this function

function get_numbering_styles() {
$result=mysql_query("SHOW COLUMNS FROM mdl_question_multichoice LIKE 'answernumbering'");
$row=mysql_fetch_row($result);
preg_match_all("/'(.*?)'/", $row[1], $matches);
$arryEnum= $matches[1];
return $arryEnum;
}

2- I am also suggesting using the standard list-style-type terminology, instead of translating it. In the lang. file, this means using

$string['answernumberinglower-alpha'] = 'lower-alpha';

rather than

$string['answernumberinglower-alpha'] = 'a., b., c., ...';

This may look less user-friendly to the end-user, but they will get used to it, and it is coherent with web-authoring packages listing. The only string that might need "translating" is none -> No numbering. The other advantage is that keeping the CSS terminology in the numbering styles listing in question editing obviates the MSIE problem described below, i.e. such styles as katakana, hebrew, etc. will still be readable in the list rather than being replaced by garbage is e.g. katakana equivalent to a,b,b is used in the lang. file.

3- Display results and problems

a) All of the language-related list styles display fine in FireFox (version 2.0). In MSIE (7.0), unfortunately, very few are displayed OK (lower and upper roman); most are not (katakana, etc.) they are automatically replaced by decimal figures. One more reason for adopting FireFox!

b) The final result (as shown on attached screen shot) is OK in MSIE 7 (except for not displaying a number of language-related styles) but there is a slight alignment problem in FireFox. Because the choice text is displayed as an ordered list <ol><li>...</li></ol> located within a table cell, FireFox decides to display that list with a vertical space above and under it. I have not managed to destroy that unncessary vertical spacing, but I'll keep trying, and hope someone may suggest a solution.

As a conclusion, in keeping with Moodle's "international" vocation, I hope you will consider my efforts to making the list numbering more international, and I'm looking forward to moodlers' views.

Joseph


image00.jpg csatolmány
Kép Kép Kép Kép

Hi Don,

I expect you would like to have a facility similar to what we get in web-authoring packages when creating styles (see attached, from Macromedia Dreamweaver™). If Tim could find a way to put this into his MCQ choices numbering dropdown list, then everyone would be satisfied (or would they?mixed) I'm afraid Tim opened a bigger can of worms than he expected.wink

For more info on list-style-type in CSS 2 see I18N Tests: list-style-type.

Joseph

image00.jpg csatolmány
Kép Kép Kép Kép

Results of testing in 1.9 today:

1- Create new MCQ question and select the new Number the choices? option

abc
abc
ABC
abc
123
123
none
none

All work except for ABC which reverts to abc (lowercase).

Export / Import newly created QCM questions in Moodle XML format does not work. I expect the various import/export formats (at least the Moocle XML format) will have to be modified to take the new option into account.

Thanks,

Joseph

Kép Kép Kép Kép

Hi Lilia,

I totally fail to understand what you want to achieve with this question.

  • all 5 parts (sub-questions A to E) are exactly the same.
  • in each of the sub-questions you have 14 equally correct answers

Could you say in plain words exactly what you want the students to do when answering this question?

Joseph