Bug #351
Answer option rendering
100%
Description
when result of the rendering expands accross multiple lines, answer option lost its alignment
single /multiple answers
matching
Files
History
Updated by Carlos Vargas about 11 years ago
Actualizado por Isaac Flores hace 4 días
- Estado changed from New to Assigned * Asignado a set to Isaac Flores
#2
Actualizado por Yannick Warnier hace 1 día
- Asignado a changed from Isaac Flores to Arthur Portugal * Versión prevista changed from 1.8.6.1 to 1.8.6.2
#3
Actualizado por Yannick Warnier hace 1 día
Arthur, I think you already finished this. Could you confirm and close the task?
Updated by Arthur Portugal about 11 years ago
- Status changed from New to Assigned
- SCRUM pts - complexity changed from ? to 1
I will take this task
Updated by Arthur Portugal about 11 years ago
- Status changed from Assigned to Needs testing
- % Done changed from 0 to 90
This task is finished, ready to test
Updated by Arthur Portugal about 11 years ago
- Status changed from Needs testing to Bug resolved
- % Done changed from 90 to 100
Updated by Marko Kastelic over 10 years ago
Sorry to inform you, but this one is not resolved. I'm attaching small image ...
Updated by Julio Montoya over 10 years ago
Hello, Which chamilo version are you using?
Can you add your CSS? In which type of question you found that?
Marko Kastelic wrote:
Sorry to inform you, but this one is not resolved. I'm attaching small image ...
Updated by Marko Kastelic over 10 years ago
The version is 1.8.7 (original),
using default stylesheets (named Chamilo, Corporate, Cosmic
problem vas described in the original post. Here's how the answer is constructed :
<p style="float:left; padding-right:4px;"> <span><input class="checkbox" type="checkbox" name="choice[2][5]" value="1" ></p></span><p>ena</p> <p>dva</p> <p>tri</p>
if you look at the code, you will see, that the multiple lines cannot be align left. The whole answer field should be deviden into two fields: left one for the checkbox (or radiobutton) and right one for the answer text.
from this, i suspect, single, multiple and strict typos suffers from this problem
Updated by Marko Kastelic over 10 years ago
exercice.lib.php ( method showQuestion )
// cross-sectioned <p> && <span> elements // lines 224-225,245-246,266-267
// sample from original source from line 243-249: <tr> <td colspan="3"> <div class="u-m-answer"> <p style="float:left; padding-right:4px;"> <span><input class="checkbox" type="checkbox" name="choice['.$questionId.']['.$numAnswer.']" value="1" '.$selected.'></p></span>'; $answer = api_parse_tex($answer); $s .= Security::remove_XSS($answer, STUDENT); $s .= '</div></td></tr>';
is interpreted as :
<tr> <td colspan="3"> <div class="u-m-answer"> <p style="float:left; padding-right:4px;"> <span><input class="checkbox" type="radio" name="choice[2]" value="5" > </p> </span> <p>// three + lines </p> <p>for (int i=0;i<100;i++){</p> <p>cout << "test";</p> <p>}</p> </div> </td> </tr>
proposed / how it shoud be :
nesting 'answer' section to separate div, that is floated to the right, replaceing span&p tags:
<tr> <td colspan="3"> <div class="u-m-answer"> <p style="float:left; padding-right:4px;"> <span><input class="checkbox" type="radio" name="choice[2]" value="5" > </span> </p> <div style="float: right;"> <p>// three + lines </p> <p>for (int i=0;i<100;i++){</p> <p>cout << "test";</p> <p>}</p> </div> </div> </td> </tr>
where & what :
sequence of the lines (3 sections) : 226-228, 243-249, 264-270
that currently read as
-$answer = api_parse_tex($answer); -$s .= Security::remove_XSS($answer, STUDENT); -$s .= '</div></td></tr>';
should be changed as :
$answer = api_parse_tex($answer); s .= '<div style="float: right;">; s .= Security::remove_XSS($answer, STUDENT); s .= '</div>'; $s .= '</div></td></tr>';
Updated by Marko Kastelic over 10 years ago
oups,
forgot to replace the position of the span and p tag (just a line above)
Updated by Ivan Tcholakov over 10 years ago
I confirm, it has not been fixed.
Updated by Ivan Tcholakov over 10 years ago
12211:fb6de7d31228 Task #351 - HTML syntax corrections only.
http://code.google.com/p/chamilo/source/detail?r=fb6de7d31228ca92dc34e7f7cfe7b8d7c602bce4&repo=classic
Updated by Ivan Tcholakov over 10 years ago
12214:017110563d52 Task #351 - A CSS syntax correction.
http://code.google.com/p/chamilo/source/detail?r=017110563d522011fd78c5a3717ad274f58125bf&repo=classic
Updated by Ivan Tcholakov over 10 years ago
- File css_floar_right.png css_floar_right.png added
- File div_margin.png div_margin.png added
The suggestion
$s .= '<div style="float: right;">';
moves the texts to the right (tried with Opera).
I am going to make a commit this way:
$s .= '<div style="margin-left: 20px;">';
$s .= ...answer...
$s .= '</div>';
After that I will check how the test appears on all the visual themes.
Updated by Ivan Tcholakov over 10 years ago
- Status changed from Bug resolved to Needs testing
- Assignee changed from Arthur Portugal to Ivan Tcholakov
- Target version changed from 1.8.6.2 alpha to 1.8.7.1
- % Done changed from 100 to 50
Updated by Ivan Tcholakov over 10 years ago
- File rtl_languages.png rtl_languages.png added
12215:3f3d69a28871 Task #351 - Visual corrections for the tests, about the answer text margins.
http://code.google.com/p/chamilo/source/detail?r=3f3d69a288712eb7304f054cecfa84758424bd34&repo=classic
This change is not good enough for the languages with right-to-left writing system (arabic, etc.). Tomorrow I will try something else.
Updated by Marko Kastelic over 10 years ago
Ivan Tcholakov wrote:
The suggestion
$s .= '<div style="float: right;">';
moves the texts to the right (tried with Opera).
Thanks Ivan, except for the rtl, it's good enough; btw. text is moved right if the width of the div is not set ...
Updated by Ivan Tcholakov over 10 years ago
12229:8c9c81a1ade6 Task #351 - Code preparation for further reworks.
http://code.google.com/p/chamilo/source/detail?r=8c9c81a1ade63903d76a93d32d4ade9a40a6fc56&repo=classic
Updated by Ivan Tcholakov over 10 years ago
- File ltr_test_1.png ltr_test_1.png added
- File rtl_test_1.png rtl_test_1.png added
12241:54b368c18911 Task #351 - HTML-changes in "Tests" tool, showing proposed answers: Trying to use of the existing hidden table.
http://code.google.com/p/chamilo/source/detail?r=54b368c18911c36e265a6f72c99b4d5eab679762&repo=classic
Updated by Ivan Tcholakov over 10 years ago
12242:2c9dac43f2d1 Task #351 - Visual fixes.
http://code.google.com/p/chamilo/source/detail?r=2c9dac43f2d1bee785dd0142c4487d95f0330d73&repo=classic
Updated by Ivan Tcholakov over 10 years ago
- File ltr_test_2.png ltr_test_2.png added
- File rtl_test_2.png rtl_test_2.png added
- Status changed from Needs testing to Needs more info
- % Done changed from 50 to 90
12253:04e532e85315 Task #351 - Bringing back the implementation with the <div> blocks.
http://code.google.com/p/chamilo/source/detail?r=04e532e85315ab6104ea76ca7d93715b141782a4&repo=classic
Are we Ok for closing this task?
Updated by Ivan Tcholakov over 10 years ago
- Status changed from Needs more info to Feature implemented
- % Done changed from 90 to 100
I tried all the visual styles. The last transaction is good enough for me. I am closing this task.