[svn r19956] Give a default score 10 in test see FS#4048

skala
Julio Montoya 16 years ago
parent eb934ca961
commit 63ab98675d
  1. 2
      main/exercice/freeanswer.class.php
  2. 2
      main/exercice/hotspot_admin.inc.php
  3. 7
      main/exercice/multiple_answer.class.php
  4. 2
      main/exercice/unique_answer.class.php

@ -55,7 +55,7 @@ class FreeAnswer extends Question {
$form -> setDefaults(array('weighting' => $this->weighting));
}
else {
$form -> setDefaults(array('weighting' => '0'));
$form -> setDefaults(array('weighting' => '10'));
}
}

@ -330,7 +330,7 @@ if($modifyAnswers)
<td valign="top"><div style="height: 15px; width: 15px; background-color: <?php echo $hotspot_colors[$i]; ?>"> </div></td>
<td valign="top" align="left"><input type="text" name="reponse[<?php echo $i; ?>]" value="<?php echo htmlentities($reponse[$i]); ?>" size="45" /></td>
<td align="left"><textarea wrap="virtual" rows="1" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo stripslashes(htmlentities($comment[$i])); ?></textarea></td>
<td valign="top"><input type="text" name="weighting[<?php echo $i; ?>]" size="1" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 10); ?>" />
<td valign="top"><input type="text" name="weighting[<?php echo $i; ?>]" size="5" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 10); ?>" />
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]); ?>" />
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_type[$i]) ? 'square' : $hotspot_type[$i]); ?>" /></td>
</tr>

@ -72,7 +72,6 @@ class MultipleAnswer extends Question {
$fck_attribute['ToolbarSet'] = 'Answer';
$fck_attribute['Config']['ToolbarStartExpanded']='false';
$nb_answers = isset($_POST['nb_answers']) ? $_POST['nb_answers'] : 2;
$nb_answers += (isset($_POST['lessAnswers']) ? -1 : (isset($_POST['moreAnswers']) ? 1 : 0));
@ -99,7 +98,6 @@ class MultipleAnswer extends Question {
<th>
'.get_lang('Weighting').'
</th>
</tr>';
$form -> addElement ('html', $html);
@ -140,7 +138,7 @@ class MultipleAnswer extends Question {
$form->addElement('html_editor', 'answer['.$i.']',null, 'style="vertical-align:middle"');
$form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required');
$form->addElement('html_editor', 'comment['.$i.']',null, 'style="vertical-align:middle"');
$form->addElement('text', 'weighting['.$i.']',null, 'style="vertical-align:middle;margin-left: 0em;" size="5" value="0"');
$form->addElement('text', 'weighting['.$i.']',null, 'style="vertical-align:middle;margin-left: 0em;" size="5" value="10"');
$form -> addElement ('html', '</tr>');
}
$form -> addElement ('html', '</table>');
@ -184,8 +182,7 @@ class MultipleAnswer extends Question {
if($goodAnswer){
$weighting = abs($weighting);
}
else{
} else {
$weighting = abs($weighting);
$weighting = -$weighting;
}

@ -248,7 +248,7 @@ class UniqueAnswer extends Question {
//$form->addElement('select', 'destination'.$i, get_lang('SelectQuestion').' : ',$select_question,'multiple');
$form->addElement('text', 'weighting['.$i.']',null, 'style="vertical-align:middle;margin-left: 0em;" size="2" value="0"');
$form->addElement('text', 'weighting['.$i.']',null, 'style="vertical-align:middle;margin-left: 0em;" size="5" value="10"');
$form -> addElement ('html', '</tr>');
}

Loading…
Cancel
Save