Commit 90009f52 authored by User expired's avatar User expired
Browse files

removed limitations in selection of MCMA answers

parent f13c8e68
......@@ -317,7 +317,7 @@ switch($menu_mode) {
$sqlq .= $sql_answer_position;
$sqlq .= ' GROUP BY answer_question_id';
if ($tsubset_answers > 0) {
$sqlq .= ' HAVING (COUNT(answer_id)='.($tsubset_answers-1).')'; //changed, ESM
$sqlq .= ' HAVING (COUNT(answer_id)>='.($tsubset_answers-1).')';
}
$sqlq .= ' )';
} elseif ($tsubset_type == 2) {
......@@ -330,7 +330,7 @@ switch($menu_mode) {
$sqlq .= $sql_answer_position;
$sqlq .= ' GROUP BY answer_question_id';
if ($tsubset_answers > 0) {
$sqlq .= ' HAVING (COUNT(answer_id)='.$tsubset_answers.')'; //changed, ESM
$sqlq .= ' HAVING (COUNT(answer_id)>='.$tsubset_answers.')';
}
$sqlq .= ' )';
} elseif ($tsubset_type == 4) {
......@@ -345,11 +345,12 @@ switch($menu_mode) {
HAVING (COUNT(answer_id)>1))';
}
$sqlq .= $sql_questions_position;
if (K_DATABASE_TYPE == 'ORACLE') {
/* if (K_DATABASE_TYPE == 'ORACLE') {
$sqlq = 'SELECT * FROM ('.$sqlq.') WHERE rownum <= '.$tsubset_quantity.'';
} else {
$sqlq .= ' LIMIT '.$tsubset_quantity.'';
}
no limitation for answers ESM 150331 */
$numofrows = 0;
if ($rq = F_db_query($sqlq, $db)) {
if ($mq = F_db_fetch_array($rq)) {
......@@ -1222,7 +1223,8 @@ if (isset($test_id) AND ($test_id > 0)) {
echo '</span>'.K_NEWLINE;
echo '</div>'.K_NEWLINE;
echo getFormRowTextInput('tsubset_answers', $l['w_num_answers'], $l['h_num_answers'], '', $tsubset_answers, '^([0-9]*)$', 20, false, false, false);
//commented out b/c no limitation for answers ESM 150331
//echo getFormRowTextInput('tsubset_answers', $l['w_num_answers'], $l['h_num_answers'], '', $tsubset_answers, '^([0-9]*)$', 20, false, false, false);
echo '<div class="row">'.K_NEWLINE;
echo '<span class="label">&nbsp;</span>'.K_NEWLINE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment