Explorar el Código

New icons for new question types

Yannick Warnier hace 14 años
padre
commit
0b834a6e03

+ 13 - 13
main/exercice/exercice.php

@@ -783,7 +783,7 @@ if ($show == 'test') {
                         //echo Display::url(Display::return_icon('settings.png',get_lang('Edit'), array('width'=>'22px'))." ".get_lang('Edit'), 'exercise_admin.php?'.api_get_cidreq().'&modifyExercise=yes&exerciseId='.$row['id']);
                     }
                                   
-                    echo '<p>';
+                    //echo '<p>';
                     echo $session_img;
                     $exid = $row['id'];
     
@@ -791,17 +791,7 @@ if ($show == 'test') {
                     $sqlquery = "SELECT count(*) FROM $TBL_EXERCICE_QUESTION WHERE exercice_id = '" . Database :: escape_string($exid) . "'";
                     $sqlresult = Database::query($sqlquery);
                     $rowi = Database :: result($sqlresult, 0);
-                    
-                    $random_label = '';
-                    
-                    if ($row['random'] > 0) {
-                       $random_label = ' ('.get_lang('Random').') ';
-                        echo $row['random'] . ' ' . api_strtolower(get_lang(($row['random'] > 1 ? 'Questions' : 'Question'))) .$random_label;
-                    } else {                    
-                        echo $rowi . ' ' . api_strtolower(get_lang(($rowi > 1 ? 'Questions' : 'Question')));
-                    }                
-     
-                    
+                                        
                     if ($session_id == $row['session_id']) {
                         //Settings                                                                
                         echo Display::url(Display::return_icon('edit.gif',get_lang('Edit'), array('width'=>'20px')), 'exercise_admin.php?'.api_get_cidreq().'&modifyExercise=yes&exerciseId='.$row['id']);
@@ -827,6 +817,16 @@ if ($show == 'test') {
                     if ($session_id == $row['session_id']) {
                         echo Display::url(Display::return_icon('delete.png', get_lang('Delete')), '', array('onclick'=>"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToDelete'),ENT_QUOTES,$charset))." ".addslashes($row['title'])."?"."')) return false;",'href'=>'exercice.php?'.api_get_cidreq().'&choice=delete&sec_token='.$token.'&exerciseId='.$row['id']));            
                     }
+                    echo '<br />';
+
+                    $random_label = '';                    
+                    if ($row['random'] > 0) {
+                       $random_label = ' ('.get_lang('Random').') ';
+                        echo $row['random'] . ' ' . api_strtolower(get_lang(($row['random'] > 1 ? 'Questions' : 'Question'))) .$random_label;
+                    } else {                    
+                        echo $rowi . ' ' . api_strtolower(get_lang(($rowi > 1 ? 'Questions' : 'Question')));
+                    }                
+     
                     //Attempts                    
                     echo '<br />'.get_count_exam_results($row['id']).' '.get_lang('Attempts');
                     
@@ -849,7 +849,7 @@ if ($show == 'test') {
                             echo '<a href="exercice_submit.php?'.api_get_cidreq().$myorigin.$mylpid.$myllpitemid.'&exerciseId='.$row['id'].'">'.$row['title'].'</a>';
                         } else {
                             echo $row['title'];
-                            echo '<h1>cant do exam</h1>';
+                            echo '<span class="exam-msg">'.get_lang('ExamNotAvailableAtThisTime').'</span>';
                         }                       
                     } else {
                         echo '<a href="exercice_submit.php?'.api_get_cidreq().$myorigin.$mylpid.$myllpitemid.'&exerciseId='.$row['id'].'">'.$row['title'].'</a>';                       

+ 2 - 2
main/exercice/multiple_answer_combination_true_false.class.php

@@ -23,7 +23,7 @@ require 'multiple_answer_combination.class.php';
 
 class MultipleAnswerCombinationTrueFalse extends MultipleAnswerCombination {
 
-	static $typePicture = 'mcmac.gif';
+	static $typePicture = 'mcmaco.gif';
 	static $explanationLangVar = 'MultipleAnswerCombinationTrueFalse';
     var    $options; 
 
@@ -34,7 +34,7 @@ class MultipleAnswerCombinationTrueFalse extends MultipleAnswerCombination {
 		parent::question();
 		$this -> type = MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE;
 		$this -> isContent = $this-> getIsContent();
-        $this->options = array('1'=>get_lang('True'),'0' =>get_lang('False'), '2' =>get_lang('Nothing'));
+        $this->options = array('1'=>get_lang('True'),'0' =>get_lang('False'), '2' =>get_lang('DontKnow'));
 	}
 }
 

+ 1 - 1
main/exercice/multiple_answer_true_false.class.php

@@ -21,7 +21,7 @@ if(!class_exists('MultipleAnswerTrueFalse')):
 
 class MultipleAnswerTrueFalse extends Question {
 
-	static $typePicture = 'mcma.gif';
+	static $typePicture = 'mcmao.gif';
 	static $explanationLangVar = 'MultipleAnswerTrueFalseSelect';
     var    $options;
 	/**

+ 4 - 1
main/exercice/question_create.php

@@ -111,6 +111,9 @@ $pictures_question_types[4] = 'matching.gif';
 $pictures_question_types[5] = 'open_answer.gif';
 $pictures_question_types[6] = 'hotspot.gif';
 $pictures_question_types[9] = 'mcmac.gif';
+$pictures_question_types[10] = 'mcuao.gif';
+$pictures_question_types[11] = 'mcmao.gif';
+$pictures_question_types[12] = 'mcmaco.gif';
 
 foreach (Question::$questionTypes as $key=>$value) {
 	?>
@@ -135,4 +138,4 @@ function check_question_type($parameter) {
 	}
 }
 
-?>
+?>

+ 1 - 1
main/exercice/unique_answer_no_option.class.php

@@ -23,7 +23,7 @@ if(!class_exists('UniqueAnswerNoOption')):
 
 class UniqueAnswerNoOption extends Question {
 
-	static $typePicture = 'mcua.gif';
+	static $typePicture = 'mcuao.gif';
 	static $explanationLangVar = 'UniqueAnswerNoOptionSelect';
 
 	/**

BIN
main/img/mcmaco.gif


BIN
main/img/mcmao.gif


BIN
main/img/mcuao.gif