orden question new fix css

1.10.x
aragonc 11 years ago
parent ddae944ba5
commit 4ae63d2672
  1. 5
      main/exercice/exercice.php
  2. 20
      main/exercice/question_list_admin.inc.php
  3. 56
      main/exercice/unique_answer.class.php
  4. 2
      main/inc/lib/display.lib.php

@ -491,7 +491,7 @@ if (isset($list_ordered) && !empty($list_ordered)) {
}
$exercise_list = $new_question_list;
}
echo '<div class="table-responsive">';
echo '<table class="'.Display::return_default_table_class().'">';
/* Listing exercises */
@ -509,7 +509,7 @@ if (!empty($exercise_list)) {
if ($is_allowedToEdit) {
$headers = array(
array('name' => get_lang('ExerciseName')),
array('name' => get_lang('QuantityQuestions'), 'params' => array('width' => '100px')),
array('name' => get_lang('QuantityQuestions'), 'params' => array('width' => '170px')),
array('name' => get_lang('Actions'), 'params' => array('width' => '180px')));
} else {
$headers = array(
@ -1031,6 +1031,7 @@ if (isset($attribute['path']) && is_array($attribute['path'])) {
}
}
echo '</table>';
echo '</div>';
if (empty($exercise_list) && $hotpotatoes_exist == false) {
if ($is_allowedToEdit && $origin != 'learnpath') {

@ -135,17 +135,21 @@ unset($_SESSION['less_answer']);
// If we are in a test
$inATest = isset($exerciseId) && $exerciseId > 0;
if (!$inATest) {
echo "<p class='warning-message'>".get_lang("ChoiceQuestionType")."</p>";
echo "<div class='alert alert-warning'>".get_lang("ChoiceQuestionType")."</div>";
} else {
// Title line
echo "<div>";
echo "<div style='font-weight:bold; width:50%; float:left; padding:10px 0px; text-align:center;'><span style='padding-left:50px;'>&nbsp;</span>".get_lang('Questions')."</div>";
echo "<div style='font-weight:bold; width:4%; float:left; padding:10px 0px; text-align:center;'>".get_lang('Type')."</div>";
echo "<div style='font-weight:bold; width:22%; float:left; padding:10px 0px; text-align:center;'>".get_lang('Category')."</div>";
echo "<div style='font-weight:bold; width:6%; float:left; padding:10px 0px; text-align:center;'>".get_lang('Difficulty')."</div>";
echo "<div style='font-weight:bold; width:4%; float:left; padding:10px 0px; text-align:center;'>".get_lang('Score')."</div>";
echo "<div class='table-responsive'>";
echo "<table class='table table-condensed'>";
echo "<tr>";
echo "<th>" .get_lang('Questions'). "</th>";
echo "<th>" .get_lang('Type'). "</th>";
echo "<th>" .get_lang('Category'). "</th>";
echo "<th>" .get_lang('Difficulty'). "</th>";
echo "<th>" .get_lang('Score'). "</th>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "<div style='clear:both'>&nbsp;</div>";
echo '<div id="question_list">';
if ($nbrQuestions) {

@ -215,22 +215,20 @@ class UniqueAnswer extends Question
' value = "' . $i . '"'
);
$answer_number->freeze();
$form->addHtml('<div class="row">');
$form->addHtml('<div class="col-md-1">');
$form->addElement(
'radio',
'correct',
null,
null,
$i,
'class="checkbox" style="margin-left: 0em;"'
);
$form->addElement(
'html_editor',
'answer[' . $i . ']',
null,
'style="vertical-align:middle"',
$editor_config
'class="checkbox"'
);
$form->addHtml('</div>');
$form->addHtml('<div class="col-md-5">');
$form->addHtmlEditor('answer[' . $i . ']',null,null,true, $editor_config);
$form->addHtml('</div>');
$form->addRule(
'answer[' . $i . ']',
@ -239,13 +237,9 @@ class UniqueAnswer extends Question
);
if ($obj_ex->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
$form->addElement(
'html_editor',
'comment[' . $i . ']',
null,
'style="vertical-align:middle"',
$editor_config
);
$form->addHtml('<div class="col-md-5">');
$form->addHtmlEditor('comment[' . $i . ']',null,null,false,$editor_config);
$form->addHtml('</div>');
// Direct feedback
//Adding extra feedback fields
@ -273,7 +267,7 @@ class UniqueAnswer extends Question
'url' . $i,
get_lang('Other') . ': ',
array(
'class' => 'span2',
'class' => 'col-md-2',
'placeholder' => get_lang('Other')
)
);
@ -285,20 +279,12 @@ class UniqueAnswer extends Question
);
} else {
$form->addElement(
'html_editor',
'comment[' . $i . ']',
null,
'style="vertical-align:middle"',
$editor_config
);
$form->addHtml('<div class="col-md-5">');
$form->addHtmlEditor('comment[' . $i . ']',null,null,false,$editor_config);
$form->addHtml('</div>');
}
$form->addElement(
'text',
'weighting[' . $i . ']',
null,
array('class' => "span1", 'value' => '0')
);
$form->addHtml('</div>');
$form->addText('weighting[' . $i . ']', null,null, array('class' => "col-md-1", 'value' => '0'));
$form->addElement('html', '</tr>');
}
@ -316,13 +302,13 @@ class UniqueAnswer extends Question
'submit',
'lessAnswers',
get_lang('LessAnswer'),
'class="btn minus"'
'class="btn btn-primary"'
);
$form->addElement(
'submit',
'moreAnswers',
get_lang('PlusAnswer'),
'class="btn plus"'
'class="btn btn-primary"'
);
$form->addElement(
'submit',
@ -336,13 +322,13 @@ class UniqueAnswer extends Question
'style_submit_button',
'lessAnswers',
get_lang('LessAnswer'),
'class="btn minus"'
'class="btn btn-primary"'
);
$form->addElement(
'style_submit_button',
'moreAnswers',
get_lang('PlusAnswer'),
'class="btn plus"'
'class="btn btn-primary"'
);
$form->addElement(
'style_submit_button',
@ -356,7 +342,7 @@ class UniqueAnswer extends Question
$renderer->setElementTemplate('{element}&nbsp;', 'lessAnswers');
$renderer->setElementTemplate('{element}&nbsp;', 'moreAnswers');
$form->addElement('html', '</div></div>');
$form->addHtml('</div></div>');
// We check the first radio button to be sure a radio button will be check
if ($correct == 0) {

@ -1654,7 +1654,7 @@ class Display
public static function return_default_table_class()
{
return 'data_table';
return 'table table-bordered';
}
/**

Loading…
Cancel
Save