Issue Details (XML | Word | Printable)

Key: MDL-13419
Type: Improvement Improvement
Status: In Progress In Progress
Priority: Minor Minor
Assignee: Pierre Pichet
Reporter: Howard Miller
Votes: 0
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Allow CLOZE answers to suppressing surrounding spaces

Created: 12/Feb/08 12:27 AM   Updated: 22/Apr/08 10:51 PM
Return to search
Component/s: Questions
Affects Version/s: 1.8.4, 1.9, 2.0
Fix Version/s: None

File Attachments: None
Image Attachments:

1. space_cloze.jpg
(65 kB)
Issue Links:
Dependency
 

Participants: Howard Miller and Pierre Pichet
Security Level: None
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Pierre Pichet added a comment - 12/Feb/08 11:57 AM
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?

Howard Miller added a comment - 12/Feb/08 06:43 PM
That's fantastic Pierre - one less job

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


Pierre Pichet added a comment - 12/Feb/08 11:03 PM
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?


Pierre Pichet added a comment - 12/Feb/08 11:07 PM
this is related to minimum size of cloze question display as asked by teachers who use this question type in language quizzes

Howard Miller added a comment - 12/Feb/08 11:12 PM
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.


Pierre Pichet added a comment - 13/Feb/08 12:18 AM
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...

Howard Miller added a comment - 13/Feb/08 12:23 AM
Ahhh..... Firefox, obviously

So what was the question?


Pierre Pichet added a comment - 13/Feb/08 12:52 AM
I propose to fix this by removing the space
echo "<input $style $readonly $popup name=\"$inputname\"";
without adding anything else.
do you agree?

Pierre Pichet added a comment - 13/Feb/08 12:56 AM
exemple with space removed

Pierre Pichet added a comment - 13/Feb/08 12:59 AM
look in the sapce_cloze.jpg image after : deal with this short answer

Howard Miller added a comment - 13/Feb/08 01:08 AM
That's easy but might it not upset all the people who expect a space to be there?

Pierre Pichet added a comment - 13/Feb/08 02:23 AM
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.


Howard Miller added a comment - 22/Apr/08 10:44 PM
Pierre, where are we with this one?

Pierre Pichet added a comment - 22/Apr/08 10:51 PM
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...