Reverted Martin's encryption of the key in the responses table for now until we are sure all potential problems have been ironed out. See discussion at http://security.moodle.org/mod/forum/discuss.php?d=178

This commit is contained in:
gustav_delius
2006-03-29 10:13:36 +00:00
parent 3b7d7fe9c0
commit fb6dd5f2b1
@@ -224,7 +224,7 @@ class quiz_match_qtype extends quiz_default_questiontype {
echo '</td>';
/// Drop-down list:
$menuname = $nameprefix.rc4encrypt($subquestion->id);
$menuname = $nameprefix.$subquestion->id;
$response = isset($state->responses[$subquestion->id])
? $state->responses[$subquestion->id] : '0';
if ($options->readonly
@@ -256,14 +256,6 @@ class quiz_match_qtype extends quiz_default_questiontype {
function grade_responses(&$question, &$state, $quiz) {
$subquestions = $state->options->subquestions;
foreach ($state->responses as $key => $value) { // Decrypt strings back to numbers
if ((string)(int)$key == (string)$key) { // Has been done before
continue;
}
unset($state->responses[$key]);
$state->responses[rc4decrypt($key)] = $value;
}
$responses = &$state->responses;
$answers = array();