From 8a8ca59ea4d35bd296fa50147c0ba4cc751e44ad Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 15 Apr 2009 16:39:19 +0200 Subject: [PATCH] [svn r19785] Question difficulty: 1 to 5 only see FS#4034 --- main/exercice/question.class.php | 8 ++++---- main/exercice/question_pool.php | 23 +++++++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/main/exercice/question.class.php b/main/exercice/question.class.php index 517db30c35..be2e8e07cb 100644 --- a/main/exercice/question.class.php +++ b/main/exercice/question.class.php @@ -1,4 +1,4 @@ -weighting=0; $this->position=1; $this->picture=''; - $this->level = 0; + $this->level = 1; $this->exerciseList=array(); } @@ -978,7 +978,7 @@ abstract class Question //$radios_results_enabled[]=$test; // question level - $select_level = array (0,1,2,3,4,5); + $select_level = array (1,2,3,4,5); //$radios_results_enabled[] = foreach($select_level as $val) { $radios_results_enabled[] = FormValidator :: createElement ('radio', null, null,$val,$val); diff --git a/main/exercice/question_pool.php b/main/exercice/question_pool.php index 6ec9f9ce31..73a7bfbce8 100644 --- a/main/exercice/question_pool.php +++ b/main/exercice/question_pool.php @@ -1,4 +1,4 @@ -'; //echo ''; + //level difficulty only from 1 to 5 if (!isset($exerciseLevel)) $exerciseLevel = -1; for ($level = -1; $level <=5; $level++) { - $selected =''; - if ($exerciseLevel == $level) - $selected = ' selected="selected" '; - if ($level==-1) { - echo ''; - } else { - echo ''; - } + $selected =''; + if ($level!=0) { + if ($exerciseLevel == $level) + $selected = ' selected="selected" '; + if ($level==-1) { + echo ''; + } else { + echo ''; + } + } } echo ' '; ?>