[svn r15892] Fixed a possible flaw by merging all elements of previous split except the last one into the answer

skala
Yannick Warnier 17 years ago
parent d22f204b1a
commit 096930e55c
  1. 10
      main/exercice/exercise_result.php

@ -29,7 +29,7 @@
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @author Julio Montoya Armas switchable fill in blank option added
* @version $Id: exercise_result.php 15891 2008-08-04 05:11:02Z yannoo $
* @version $Id: exercise_result.php 15892 2008-08-04 05:15:36Z yannoo $
*
* @todo split more code up in functions, move functions to library?
*/
@ -510,8 +510,12 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
{
$switchable_answer_set=true;
}
$answer = $pre_array[0];
$answer = '';
for ($k=0; $k<$last; $k++)
{
$answer .= $pre_array[$k];
}
// splits weightings that are joined with a comma
$answerWeighting = explode(',',$is_set_switchable[0]);

Loading…
Cancel
Save