Moodle

Allow CLOZE answers to suppressing surrounding spaces

Details

  • Type: Improvement Improvement
  • Status: Development in progress Development in progress
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8.4, 1.9, 2.0
  • Fix Version/s: None
  • Component/s: Questions
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Currently each question answer area in a cloze type question is separated by one space on either side when the question is rendered. A common use for this type of question (in systems other than Moodle) is to complete words (e.g., adjectival endings). The space here is not appropriate and detracts from the question being asked.

It would be great to be able to suppress the space, possible with an addition formatting character indicating this.

Issue Links

Activity

Hide
Pierre Pichet added a comment -

As i am working on variable size input text MDL-3274 I will work on this.
However Howard what is an addition formatting character indicating this?

Show
Pierre Pichet added a comment - As i am working on variable size input text MDL-3274 I will work on this. However Howard what is an addition formatting character indicating this?
Hide
Howard Miller added a comment -

That's fantastic Pierre - one less job

I don't care particularly. What about an underscore?

Show
Howard Miller added a comment - That's fantastic Pierre - one less job I don't care particularly. What about an underscore?
Hide
Pierre Pichet added a comment -

howard
there was a space (line 348 of multianswer/questiontype.php) before the input field.
echo " <input $style $readonly $popup name=\"$inputname\"";

So I remove it and effectively in FF there is no space beween the input HTML element and the question text.
echo "<input $style $readonly $popup name=\"$inputname\"";

However as cloze is used sometimes to ask for a punctiation mark, we should not add anything.

Do you agree?

Show
Pierre Pichet added a comment - howard there was a space (line 348 of multianswer/questiontype.php) before the input field. echo " <input $style $readonly $popup name=\"$inputname\""; So I remove it and effectively in FF there is no space beween the input HTML element and the question text. echo "<input $style $readonly $popup name=\"$inputname\""; However as cloze is used sometimes to ask for a punctiation mark, we should not add anything. Do you agree?
Hide
Pierre Pichet added a comment -

this is related to minimum size of cloze question display as asked by teachers who use this question type in language quizzes

Show
Pierre Pichet added a comment - this is related to minimum size of cloze question display as asked by teachers who use this question type in language quizzes
Hide
Howard Miller added a comment -

Pierre,

I'm sorry, I don't understand. What is FF? It's actually short-answer (type in the text) question types that I'm particularly bothered about.

Show
Howard Miller added a comment - Pierre, I'm sorry, I don't understand. What is FF? It's actually short-answer (type in the text) question types that I'm particularly bothered about.
Hide
Pierre Pichet added a comment -

Sorry Howard,
I just want to explain that I have tested if this space change the display because some time in HTML ordinary space characters are not render by the browser so FF means Firefox...

Show
Pierre Pichet added a comment - Sorry Howard, I just want to explain that I have tested if this space change the display because some time in HTML ordinary space characters are not render by the browser so FF means Firefox...
Hide
Howard Miller added a comment -

Ahhh..... Firefox, obviously

So what was the question?

Show
Howard Miller added a comment - Ahhh..... Firefox, obviously So what was the question?
Hide
Pierre Pichet added a comment -

I propose to fix this by removing the space
echo "<input $style $readonly $popup name=\"$inputname\"";
without adding anything else.
do you agree?

Show
Pierre Pichet added a comment - I propose to fix this by removing the space echo "<input $style $readonly $popup name=\"$inputname\""; without adding anything else. do you agree?
Hide
Pierre Pichet added a comment -

exemple with space removed

Show
Pierre Pichet added a comment - exemple with space removed
Hide
Pierre Pichet added a comment -

look in the sapce_cloze.jpg image after : deal with this short answer

Show
Pierre Pichet added a comment - look in the sapce_cloze.jpg image after : deal with this short answer
Hide
Howard Miller added a comment -

That's easy but might it not upset all the people who expect a space to be there?

Show
Howard Miller added a comment - That's easy but might it not upset all the people who expect a space to be there?
Hide
Pierre Pichet added a comment -

Removing the space before the input HTML element is good for peoples (like you) who want that the answer is inline with the text as the case of single punctuation character.
Effectively this gives a special display if the answer is a word.
This is quite similar to the variable HTML input element length . (MDL-3274)
I could use a similar code to add or not the space if the length == 1 but even then it could not work in all languages...

I cannot add another field to fill when editing because there is no provision for this in cloze syntax.

I think that the best way to do it is to withdraw the space and let the authors (teachers) add it if they want so.

This could change the display of actual questions but does not add more difficulty to the students as the input box is clearly defined.
Although some can argue that some students will want to add a space in their responses. In this case the manual grading can be used .

I propose to withdraw the space.

Help file should clearly specify this.

Show
Pierre Pichet added a comment - Removing the space before the input HTML element is good for peoples (like you) who want that the answer is inline with the text as the case of single punctuation character. Effectively this gives a special display if the answer is a word. This is quite similar to the variable HTML input element length . (MDL-3274) I could use a similar code to add or not the space if the length == 1 but even then it could not work in all languages... I cannot add another field to fill when editing because there is no provision for this in cloze syntax. I think that the best way to do it is to withdraw the space and let the authors (teachers) add it if they want so. This could change the display of actual questions but does not add more difficulty to the students as the input box is clearly defined. Although some can argue that some students will want to add a space in their responses. In this case the manual grading can be used . I propose to withdraw the space. Help file should clearly specify this.
Hide
Howard Miller added a comment -

Pierre, where are we with this one?

Show
Howard Miller added a comment - Pierre, where are we with this one?
Hide
Pierre Pichet added a comment -

This was done on Head and 1.9.
See MDL-3274.
The academic session finish next week and I will do my spring cleaning of my moodle bugs...

Show
Pierre Pichet added a comment - This was done on Head and 1.9. See MDL-3274. The academic session finish next week and I will do my spring cleaning of my moodle bugs...

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated: