Browse Source

show type question in edit question CT#905

Carlos Vargas 15 years ago
parent
commit
b162806d91
2 changed files with 3 additions and 2 deletions
  1. 2 1
      main/exercice/question_admin.inc.php
  2. 1 1
      main/exercice/question_list_admin.inc.php

+ 2 - 1
main/exercice/question_admin.inc.php

@@ -84,9 +84,10 @@ if(is_object($objQuestion)) {
 		$class="add";
 		$text=get_lang('AddQuestionToExercise');
 	}
+	$type = Security::remove_XSS($_GET['type']);
 
 	$types_information = $objQuestion->get_types_information();
-	$form_title_extra = get_lang($types_information[$_REQUEST['answerType']][1]);
+	$form_title_extra = get_lang($types_information[$type][1]);
 
 	// form title
 	$form->addElement('header', '', $text.': '.$form_title_extra);

+ 1 - 1
main/exercice/question_list_admin.inc.php

@@ -91,7 +91,7 @@ if($nbrQuestions) {
 				<td><?php eval('echo get_lang('.get_class($objQuestionTmp).'::$explanationLangVar);'); ?></td>
 			  	<td align="center"><?php echo $objQuestionTmp->selectLevel(); ?></td>		  	
 			  	<td>
-			  	<a href="<?php echo api_get_self(); ?>?<?php echo api_get_cidreq() ?>&myid=1&editQuestion=<?php echo $id; ?>"><img src="../img/edit.gif" border="0" alt="<?php echo get_lang('Modify'); ?>" /></a>
+			  	<a href="<?php echo api_get_self(); ?>?<?php echo api_get_cidreq() ?>&type=<?php echo $objQuestionTmp->selectType(); ?>&myid=1&editQuestion=<?php echo $id; ?>"><img src="../img/edit.gif" border="0" alt="<?php echo get_lang('Modify'); ?>" /></a>
 				<?php
 				// this variable  $show_quiz_edition comes from admin.php blocks the exercise/quiz modifications
 				if ($show_quiz_edition) { ?>