Moodle
  1. Moodle
  2. MDL-20296

Units handling for numerical and calculatedquestions

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      15625

      Description

      see on quiz forum A proposal for handling units in numerical and calculated questions
      http://moodle.org/mod/forum/discuss.php?d=133722

      1. difff_backup_restore_numerical_options.php
        3 kB
        Pierre Pichet
      2. upgrade.php
        2 kB
        Pierre Pichet
      1. screenshot-10.jpg
        100 kB
      2. screenshot-11.jpg
        45 kB
      3. screenshot-12.jpg
        145 kB
      4. screenshot-13.jpg
        148 kB
      5. screenshot-14.jpg
        86 kB
      6. screenshot-15.jpg
        71 kB
      7. screenshot-3.jpg
        97 kB
      8. screenshot-5.jpg
        131 kB
      9. screenshot-6.jpg
        91 kB
      10. screenshot-7.jpg
        96 kB
      11. screenshot-8.jpg
        150 kB
      12. screenshot-9.jpg
        87 kB

        Issue Links

          Activity

          Pierre Pichet created issue -
          Pierre Pichet made changes -
          Field Original Value New Value
          Attachment screenshot-1.jpg [ 18387 ]
          Pierre Pichet made changes -
          Attachment screenshot-2.jpg [ 18391 ]
          Pierre Pichet made changes -
          Attachment screenshot-1.jpg [ 18387 ]
          Hide
          Pierre Pichet added a comment -

          student interface

          Show
          Pierre Pichet added a comment - student interface
          Pierre Pichet made changes -
          Attachment screenshot-3.jpg [ 18433 ]
          Hide
          Pierre Pichet added a comment -

          teacher interface

          Show
          Pierre Pichet added a comment - teacher interface
          Pierre Pichet made changes -
          Attachment screenshot-4.jpg [ 18434 ]
          Hide
          Pierre Pichet added a comment -

          Adding the instructions are just part of the more general problem of units handling so I decide to use this bug for solving the units handling.
          Will create the links with already existing bugs on the subject.

          Show
          Pierre Pichet added a comment - Adding the instructions are just part of the more general problem of units handling so I decide to use this bug for solving the units handling. Will create the links with already existing bugs on the subject.
          Pierre Pichet made changes -
          Summary Adding insctructions to student for numerical questions Units handling for numerical and calculatedquestions
          Fix Version/s 2.0 [ 10122 ]
          Description The main idea is to add a field that could be called instruction below the response input field and that will be available in the editing form as the general feedback.
          Teacher could put there instructions on how to write the numbers or units.
          see on quiz forum A proposal for handling units in numerical and calculated questions
          http://moodle.org/mod/forum/discuss.php?d=133722

          Hide
          Pierre Pichet added a comment -

          A more advanced version of the editing interface

          Show
          Pierre Pichet added a comment - A more advanced version of the editing interface
          Pierre Pichet made changes -
          Attachment screenshot-5.jpg [ 18436 ]
          Hide
          Pierre Pichet added a comment -

          This will be solved by adding a new table question_numerical_options which at the present design stage , have the structure shown in the upgrade.php file

          Show
          Pierre Pichet added a comment - This will be solved by adding a new table question_numerical_options which at the present design stage , have the structure shown in the upgrade.php file
          Pierre Pichet made changes -
          Attachment upgrade.php [ 18437 ]
          Pierre Pichet made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Pierre Pichet added a comment -

          Hi Tim,
          I struggle to put everything in the short question code but things qot to complicated.
          So the print_question and display will be put back in numerical/questiontype.php and numerical/display.htm.

          Code is simpler this way and as I will be on Moodle for some years, maintenance will not be a problem...

          Show
          Pierre Pichet added a comment - Hi Tim, I struggle to put everything in the short question code but things qot to complicated. So the print_question and display will be put back in numerical/questiontype.php and numerical/display.htm. Code is simpler this way and as I will be on Moodle for some years, maintenance will not be a problem...
          Hide
          Tim Hunt added a comment -

          Are you sure you can't just make shortanswer display.html call some $this->display_something() methods to generate the bits that need to be different.

          Please do not duplicate code.

          Show
          Tim Hunt added a comment - Are you sure you can't just make shortanswer display.html call some $this->display_something() methods to generate the bits that need to be different. Please do not duplicate code.
          Hide
          Pierre Pichet added a comment -

          Hi Tim,
          I have a first working solution for displaying the unit choices and apply a unit penalty.
          So I will return to the short answer display and find an "easy" way to do it.

          Show
          Pierre Pichet added a comment - Hi Tim, I have a first working solution for displaying the unit choices and apply a unit penalty. So I will return to the short answer display and find an "easy" way to do it.
          Hide
          Pierre Pichet added a comment -

          Some hours later...
          The more you study Moodle code, the more you understand its complexity but also you find simpler way to do the things...
          So don't worry, duplication will be minimal.
          For example I need a numerical_question function grade_responses() as I need to add unit penalty and store the info (in $state) so it can be display to the user like the question penalty.

          Show
          Pierre Pichet added a comment - Some hours later... The more you study Moodle code, the more you understand its complexity but also you find simpler way to do the things... So don't worry, duplication will be minimal. For example I need a numerical_question function grade_responses() as I need to add unit penalty and store the info (in $state) so it can be display to the user like the question penalty.
          Hide
          Pierre Pichet added a comment -

          The solution I choose is to include in the shortanswer/display.html a new numerical/display.html that contain all the specific code .
          As long as the numerical/display.html output is contained in a <div element everytthing is OK.
          So no duplication.
          <?php if ($question->qtype == 'numerical' || $question->qtype == 'calculated' )

          { include("$CFG->dirroot/question/type/numerical/display.html");?> <?php }

          else {?>
          <div class="answer">
          <input type="text" class="<?php echo $class; ?>" <?php echo "$readonly $inputname $value"; ?> size="80"/>
          <?php echo $feedbackimg; ?>
          </div>
          <?php }?>

          A little modification in shortanswer/print_question_grading_details will allow the display of the penalty for bad units.

          Show
          Pierre Pichet added a comment - The solution I choose is to include in the shortanswer/display.html a new numerical/display.html that contain all the specific code . As long as the numerical/display.html output is contained in a <div element everytthing is OK. So no duplication. <?php if ($question->qtype == 'numerical' || $question->qtype == 'calculated' ) { include("$CFG->dirroot/question/type/numerical/display.html");?> <?php } else {?> <div class="answer"> <input type="text" class="<?php echo $class; ?>" <?php echo "$readonly $inputname $value"; ?> size="80"/> <?php echo $feedbackimg; ?> </div> <?php }?> A little modification in shortanswer/print_question_grading_details will allow the display of the penalty for bad units.
          Hide
          Pierre Pichet added a comment -

          A first result using the include to numerical/display.html with also from shoranswer/print_question_grading_details a comment on a penatty for bad unit.
          So it is working, let clean the code

          Show
          Pierre Pichet added a comment - A first result using the include to numerical/display.html with also from shoranswer/print_question_grading_details a comment on a penatty for bad unit. So it is working, let clean the code
          Pierre Pichet made changes -
          Attachment screenshot-6.jpg [ 18494 ]
          Hide
          Pierre Pichet added a comment -

          Finally i decide to have to input field one for the number and one for unit.
          Also the unit can be on the left side as $1.00 or on the rigth side as 1.00 cm

          Show
          Pierre Pichet added a comment - Finally i decide to have to input field one for the number and one for unit. Also the unit can be on the left side as $1.00 or on the rigth side as 1.00 cm
          Pierre Pichet made changes -
          Attachment screenshot-7.jpg [ 18510 ]
          Hide
          Pierre Pichet added a comment -

          Hi Tim,
          As the calculated question will use the question_numerical_options table, I have create in numerical/questiontype.php
          the functions
          function save_numerical_options(&$question) {
          and
          function get_numerical_options(&$question) {

          for backup and restore I created

          function question_backup_numerical_options($bf,$preferences,$question,7);

          $status = question_restore_numerical_options ($old_question_id,$new_question_id,$num_info,$restore);

          and put them in question/backuplib.php and question/restorelib.php respectively.

          Is this OK?

          P.S. diff files will follow

          Show
          Pierre Pichet added a comment - Hi Tim, As the calculated question will use the question_numerical_options table, I have create in numerical/questiontype.php the functions function save_numerical_options(&$question) { and function get_numerical_options(&$question) { for backup and restore I created function question_backup_numerical_options($bf,$preferences,$question,7); $status = question_restore_numerical_options ($old_question_id,$new_question_id,$num_info,$restore); and put them in question/backuplib.php and question/restorelib.php respectively. Is this OK? P.S. diff files will follow
          Hide
          Tim Hunt added a comment -

          Probably OK. I'll have a look at the diffs before you commit them, if I may.

          Note, I am currently working on http://docs.moodle.org/en/Development:Question_Engine_2 (as I hope you have already seen). However, that probably does not affect the changes you are making much, and anyway, it will be some months before my changes land in CVS, I guess.

          Show
          Tim Hunt added a comment - Probably OK. I'll have a look at the diffs before you commit them, if I may. Note, I am currently working on http://docs.moodle.org/en/Development:Question_Engine_2 (as I hope you have already seen). However, that probably does not affect the changes you are making much, and anyway, it will be some months before my changes land in CVS, I guess.
          Hide
          Pierre Pichet added a comment -

          'I'll have a look at the diffs before you commit them, if I may.'
          No problem.
          In any case they will have been tested before shown here..

          However, although you are working on question engine 2, I understand also that you have a lot of work on 2.0 beta.

          I want that this number units code be part of Moodle 2.0, this is why I will CVS soon a beta version even if the trimmings are not finished ( like the language strings or XML import export ( I have seen the recent work of Oleg on this).
          The version I have can handle well numerical in the three formats, numerical insert in multiple choice and calculated questions.
          The quiz report seems also OK.

          What is the your estimate of beta 2.0 release( many items of Moodle 2.0 Planning (constantly revised) : Projects are near completion)

          Show
          Pierre Pichet added a comment - 'I'll have a look at the diffs before you commit them, if I may.' No problem. In any case they will have been tested before shown here.. However, although you are working on question engine 2, I understand also that you have a lot of work on 2.0 beta. I want that this number units code be part of Moodle 2.0, this is why I will CVS soon a beta version even if the trimmings are not finished ( like the language strings or XML import export ( I have seen the recent work of Oleg on this). The version I have can handle well numerical in the three formats, numerical insert in multiple choice and calculated questions. The quiz report seems also OK. What is the your estimate of beta 2.0 release( many items of Moodle 2.0 Planning (constantly revised) : Projects are near completion)
          Hide
          Pierre Pichet added a comment -

          This was copied from numerical units although there should be only one numerical options for each question.
          Cannot be tested as moodle head is full of errors

          Show
          Pierre Pichet added a comment - This was copied from numerical units although there should be only one numerical options for each question. Cannot be tested as moodle head is full of errors
          Pierre Pichet made changes -
          Hide
          Tim Hunt added a comment -

          Sorry, Pierre, I don't understand the context. Where will that code go? What happens to the code in its old place? Are you able to attach a full patch?

          Show
          Tim Hunt added a comment - Sorry, Pierre, I don't understand the context. Where will that code go? What happens to the code in its old place? Are you able to attach a full patch?
          Hide
          Pierre Pichet added a comment -

          + //This function backups question_numerical_options from different question types
          + function question_backup_numerical_options($bf,$preferences,$question,$level=7) {
          + global $CFG, $DB;
          ...
          will be added to question/backuplib.php

          and
          + function question_restore_numerical_options($old_question_id,$new_question_id,$info,$restore) {
          + global $CFG, $DB;
          +
          ....
          be added to question/restorelib.php

          Show
          Pierre Pichet added a comment - + //This function backups question_numerical_options from different question types + function question_backup_numerical_options($bf,$preferences,$question,$level=7) { + global $CFG, $DB; ... will be added to question/backuplib.php and + function question_restore_numerical_options($old_question_id,$new_question_id,$info,$restore) { + global $CFG, $DB; + .... be added to question/restorelib.php
          Hide
          Tim Hunt added a comment -

          Ah. I see. I guess that makes sense. Will it be used by both numerical and calculated qtypes? Anyway fine by me.

          Show
          Tim Hunt added a comment - Ah. I see. I guess that makes sense. Will it be used by both numerical and calculated qtypes? Anyway fine by me.
          Hide
          Pierre Pichet added a comment -

          Yes Calculated will also used the numerical_options for controlling its display.

          I will probably CVS all the code today or tomorrow.

          Show
          Pierre Pichet added a comment - Yes Calculated will also used the numerical_options for controlling its display. I will probably CVS all the code today or tomorrow.
          Hide
          Pierre Pichet added a comment -

          Full testing begin...

          The number and unit can be displayed in many ways
          unit input HTML element,
          unit select element,
          unit display,
          only the answer input HTML
          the unit can be displayed either on right or left of the answer element

          All these possiblities can be used in
          numerical questions
          calculated questions
          simple calculated questions

          the multianswer (cloze) works as usual.

          At the present state the grading is Ok for all options but there are some aesthetic glitches in preview display
          when the answer and the unit elements are displayed simultaneously.(Fine CSS tuning...)

          Show
          Pierre Pichet added a comment - Full testing begin... The number and unit can be displayed in many ways unit input HTML element, unit select element, unit display, only the answer input HTML the unit can be displayed either on right or left of the answer element All these possiblities can be used in numerical questions calculated questions simple calculated questions the multianswer (cloze) works as usual. At the present state the grading is Ok for all options but there are some aesthetic glitches in preview display when the answer and the unit elements are displayed simultaneously.(Fine CSS tuning...)
          Hide
          Pierre Pichet added a comment -

          At the actual HEAD usability dump and restore functions cannot be tested...

          Show
          Pierre Pichet added a comment - At the actual HEAD usability dump and restore functions cannot be tested...
          Hide
          Pierre Pichet added a comment -

          Oleg ask for control (on-off) of the instructions (see MDL-20861).
          I put in this project all the items from forum discussions over least years.
          You are asking for another feature that is to switch on or off all the instructions field.
          This can be done but will need another database parameter to store or a more tricky use of the actual ones...
          Furthermore perhaps people will want to control this at the quiz level, why not ...

          Show
          Pierre Pichet added a comment - Oleg ask for control (on-off) of the instructions (see MDL-20861 ). I put in this project all the items from forum discussions over least years. You are asking for another feature that is to switch on or off all the instructions field. This can be done but will need another database parameter to store or a more tricky use of the actual ones... Furthermore perhaps people will want to control this at the quiz level, why not ...
          Hide
          Oleg Sychev added a comment -

          My goal: have a question as slim as possible (and editing interface too)
          .
          I just don't want these instruction been copied all over the quiz, i.e. student should see them only if he want them (and they should take as small space as possible). One icon is OK in every question without user control, a line of text in a box is too much. Even on you screenshot-3 instructions takes more place (and are more highlighted) than question text, are they really that important?

          I don't know what preventing using Moodle help icons in a quiz attempt, but if you really can't use them (why?), you could place a similar icon which displays valid number instructions when mouse is pointed on it (moodle help icons do that in 2.0 if ajax is working) - you obviously could do that in quiz attempt since cloze question use it to display comments when mouse is over input field.

          I also wonder, what makes teacher units instructions so different from question text that they are entered and displayed separately (and even in a box, which eat up a lot of space - unnecesary boxes are evil). Could they be reused between a questions? (that can justify separate entering, but not displaying) Teacher obviously could enter any necessary instructions in question text. Is there some modes where a question text will be visible but unit instructions - not? (just looking for good old Occam razor in my attic )

          Show
          Oleg Sychev added a comment - My goal: have a question as slim as possible (and editing interface too) . I just don't want these instruction been copied all over the quiz, i.e. student should see them only if he want them (and they should take as small space as possible). One icon is OK in every question without user control, a line of text in a box is too much. Even on you screenshot-3 instructions takes more place (and are more highlighted) than question text, are they really that important? I don't know what preventing using Moodle help icons in a quiz attempt, but if you really can't use them (why?), you could place a similar icon which displays valid number instructions when mouse is pointed on it (moodle help icons do that in 2.0 if ajax is working) - you obviously could do that in quiz attempt since cloze question use it to display comments when mouse is over input field. I also wonder, what makes teacher units instructions so different from question text that they are entered and displayed separately (and even in a box, which eat up a lot of space - unnecesary boxes are evil). Could they be reused between a questions? (that can justify separate entering, but not displaying) Teacher obviously could enter any necessary instructions in question text. Is there some modes where a question text will be visible but unit instructions - not? (just looking for good old Occam razor in my attic )
          Hide
          Pierre Pichet added a comment -

          Your comments about the size are OK. I just used the default HTML template.

          How to display help info in a quiz is something that Tim should settle once he has finished with the new question engine.

          From the student view point specific instructions on how to write the numerical answer (not how to calculate) should be near the input text element.
          Being a chemist using sometimes complex units (i.e. physical chemistry), specific instructions to a question are often necessary.

          As for Occam , this remember me my 50 years old philosophy courses...

          Show
          Pierre Pichet added a comment - Your comments about the size are OK. I just used the default HTML template. How to display help info in a quiz is something that Tim should settle once he has finished with the new question engine. From the student view point specific instructions on how to write the numerical answer (not how to calculate) should be near the input text element. Being a chemist using sometimes complex units (i.e. physical chemistry), specific instructions to a question are often necessary. As for Occam , this remember me my 50 years old philosophy courses...
          Hide
          Oleg Sychev added a comment -

          "From the student view point specific instructions on how to write the numerical answer (not how to calculate) should be near the input text element.
          Being a chemist using sometimes complex units (i.e. physical chemistry), specific instructions to a question are often necessary."

          I am in no position to question necessity of specific instructions for a question (on units or something). I often end up writing my own ones, and not for numerical only, thought they tend to be repeated in all questions of particular category since they are all same (what may really be a good idea is to add a text field to the question category, that will be appended to all questions in it).

          But as things are now in Moodle 1.9 I just write those instructions in question text field, usually as a paragraph after actual question text (i.e. near input field) and doesn't have any problems or complaints about that at all in years. Students naturally read the instructions as part of the question, teachers too. What I can't understand is why there is a need to add a separate field for them. So I point to Occam, since for me additional field to teacher instructions (not the instructions itself) is unnecesary entity (and unnecesary HTML editor on question editing page, which takes much space and make page initialisation slower).

          Show
          Oleg Sychev added a comment - "From the student view point specific instructions on how to write the numerical answer (not how to calculate) should be near the input text element. Being a chemist using sometimes complex units (i.e. physical chemistry), specific instructions to a question are often necessary." I am in no position to question necessity of specific instructions for a question (on units or something). I often end up writing my own ones, and not for numerical only, thought they tend to be repeated in all questions of particular category since they are all same (what may really be a good idea is to add a text field to the question category, that will be appended to all questions in it). But as things are now in Moodle 1.9 I just write those instructions in question text field, usually as a paragraph after actual question text (i.e. near input field) and doesn't have any problems or complaints about that at all in years. Students naturally read the instructions as part of the question, teachers too. What I can't understand is why there is a need to add a separate field for them. So I point to Occam, since for me additional field to teacher instructions (not the instructions itself) is unnecesary entity (and unnecesary HTML editor on question editing page, which takes much space and make page initialisation slower).
          Hide
          Pierre Pichet added a comment -

          My main objective is to add all the featuresthat were asked or that myself I find usefull.

          If the number format instructions can be display in another way, the actual code only display the teacher intructions when not empty.

          the number of additional fields to fill seems to grow from one version to another ( feedback of different forms and now tags).

          so...

          Show
          Pierre Pichet added a comment - My main objective is to add all the featuresthat were asked or that myself I find usefull. If the number format instructions can be display in another way, the actual code only display the teacher intructions when not empty. the number of additional fields to fill seems to grow from one version to another ( feedback of different forms and now tags). so...
          Hide
          Oleg Sychev added a comment -

          Pierre, please note I'm not insisting on immediate removal of these instructions (oh, I could remove that control from my site without much trouble if I will want it). I'm more trying to add a point to think of. Adding new features by brute force is not the best way to handle things, it may add more bad then good points. Asking for something people not always thinking about the consequences (there are too many examples), and in case of bad consequences they will blame Moodle (you), not themselves for asking.

          The number of fields in question editing is really growing, and that is worrying thing. The are many questions, and editing them should be as quick as possible (it's OK to have a long form to edit quiz, there are few quizzes, but much more questions....). Should we really mindlessly associate all new features with the questions as objects? Remember, if you place a field too low in hierarchy you'll get two problems:
          1) you slow down editing of (questions);
          2) you should repeat one information often, entering same things againg and again - not really the thing people appreciate often.

          Let's take a units for example. Are particular units a property of a question, individual question? Is a multiplicator between pounds and gramms different for different questions? I really have my doubts about it.

          Of course, sharing need to be carefully thinked out. It is just easier to add all to the single questions, and let teachers/authors suffer from this. Thought it probably naturally easier for units, when you could define quantity, and then all units of this quantity, while choosing in particular question only quantity, desired units and mode. And so on...

          There are things that is easier to do for you interface for now. For example, you could use drop-down menu instead of long list of radio boxes when choosing unit mode for a question (and for choosing units in attempt too, drop-down menu will place unit exactly after the number). And some controls on the form could be advanced too...

          Show
          Oleg Sychev added a comment - Pierre, please note I'm not insisting on immediate removal of these instructions (oh, I could remove that control from my site without much trouble if I will want it). I'm more trying to add a point to think of. Adding new features by brute force is not the best way to handle things, it may add more bad then good points. Asking for something people not always thinking about the consequences (there are too many examples), and in case of bad consequences they will blame Moodle (you), not themselves for asking. The number of fields in question editing is really growing, and that is worrying thing. The are many questions, and editing them should be as quick as possible (it's OK to have a long form to edit quiz, there are few quizzes, but much more questions....). Should we really mindlessly associate all new features with the questions as objects? Remember, if you place a field too low in hierarchy you'll get two problems: 1) you slow down editing of (questions); 2) you should repeat one information often, entering same things againg and again - not really the thing people appreciate often. Let's take a units for example. Are particular units a property of a question, individual question? Is a multiplicator between pounds and gramms different for different questions? I really have my doubts about it. Of course, sharing need to be carefully thinked out. It is just easier to add all to the single questions, and let teachers/authors suffer from this. Thought it probably naturally easier for units, when you could define quantity, and then all units of this quantity, while choosing in particular question only quantity, desired units and mode. And so on... There are things that is easier to do for you interface for now. For example, you could use drop-down menu instead of long list of radio boxes when choosing unit mode for a question (and for choosing units in attempt too, drop-down menu will place unit exactly after the number). And some controls on the form could be advanced too...
          Hide
          Pierre Pichet added a comment -

          If the teacher doos not want to use unit , he just ignore units and thing will be displayed as usual.

          The only remaining problem is what to do for the valid number formats.
          This is not fix already and can be fix in various ways.
          What I propose is following my understanding of what is a good student interface as applied elsewhere in moodle form.
          Tim will surely comment once he will work on the new engine for numerical answer.

          Show
          Pierre Pichet added a comment - If the teacher doos not want to use unit , he just ignore units and thing will be displayed as usual. The only remaining problem is what to do for the valid number formats. This is not fix already and can be fix in various ways. What I propose is following my understanding of what is a good student interface as applied elsewhere in moodle form. Tim will surely comment once he will work on the new engine for numerical answer.
          Hide
          Oleg Sychev added a comment -

          We should think about making teacher interface slim too, editing question is a frequent operation. Reread my previous comment from that point of view. There are things you could do right now, like changing radio-buttons to drop-down menu (an ususal Moodle practice is to use drop-down menu on forms, not radio-buttons), and there are things where thoughts are needed, like unit sharing between a questions.

          Show
          Oleg Sychev added a comment - We should think about making teacher interface slim too, editing question is a frequent operation. Reread my previous comment from that point of view. There are things you could do right now, like changing radio-buttons to drop-down menu (an ususal Moodle practice is to use drop-down menu on forms, not radio-buttons), and there are things where thoughts are needed, like unit sharing between a questions.
          Hide
          Pierre Pichet added a comment -

          Your suggestion about drop-down vs radio button could be a good one.
          Let me experiment which could give the more convivial teacher editing interface.

          Sharing something between questions have been implemented in calculated because this is necessary for having the same numerical values and that there are already datasets shared at the category level.

          Calculated will be the only question type to share something between questions.
          Tim set this at least one year ago.

          When units are set correctly, the teacher can save as a new question.

          Show
          Pierre Pichet added a comment - Your suggestion about drop-down vs radio button could be a good one. Let me experiment which could give the more convivial teacher editing interface. Sharing something between questions have been implemented in calculated because this is necessary for having the same numerical values and that there are already datasets shared at the category level. Calculated will be the only question type to share something between questions. Tim set this at least one year ago. When units are set correctly, the teacher can save as a new question.
          Hide
          Pierre Pichet added a comment -

          Correction
          "Your suggestion about drop-down vs radio button IS a good one."
          At least for grading and right or left display.
          I have to figure how to set the others in relation to unit handling and grading.
          If the user does not want to use them, the actual convention is to let the field empty.
          So ideally there should be a an option to show or not all the unit handling interface. (or at least freeze the elements and the add unit button.)

          Show
          Pierre Pichet added a comment - Correction "Your suggestion about drop-down vs radio button IS a good one." At least for grading and right or left display. I have to figure how to set the others in relation to unit handling and grading. If the user does not want to use them, the actual convention is to let the field empty. So ideally there should be a an option to show or not all the unit handling interface. (or at least freeze the elements and the add unit button.)
          Hide
          Pierre Pichet added a comment -

          Oleg,
          One technical question:
          When you type enter on a moodle form , there is an automatic submit that use the first submit button find on the form i.e. the blanks for more choice.
          This is general to moodle form.
          Do you know how to stop this default handling .

          Show
          Pierre Pichet added a comment - Oleg, One technical question: When you type enter on a moodle form , there is an automatic submit that use the first submit button find on the form i.e. the blanks for more choice. This is general to moodle form. Do you know how to stop this default handling .
          Hide
          Tim Hunt added a comment -

          Pierre. That is a bug. (And one that annoys me.) We should either disable enter, or make it use the first real submit button. Anyway, this is a formslib bug. Not sure if there is a tracker issue for it or not.

          Show
          Tim Hunt added a comment - Pierre. That is a bug. (And one that annoys me.) We should either disable enter, or make it use the first real submit button. Anyway, this is a formslib bug. Not sure if there is a tracker issue for it or not.
          Hide
          Pierre Pichet added a comment -

          Created. MDL-20954

          Show
          Pierre Pichet added a comment - Created. MDL-20954
          Hide
          Pierre Pichet added a comment -

          The editing interface as been reordered.
          When the user choose to not display (and not use ) units, the elements related to unit grading and the blanks for more units are disabled.
          Ideally the editor should be in disable state but this is not possible with the actual code, I think.
          The same process occurs if the user choose to only display unit as text.
          The validate code remain to be done.

          Show
          Pierre Pichet added a comment - The editing interface as been reordered. When the user choose to not display (and not use ) units, the elements related to unit grading and the blanks for more units are disabled. Ideally the editor should be in disable state but this is not possible with the actual code, I think. The same process occurs if the user choose to only display unit as text. The validate code remain to be done.
          Pierre Pichet made changes -
          Attachment screenshot-8.jpg [ 19010 ]
          Hide
          Pierre Pichet added a comment -

          Following Oleg comments, I change the code so that the instructions fieldset is not shown if empty.
          I will try something about the valid numerical values table.

          Show
          Pierre Pichet added a comment - Following Oleg comments, I change the code so that the instructions fieldset is not shown if empty. I will try something about the valid numerical values table.
          Hide
          Pierre Pichet added a comment -

          instructions field set not shown if empty

          Show
          Pierre Pichet added a comment - instructions field set not shown if empty
          Pierre Pichet made changes -
          Attachment screenshot-9.jpg [ 19011 ]
          Hide
          Pierre Pichet added a comment -

          This seems better...

          Show
          Pierre Pichet added a comment - This seems better...
          Pierre Pichet made changes -
          Attachment screenshot-10.jpg [ 19012 ]
          Hide
          Oleg Sychev added a comment -

          Pierre, I stil coudn't see point in you passion for radio buttons. I didn't remember any other Moodle form that use them like you's. Look at a quiz form- it's all dropdown menus. They are taking less space and just as handy. Usual Moodle practice is: place a short strings in dropdown menus and long descriptions in relevant help files. The people will really need long descriptions only first time. So I suggest replacing old radios with dropdowns.

          I would also like to see a button in question settings to remove unit instructions control. Any additional HTML editor on a question editing screen is a pain.

          Show
          Oleg Sychev added a comment - Pierre, I stil coudn't see point in you passion for radio buttons. I didn't remember any other Moodle form that use them like you's. Look at a quiz form- it's all dropdown menus. They are taking less space and just as handy. Usual Moodle practice is: place a short strings in dropdown menus and long descriptions in relevant help files. The people will really need long descriptions only first time. So I suggest replacing old radios with dropdowns. I would also like to see a button in question settings to remove unit instructions control. Any additional HTML editor on a question editing screen is a pain.
          Hide
          Oleg Sychev added a comment -

          Screenshot 10 - if you like to add a box for an answer (what for?) it would probably better to place units inside it so they will be seen as a part of answer, not some random things outside. Also, I think that dropdown will be better there too, as it will get any unit nicely displayed right after the number and don't give any problems with general beauty of the question regardless of the number of units.

          Show
          Oleg Sychev added a comment - Screenshot 10 - if you like to add a box for an answer (what for?) it would probably better to place units inside it so they will be seen as a part of answer, not some random things outside. Also, I think that dropdown will be better there too, as it will get any unit nicely displayed right after the number and don't give any problems with general beauty of the question regardless of the number of units.
          Hide
          Pierre Pichet added a comment -

          My main concern was about the best way to order the different options about using units.
          Should they be shown by radio button or select is another choice.
          I cannot easily decide which is best although radio button appears to me as they show all the options, a better way for non expert.
          We should remeber that students can now create questions.

          As for the allowed number formats, I prefer an info button with a new window but I think that they cannot be allowed in quiz with strict control.
          For the instructions editor I could also use the hidden function build in the moodle form or another non submit button.
          Let's wait for other comments before going further.

          Form Validation and XML- import -export processes are higher on my to-do list.

          Show
          Pierre Pichet added a comment - My main concern was about the best way to order the different options about using units. Should they be shown by radio button or select is another choice. I cannot easily decide which is best although radio button appears to me as they show all the options, a better way for non expert. We should remeber that students can now create questions. As for the allowed number formats, I prefer an info button with a new window but I think that they cannot be allowed in quiz with strict control. For the instructions editor I could also use the hidden function build in the moodle form or another non submit button. Let's wait for other comments before going further. Form Validation and XML- import -export processes are higher on my to-do list.
          Hide
          Pierre Pichet added a comment -

          Next will be the docs...

          And remember that Tim is working hard on the question -engine...

          Show
          Pierre Pichet added a comment - Next will be the docs... And remember that Tim is working hard on the question -engine...
          Hide
          Pierre Pichet added a comment -

          People use numercial very often without any units .
          Although units should be seen when the user use the editing form for the first time, perhaps we should put all the unit stuff as advanced elements.
          Let's try it.

          Show
          Pierre Pichet added a comment - People use numercial very often without any units . Although units should be seen when the user use the editing form for the first time, perhaps we should put all the unit stuff as advanced elements. Let's try it.
          Hide
          Pierre Pichet added a comment -

          You can hide the editor for instructions by the advanced procedure but this does not change the loading time.
          However there are already at least 5 editors opened (question text, general feedback and the feedbacxk of the initiial 3 answers.
          Adding a 6th one does not change so much the time to open the form...

          Show
          Pierre Pichet added a comment - You can hide the editor for instructions by the advanced procedure but this does not change the loading time. However there are already at least 5 editors opened (question text, general feedback and the feedbacxk of the initiial 3 answers. Adding a 6th one does not change so much the time to open the form...
          Hide
          Oleg Sychev added a comment -

          "owever there are already at least 5 editors opened (question text, general feedback and the feedbacxk of the initiial 3 answers.
          Adding a 6th one does not change so much the time to open the form..." - on my modified (2 strings actually Moodle it is 2 editors versus 3.
          And even 5 versus 6 matters, more scrolling, more time to load and more memory eated up. 2 editors on page are Ok in every browser, 3 is worse, 5 is quite bad...

          Show
          Oleg Sychev added a comment - "owever there are already at least 5 editors opened (question text, general feedback and the feedbacxk of the initiial 3 answers. Adding a 6th one does not change so much the time to open the form..." - on my modified (2 strings actually Moodle it is 2 editors versus 3. And even 5 versus 6 matters, more scrolling, more time to load and more memory eated up. 2 editors on page are Ok in every browser, 3 is worse, 5 is quite bad...
          Hide
          Pierre Pichet added a comment -

          The valid formats could use the title property of an image.
          This need using the mouse to see it .
          However the alt text should be set to the same content.(for disabled using screen reader)
          If we use this option, on evidence, the complete Valid number formats fieldset seen in this image will not be shown anymore.

          Show
          Pierre Pichet added a comment - The valid formats could use the title property of an image. This need using the mouse to see it . However the alt text should be set to the same content.(for disabled using screen reader) If we use this option, on evidence, the complete Valid number formats fieldset seen in this image will not be shown anymore.
          Pierre Pichet made changes -
          Attachment screenshot-11.jpg [ 19023 ]
          Hide
          Oleg Sychev added a comment -

          Pierre loves boxes Input controls are 3-4 times longer than in 1.9

          Screnshot-10: Isn't simple
          Number: _______
          better than you's
          Number
          ________

          I find 3 boxes about valid number formats: one clearly visible and two less visible (but still taking space). What's for?

          Screenshot-11: Are number and unit so different that they should be placed in separate boxes? Hmm... this is somewhar difficult ... I guess that in that case there should be still one input for both number and unit, bit valid number formats should show format with unit, e.g. 12.4 km
          "valid number formats" appears twice and there are many boxes.

          My suggestion
          Number and unit __________________
          Where valid number format should be showed as floating tooltips when mouse is over or input field.

          Show
          Oleg Sychev added a comment - Pierre loves boxes Input controls are 3-4 times longer than in 1.9 Screnshot-10: Isn't simple Number: _______ better than you's Number ________ I find 3 boxes about valid number formats: one clearly visible and two less visible (but still taking space). What's for? Screenshot-11: Are number and unit so different that they should be placed in separate boxes? Hmm... this is somewhar difficult ... I guess that in that case there should be still one input for both number and unit, bit valid number formats should show format with unit, e.g. 12.4 km "valid number formats" appears twice and there are many boxes. My suggestion Number and unit __________________ Where valid number format should be showed as floating tooltips when mouse is over or input field.
          Hide
          Pierre Pichet added a comment -

          fig 10 and 11 are just to illustrate the problem of how and where to put the info about valid number formats.
          They are not in the actual code and I am waiting for Tim new engine code.
          look at http://moodle.org/mod/forum/discuss.php?d=139409 for more discussion.

          Show
          Pierre Pichet added a comment - fig 10 and 11 are just to illustrate the problem of how and where to put the info about valid number formats. They are not in the actual code and I am waiting for Tim new engine code. look at http://moodle.org/mod/forum/discuss.php?d=139409 for more discussion.
          Hide
          Pierre Pichet added a comment -

          The number and unit title are a legend field of the fieldset containing the respective input element.

          Using fieldset is the best way to relate correctly the input element to the type of value to enter.

          Strong visual relation between the input field and the type of input is necessary because units can be also before the number as in currency $ 1000.00

          Show
          Pierre Pichet added a comment - The number and unit title are a legend field of the fieldset containing the respective input element. Using fieldset is the best way to relate correctly the input element to the type of value to enter. Strong visual relation between the input field and the type of input is necessary because units can be also before the number as in currency $ 1000.00
          Hide
          Oleg Sychev added a comment -

          "Using fieldset is the best way to relate correctly the input element to the type of value to enter."
          Pierre,try looking at any moodle form(quiz mod form for instance). Usual way of relating input element with type of value is a label before field. Fieldset is supposed to be used to group several input controls together.

          "Strong visual relation between the input field and the type of input is necessary because units can be also before the number as in currency $ 1000.00" - that's the case where valid number formats becomes actually useful. You could enter number and unit in one control and show the way unit should be entered in valid formats (changing it according with teacher settings).

          Actually I couldn't understand what fuss is about at all, since program could easily analyse student answer and distinguish unit from number regardless of it's place. That's no problem at all. Why confuse user with fields and instructions? Student is supposed to concenrate on a question and his calculations during quiz instead of thinking hard about format to enter his anwer.

          Show
          Oleg Sychev added a comment - "Using fieldset is the best way to relate correctly the input element to the type of value to enter." Pierre,try looking at any moodle form(quiz mod form for instance). Usual way of relating input element with type of value is a label before field. Fieldset is supposed to be used to group several input controls together. "Strong visual relation between the input field and the type of input is necessary because units can be also before the number as in currency $ 1000.00" - that's the case where valid number formats becomes actually useful. You could enter number and unit in one control and show the way unit should be entered in valid formats (changing it according with teacher settings). Actually I couldn't understand what fuss is about at all, since program could easily analyse student answer and distinguish unit from number regardless of it's place. That's no problem at all. Why confuse user with fields and instructions? Student is supposed to concenrate on a question and his calculations during quiz instead of thinking hard about format to enter his anwer.
          Hide
          Pierre Pichet added a comment -

          Quiz work with more specific standards that Tim will probably set more definitively for the new question engine.

          see http://moodle.org/mod/forum/discuss.php?d=136346

          Show
          Pierre Pichet added a comment - Quiz work with more specific standards that Tim will probably set more definitively for the new question engine. see http://moodle.org/mod/forum/discuss.php?d=136346
          Hide
          Pierre Pichet added a comment -

          last proposal

          Show
          Pierre Pichet added a comment - last proposal
          Pierre Pichet made changes -
          Attachment screenshot-12.jpg [ 20033 ]
          Hide
          Oleg Sychev added a comment -

          I still don't understand why instructions couldn't be entered in the question text and why they need a separate editor. (this editor takes more than half of space for unit handling editing). Maybe one-two senteces in question text help will be more effective...

          Otherwise interface look much better. Except that I couldn't understand, how user will choose will unit be graded or not...

          Show
          Oleg Sychev added a comment - I still don't understand why instructions couldn't be entered in the question text and why they need a separate editor. (this editor takes more than half of space for unit handling editing). Maybe one-two senteces in question text help will be more effective... Otherwise interface look much better. Except that I couldn't understand, how user will choose will unit be graded or not...
          Hide
          Pierre Pichet added a comment -

          "Except that I couldn't understand, how user will choose will unit be graded or not..."
          In one of my version I add a supplementary radio element which in reality is not used unless I add some supplementary code when saving the question options.
          The various options from the actual radio buttons are all controlled by a single variable showunits( value 0,1,2,3) which is set by the actual radio buttons.

          I will try again using supplementary code when saving options.

          "why they need a separate editor"

          As I explain upwards, the instructions will a least contains a list of valid numbers but could contains more than this as complex unit rendering (i.e. chemical cinetics) summary to the unit multiple choices.
          My proposal is that these infos should be clearly near the input elements like the Choose one answer. in multiple choice.

          Let's add it first as it can be useful and see the users feedback.

          About space argument in the edit_question_form, I try to hide it with the advance feature but could not change the advance feature name to Intructions.

          This will have to be discussed again in the new question engine.

          Show
          Pierre Pichet added a comment - "Except that I couldn't understand, how user will choose will unit be graded or not..." In one of my version I add a supplementary radio element which in reality is not used unless I add some supplementary code when saving the question options. The various options from the actual radio buttons are all controlled by a single variable showunits( value 0,1,2,3) which is set by the actual radio buttons. I will try again using supplementary code when saving options. "why they need a separate editor" As I explain upwards, the instructions will a least contains a list of valid numbers but could contains more than this as complex unit rendering (i.e. chemical cinetics) summary to the unit multiple choices. My proposal is that these infos should be clearly near the input elements like the Choose one answer. in multiple choice. Let's add it first as it can be useful and see the users feedback. About space argument in the edit_question_form, I try to hide it with the advance feature but could not change the advance feature name to Intructions. This will have to be discussed again in the new question engine.
          Hide
          Oleg Sychev added a comment -

          About instruction's editor - you could do better and make a settings for numerical/calculate questions like "Use instructions editor" - AFAIK question types have it's own administration and settings pages in Moodle 2.0. This would be site-wide which isn't perfect, but at least it better than having it moodle-wide.

          P.S. Continuing to wonder, why end of the question text isn't near the imput elements. Just on top if it...

          Show
          Oleg Sychev added a comment - About instruction's editor - you could do better and make a settings for numerical/calculate questions like "Use instructions editor" - AFAIK question types have it's own administration and settings pages in Moodle 2.0. This would be site-wide which isn't perfect, but at least it better than having it moodle-wide. P.S. Continuing to wonder, why end of the question text isn't near the imput elements. Just on top if it...
          Hide
          Pierre Pichet added a comment -

          settings for numerical/calculate questions like "Use instructions editor" -

          Thanks for the suggestion.
          There is already a problem of how to set internationalisation for real number representation.

          "why end of the question text isn't near the imput elements.Just on top if it..."
          To help students (pecurliarly those with access problems) to clearly identify where to put the aswer.
          This explains the additional instructions like Choose one answer.
          see
          http://docs.moodle.org/en/Development:Question_Engine_2:Overview

          Show
          Pierre Pichet added a comment - settings for numerical/calculate questions like "Use instructions editor" - Thanks for the suggestion. There is already a problem of how to set internationalisation for real number representation. "why end of the question text isn't near the imput elements.Just on top if it..." To help students (pecurliarly those with access problems) to clearly identify where to put the aswer. This explains the additional instructions like Choose one answer. see http://docs.moodle.org/en/Development:Question_Engine_2:Overview
          Hide
          Pierre Pichet added a comment -

          Here (screenshot-13) what could be an almost final display
          Here the UNIt is not graded and not displayed so other fields are disabled.
          TODO: Validation process and save_question_options modifications

          Show
          Pierre Pichet added a comment - Here (screenshot-13) what could be an almost final display Here the UNIt is not graded and not displayed so other fields are disabled. TODO: Validation process and save_question_options modifications
          Pierre Pichet made changes -
          Attachment screenshot-13.jpg [ 20038 ]
          Hide
          Pierre Pichet added a comment -

          Rebuild the grading and rendering code so it is independent from shortanswer.
          Code * answer following historical behaviour.
          The grading search for each combination of the number response and the units that can satisfy the answer tolerance for each answer in their normal order .
          If succes then compare the unit used for the test with the unit set in the response.
          If different apply the unit penalty.
          For old questions the unitpenalty is equal to the grade given to the numerical part so the final grade is 0 as grade in 1.9 and preceeding versions.

          and testing continue ( 4 question types numerical, calculated, calculated simple, and the many combinaitions of numerical -units) .
          There is also calculated multi and the synchronization with calculated ...

          Show
          Pierre Pichet added a comment - Rebuild the grading and rendering code so it is independent from shortanswer. Code * answer following historical behaviour. The grading search for each combination of the number response and the units that can satisfy the answer tolerance for each answer in their normal order . If succes then compare the unit used for the test with the unit set in the response. If different apply the unit penalty. For old questions the unitpenalty is equal to the grade given to the numerical part so the final grade is 0 as grade in 1.9 and preceeding versions. and testing continue ( 4 question types numerical, calculated, calculated simple, and the many combinaitions of numerical -units) . There is also calculated multi and the synchronization with calculated ...
          Hide
          Pierre Pichet added a comment -

          In order to show to the student what amount of the marks is related to a bad unit (raw_unitpenalty) the following process is used.

          The raw_unitpenalty is evaluated in the numerical print_question_formulation_and_controls() and store as $state->options->raw_unitpenalty.

          In shortanswer print_question_grading_details(), $state->options->raw_unitpenalty is used to display the value.

                          print_string('gradingdetails', 'quiz', $grade) ;
                          // A unit penalty for numerical was applied so display it
                          if(isset($state->options->raw_unitpenalty) && $state->options->raw_unitpenalty > 0.0 ){
                              echo ' ';
                              print_string('unitappliedpenalty','qtype_numerical',question_format_grade($cmoptions, $state->options->raw_unitpenalty )); 
                          } 
          
          

          This will appears as

          Marks for this submission: 0.80/1.00. These marks include a penalty of 0.20 for bad unit.

          Doing this in shortanswer print_question_grading_details() is clearly a temporary hack until the new question engine and appears better than to copy all the print_question_grading_details() in numerical/questiontype.php.

          0 the is modified by a hack that do the job until the new question engine.
          The raw_unitpenalty is evaluated in the numerical print_question_formulation_and_controls() and store as $state->options->raw_unitpenalty

          Show
          Pierre Pichet added a comment - In order to show to the student what amount of the marks is related to a bad unit (raw_unitpenalty) the following process is used. The raw_unitpenalty is evaluated in the numerical print_question_formulation_and_controls() and store as $state->options->raw_unitpenalty. In shortanswer print_question_grading_details(), $state->options->raw_unitpenalty is used to display the value. print_string('gradingdetails', 'quiz', $grade) ; // A unit penalty for numerical was applied so display it if (isset($state->options->raw_unitpenalty) && $state->options->raw_unitpenalty > 0.0 ){ echo ' '; print_string('unitappliedpenalty','qtype_numerical',question_format_grade($cmoptions, $state->options->raw_unitpenalty )); } This will appears as Marks for this submission: 0.80/1.00. These marks include a penalty of 0.20 for bad unit. Doing this in shortanswer print_question_grading_details() is clearly a temporary hack until the new question engine and appears better than to copy all the print_question_grading_details() in numerical/questiontype.php. 0 the is modified by a hack that do the job until the new question engine. The raw_unitpenalty is evaluated in the numerical print_question_formulation_and_controls() and store as $state->options->raw_unitpenalty
          Hide
          Oleg Sychev added a comment -

          Pierre, I am thinking about school teacher trying to teach arithmetics using numerical question - the kids sure would ask quesitons about weird 'E' things in "Valid input formats", how should he answer them?

          I.e. this string about valid format isn't always useful, since not all people use Moodle to teach chemistry in the university. At least the question author should have options to switch it off.
          Even better, you could add
          Valid formats: _______
          to the question editing where any teacher could enter examples he find useful for his purposes, which may defaults to you string (or anything site admin would found useful) and if it is empty than no format help would be shown at all.

          Or -maybe better - make a string with valid formats default value for "instruction" field, so the teacher could decide to clear it, or edit it, or leave as it is. Then no new controls would be introduced on already complex form...

          Show
          Oleg Sychev added a comment - Pierre, I am thinking about school teacher trying to teach arithmetics using numerical question - the kids sure would ask quesitons about weird 'E' things in "Valid input formats", how should he answer them? I.e. this string about valid format isn't always useful, since not all people use Moodle to teach chemistry in the university. At least the question author should have options to switch it off. Even better, you could add Valid formats: _______ to the question editing where any teacher could enter examples he find useful for his purposes, which may defaults to you string (or anything site admin would found useful) and if it is empty than no format help would be shown at all. Or -maybe better - make a string with valid formats default value for "instruction" field, so the teacher could decide to clear it, or edit it, or leave as it is. Then no new controls would be introduced on already complex form...
          Hide
          Pierre Pichet added a comment -

          Thanks for your comments.
          The valid formats could change as internationalization was recently added to PHP Moodle feature and Tim new question engine (2,1) use it.
          Should I in 2,0 either add this internationalization as mandatory or not ?

          I have added quite a lot of new reatures in handling units and numerical values, few real users have the opportunity to give feedback.
          Let's them play with 2,0 to see how they react.

          Your suggestion of " make a string with valid formats default value for "instruction" field, so the teacher could decide to clear it, or edit it, or leave as it is" appears interesting.

          Let.s clean the code first...(i.e. moodleform )

          Show
          Pierre Pichet added a comment - Thanks for your comments. The valid formats could change as internationalization was recently added to PHP Moodle feature and Tim new question engine (2,1) use it. Should I in 2,0 either add this internationalization as mandatory or not ? I have added quite a lot of new reatures in handling units and numerical values, few real users have the opportunity to give feedback. Let's them play with 2,0 to see how they react. Your suggestion of " make a string with valid formats default value for "instruction" field, so the teacher could decide to clear it, or edit it, or leave as it is" appears interesting. Let.s clean the code first...(i.e. moodleform )
          Hide
          Oleg Sychev added a comment -

          Pierre
          I don't understand about internationalisation, it was there for quite a time, but anyway it is site-wide, not question-wide. Any interface strings should be internationalised by default - it is in Coding Guidelines.

          "Let's them play with 2,0 to see how they react." - this is somewhat scaring... Moodle is a tool for work (and often mass work: many students, many questions) and can cause major problems when unconvenient. A game you can't refuse to play isn't fun at all.

          If you really want to let users play with it, you should give them a choice - i.e. the ability to switch off these new features (preferable one by one). Then you could see how many will like them (I could turn them off in code, but many people can't). If they will be forced to use them, that's not fair play and it may cause some anger and frustration.

          This and similar features are things that make my choice about when we should upgrade to 2.0 quite difficult. I am looking for site-wide groups long ago, it's a big win - but many user interface issues are working against it as they harm teaching/authoring, which takes up most of the time working with Moodle.

          Show
          Oleg Sychev added a comment - Pierre I don't understand about internationalisation, it was there for quite a time, but anyway it is site-wide, not question-wide. Any interface strings should be internationalised by default - it is in Coding Guidelines. "Let's them play with 2,0 to see how they react." - this is somewhat scaring... Moodle is a tool for work (and often mass work: many students, many questions) and can cause major problems when unconvenient. A game you can't refuse to play isn't fun at all. If you really want to let users play with it, you should give them a choice - i.e. the ability to switch off these new features (preferable one by one). Then you could see how many will like them (I could turn them off in code, but many people can't). If they will be forced to use them, that's not fair play and it may cause some anger and frustration. This and similar features are things that make my choice about when we should upgrade to 2.0 quite difficult. I am looking for site-wide groups long ago, it's a big win - but many user interface issues are working against it as they harm teaching/authoring, which takes up most of the time working with Moodle.
          Hide
          Pierre Pichet added a comment -

          internationalisation is a new requirement when you update for new Moodle HEAD versions.
          It was not mandatory last week.
          Tim has already change the code in new question engine numerical question to handle this which means that valid numerical formats will adapt to the language settings .
          This could be set as another system wide parameter
          I have to understand well on how or if I will do it for 2,0.

          My experience with real students is that they are confused by this 1,00E-04 way to used exponents as there manuals or spreadsheet use 1,10*10^-4^

          Given this, the valid numerical formats when answering on Moodle should always be displayed but there are users that want to control everything on Moodle so there should a way to switch it on-off (at course-level, system wide level ?).

          There will be a +- 6 months testing period of 2,0 so that we can have ( or expect) feedback from users so we can offer the most popular way to do this.

          Show
          Pierre Pichet added a comment - internationalisation is a new requirement when you update for new Moodle HEAD versions. It was not mandatory last week. Tim has already change the code in new question engine numerical question to handle this which means that valid numerical formats will adapt to the language settings . This could be set as another system wide parameter I have to understand well on how or if I will do it for 2,0. My experience with real students is that they are confused by this 1,00E-04 way to used exponents as there manuals or spreadsheet use 1,10*10^-4^ Given this, the valid numerical formats when answering on Moodle should always be displayed but there are users that want to control everything on Moodle so there should a way to switch it on-off (at course-level, system wide level ?). There will be a +- 6 months testing period of 2,0 so that we can have ( or expect) feedback from users so we can offer the most popular way to do this.
          Hide
          Pierre Pichet added a comment -

          "This and similar features are things that make my choice about when we should upgrade to 2.0 quite difficult."

          Given the amount of modifications in 2,0 , we have similar concerns at institutional level...

          Show
          Pierre Pichet added a comment - "This and similar features are things that make my choice about when we should upgrade to 2.0 quite difficult." Given the amount of modifications in 2,0 , we have similar concerns at institutional level...
          Hide
          Oleg Sychev added a comment -

          Ah, you mean locale-awareness for the number processing by internationalisation. Now I understand.

          Pierre, you wrote
          "My experience with real students is ... Given this, the valid numerical formats when answering on Moodle should always be displayed but there are users that want to control everything on Moodle"

          This "always" indicates that you still have troubles with understanding that you are not the only one using Moodle and there are contexts different than high-school chemistry. I already told you example with kids learning arithmetics (I really know an organisation using Moodle to teach disabled children). This exponential notation gives them nothing but confusion.

          "Given the amount of modifications in 2,0 , we have similar concerns" - the amount of modifications is scary, but the hastiness in which release is prepared to have it at last (leaving many needed fixes to later versions) is even more scary...

          P.S. BTW, if you are so want to help you students, did you consider breaking down input fields like:
          _____ *10^ ____
          instead of teaching them computer exponential notation?

          Show
          Oleg Sychev added a comment - Ah, you mean locale-awareness for the number processing by internationalisation. Now I understand. Pierre, you wrote "My experience with real students is ... Given this, the valid numerical formats when answering on Moodle should always be displayed but there are users that want to control everything on Moodle" This "always" indicates that you still have troubles with understanding that you are not the only one using Moodle and there are contexts different than high-school chemistry. I already told you example with kids learning arithmetics (I really know an organisation using Moodle to teach disabled children). This exponential notation gives them nothing but confusion. "Given the amount of modifications in 2,0 , we have similar concerns" - the amount of modifications is scary, but the hastiness in which release is prepared to have it at last (leaving many needed fixes to later versions) is even more scary... P.S. BTW, if you are so want to help you students, did you consider breaking down input fields like: _____ *10^ ____ instead of teaching them computer exponential notation?
          Hide
          Pierre Pichet added a comment -

          Given the delays, I am setting 2,0 as it is and working to test if everything is OK .
          The notice about valid numbers in Moodle questions should remain for "ethical reasons" vs the students until we can give Moodle numerical response all the necessary flexibility without rendering old questions obsolete.

          I have introduce new flexibility in 2,0 for numerical questions and this add complexity to the interface.
          We have to trade between flexibilty and interface complexity.
          Users feedback will be useful to guide further improvements.
          This was the main reason for introducing the "simplified" calculated question.

          Other aspects will wait for the new engine code i.e 2,1.

          Show
          Pierre Pichet added a comment - Given the delays, I am setting 2,0 as it is and working to test if everything is OK . The notice about valid numbers in Moodle questions should remain for "ethical reasons" vs the students until we can give Moodle numerical response all the necessary flexibility without rendering old questions obsolete. I have introduce new flexibility in 2,0 for numerical questions and this add complexity to the interface. We have to trade between flexibilty and interface complexity. Users feedback will be useful to guide further improvements. This was the main reason for introducing the "simplified" calculated question. Other aspects will wait for the new engine code i.e 2,1.
          Hide
          Oleg Sychev added a comment -

          I have nothing against flexibility. But do you really call "should always be displayed" a flexibility? Give it any way of disappearing, and I'm OK with it.

          Really there are two things that should be taken into account:
          1. Making valid formats string a default value for instructions field is much easier than what you done, just one string in the code. I don't think it will delay 2.0 release
          2. Did you really think that "valid formats" string is useful without further teacher explanation? I quite doubt it is, unless students are programmers who know E-notation well and just need to reference details. You should place more solid instructions somewhere.

          By the way, I think blocks now could be shown on the quiz attempt page. Why not use simple block with text - general instructions for numerical question? It solves anything:
          (1) Teacher could decide whether to use that block or not (or, maybe, edit text)
          (2) It won't be duplicated on every question like you string.
          (3) It make interface more slim and nice.
          (4) You could place more text than just list of acceptable numbers on the block

          You could even not write any code at all, using an instance of existing HTML block with "valid formats" text and place some instructions on setting it up in the numerical question help.
          What do you say on this?

          P.S. It is really scary to have someone shaping Moodle core to his particular course needs...

          Show
          Oleg Sychev added a comment - I have nothing against flexibility. But do you really call "should always be displayed" a flexibility? Give it any way of disappearing, and I'm OK with it. Really there are two things that should be taken into account: 1. Making valid formats string a default value for instructions field is much easier than what you done, just one string in the code. I don't think it will delay 2.0 release 2. Did you really think that "valid formats" string is useful without further teacher explanation? I quite doubt it is, unless students are programmers who know E-notation well and just need to reference details. You should place more solid instructions somewhere. By the way, I think blocks now could be shown on the quiz attempt page. Why not use simple block with text - general instructions for numerical question? It solves anything: (1) Teacher could decide whether to use that block or not (or, maybe, edit text) (2) It won't be duplicated on every question like you string. (3) It make interface more slim and nice. (4) You could place more text than just list of acceptable numbers on the block You could even not write any code at all, using an instance of existing HTML block with "valid formats" text and place some instructions on setting it up in the numerical question help. What do you say on this? P.S. It is really scary to have someone shaping Moodle core to his particular course needs...
          Hide
          Pierre Pichet added a comment -

          We are not talking about the same time scale...
          On short time scale (next month) I just want to fix what is not working correctly and among other things moving calculated category datasets.

          I am not against giving opportunity to modify the valid formats, I am not sure what they will be in Moodle 2.0.. which is nearer than 2.1 ...

          This is part of my todo list but not on the top...

          I don't think that moodle 2,0 will be sufficiently stable for production before the next 6 months so we will have time to set this properly.

          Show
          Pierre Pichet added a comment - We are not talking about the same time scale... On short time scale (next month) I just want to fix what is not working correctly and among other things moving calculated category datasets. I am not against giving opportunity to modify the valid formats, I am not sure what they will be in Moodle 2.0.. which is nearer than 2.1 ... This is part of my todo list but not on the top... I don't think that moodle 2,0 will be sufficiently stable for production before the next 6 months so we will have time to set this properly.
          Hide
          Pierre Pichet added a comment -

          The format info has been moved to a help icon and the text identify the exponent form.
          notice also the that instruction field is not shown empty.

          Show
          Pierre Pichet added a comment - The format info has been moved to a help icon and the text identify the exponent form. notice also the that instruction field is not shown empty.
          Pierre Pichet made changes -
          Attachment screenshot-14.jpg [ 21754 ]
          Hide
          Pierre Pichet added a comment - - edited

          showing instructions (screenshot 15).
          So OIleg are you happy with this solution ? (not CVS now )

          Show
          Pierre Pichet added a comment - - edited showing instructions (screenshot 15). So OIleg are you happy with this solution ? (not CVS now )
          Pierre Pichet made changes -
          Attachment screenshot-15.jpg [ 21755 ]
          Pierre Pichet made changes -
          Attachment screenshot-2.jpg [ 18391 ]
          Pierre Pichet made changes -
          Attachment screenshot-4.jpg [ 18434 ]
          Pierre Pichet made changes -
          Link This issue will be resolved by MDL-24503 [ MDL-24503 ]
          Hide
          Oleg Sychev added a comment -

          If Tim allows help icons in the quiz attempt page, than I'm totally happy with this solution.

          Thought I think that to achieve you goals better you could write some explanation comparing with usual math notation, something like
          1.4E-5 = 1,5*10 5

          Show
          Oleg Sychev added a comment - If Tim allows help icons in the quiz attempt page, than I'm totally happy with this solution. Thought I think that to achieve you goals better you could write some explanation comparing with usual math notation, something like 1.4E-5 = 1,5*10 5
          Hide
          Pierre Pichet added a comment -

          Here the comment of Tim (MDL-24503):

          You can use a help icon to display the valid formats. In Moodle 2.0, help icons do not use pop-up windows, the use JavaScript, and that will work in the secure window.

          "with usual math notation, something like
          1.4E-5 = 1,5*10 5"

          I worry about writing any non valid number in a help about valid number formats with the other constraint of the shortest text possible in help pop-up.

          Those using exponential form on computer have normally use the 1..E notation as this is the standard on spreadsheet like Excel

          "Excel affiche les nombres comme des entiers (par exemple 789), des fractions décimales (7,89) ou en utilisant la notation scientifique (7,89E+08) si le nombre est plus long que la cellule. "From Excel Help

          Show
          Pierre Pichet added a comment - Here the comment of Tim ( MDL-24503 ): You can use a help icon to display the valid formats. In Moodle 2.0, help icons do not use pop-up windows, the use JavaScript, and that will work in the secure window. "with usual math notation, something like 1.4E-5 = 1,5*10 5" I worry about writing any non valid number in a help about valid number formats with the other constraint of the shortest text possible in help pop-up. Those using exponential form on computer have normally use the 1..E notation as this is the standard on spreadsheet like Excel "Excel affiche les nombres comme des entiers (par exemple 789), des fractions décimales (7,89) ou en utilisant la notation scientifique (7,89E+08) si le nombre est plus long que la cellule. "From Excel Help
          Hide
          Oleg Sychev added a comment -

          "I worry about writing any non valid number in a help about valid number formats" - that's actually you problem, but if I tried to write such help I would try to create some sort of correspondence table: math notation and question notation. That shoudn't be necessary HTML table, but should contain pairs in some way.

          Otherwise teacher's intervention may be still needed, and that's not a thing average teacher like to do with every student in a class.

          Show
          Oleg Sychev added a comment - "I worry about writing any non valid number in a help about valid number formats" - that's actually you problem, but if I tried to write such help I would try to create some sort of correspondence table: math notation and question notation. That shoudn't be necessary HTML table, but should contain pairs in some way. Otherwise teacher's intervention may be still needed, and that's not a thing average teacher like to do with every student in a class.
          Hide
          Ray Lawrence added a comment -

          I've not followed this issue in detail but the following caught my eye:

          "I don't think that moodle 2,0 will be sufficiently stable for production before the next 6 months so we will have time to set this properly."

          Yes, but it needs to be stabilised very soon so that we can set about proper testing on a defined and fixed feature set.

          Show
          Ray Lawrence added a comment - I've not followed this issue in detail but the following caught my eye: "I don't think that moodle 2,0 will be sufficiently stable for production before the next 6 months so we will have time to set this properly." Yes, but it needs to be stabilised very soon so that we can set about proper testing on a defined and fixed feature set.
          Hide
          Pierre Pichet added a comment -

          Ray,
          Dont worry, this comment just reflect a very specific detail about numerical formats.
          Should we get internationalisation or not in 2,0 or 2,1 and how will it be implemented ?
          The actual numerical formats implementation in 2,0 is similar to 1,9+. and apparently will not change as the more I learn on it, the more I am convinced that it should be solved in the new question engine i.e. 2,1 .

          I had to review the grading code to assure that the old versions 1,9 grades remained true (see MDL-24503) and this was solved in the wek-end.

          So actually the numerical unit grading seems to work correctly as far as I have test it on my moodle installation and on Moodle QA Testing Site (http://qa.moodle.net/login/index.php).

          Oleg comments have been very useful but few other peoples have tested these specialized options.

          Personally I prefer to let it open with the actual setting of minor bug and creating new bugs only if the changes are major which was the case of MDL-24503 .

          But perhaps it is time to set this bug as resolved for 2.0 and let create other bugs to solve the various details about the options I have set (i.e. help, feedback strings etc.).

          Show
          Pierre Pichet added a comment - Ray, Dont worry, this comment just reflect a very specific detail about numerical formats. Should we get internationalisation or not in 2,0 or 2,1 and how will it be implemented ? The actual numerical formats implementation in 2,0 is similar to 1,9+. and apparently will not change as the more I learn on it, the more I am convinced that it should be solved in the new question engine i.e. 2,1 . I had to review the grading code to assure that the old versions 1,9 grades remained true (see MDL-24503 ) and this was solved in the wek-end. So actually the numerical unit grading seems to work correctly as far as I have test it on my moodle installation and on Moodle QA Testing Site ( http://qa.moodle.net/login/index.php ). Oleg comments have been very useful but few other peoples have tested these specialized options. Personally I prefer to let it open with the actual setting of minor bug and creating new bugs only if the changes are major which was the case of MDL-24503 . But perhaps it is time to set this bug as resolved for 2.0 and let create other bugs to solve the various details about the options I have set (i.e. help, feedback strings etc.).
          Tim Hunt made changes -
          Link This issue is duplicated by MDL-25087 [ MDL-25087 ]
          Hide
          Pierre Pichet added a comment -

          Time to set it as resolved after testing many combinations of parameters.

          Show
          Pierre Pichet added a comment - Time to set it as resolved after testing many combinations of parameters.
          Pierre Pichet made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Martin Dougiamas made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          QA Assignee nobody
          Martin Dougiamas made changes -
          Workflow jira [ 33376 ] MDL Workflow [ 63097 ]
          Martin Dougiamas made changes -
          Workflow MDL Workflow [ 63097 ] MDL Full Workflow [ 92321 ]

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: