Rename READING_SPEED question type to READING_COMPREHENSION for better semantic naming - refs #1896

pull/2487/head
Yannick Warnier 9 years ago
parent aee078cca5
commit af7e3a176a
  1. 12
      main/exercise/ReadingComprehension.php
  2. 2
      main/exercise/question.class.php
  3. 2
      main/inc/lib/api.lib.php
  4. 6
      main/inc/lib/exercise.lib.php
  5. 0
      main/template/default/exercise/reading_comprehension.tpl

@ -4,16 +4,16 @@
use ChamiloSession as Session;
/**
* Class ReadingSpeed
* Class ReadingComprehension
*
* This class allows to instantiate an object of type READING_SPEED
* This class allows to instantiate an object of type READING_COMPREHENSION
* extending the class question
*
* @package chamilo.exercise
**/
class ReadingSpeed extends UniqueAnswer
class ReadingComprehension extends UniqueAnswer
{
public static $typePicture = 'reading-speed.png';
public static $typePicture = 'reading-comprehension.png';
public static $explanationLangVar = 'ReadingComprehension';
/**
@ -52,7 +52,7 @@ class ReadingSpeed extends UniqueAnswer
public function __construct()
{
parent::__construct();
$this->type = READING_SPEED;
$this->type = READING_COMPREHENSION;
$this->isContent = $this->getIsContent();
}
@ -129,7 +129,7 @@ class ReadingSpeed extends UniqueAnswer
{
$view = new Template('', false, false, false, true, false, false);
$template = $view->get_template('exercise/reading_speed.tpl');
$template = $view->get_template('exercise/reading_comprehension.tpl');
$view->assign('id', $this->id);
$view->assign('text', $text);

@ -54,7 +54,7 @@ abstract class Question
MATCHING_DRAGGABLE => ['MatchingDraggable.php', 'MatchingDraggable'],
//MEDIA_QUESTION => array('media_question.class.php' , 'MediaQuestion')
ANNOTATION => ['Annotation.php', 'Annotation'],
READING_SPEED => ['ReadingSpeed.php', 'ReadingSpeed']
READING_COMPREHENSION => ['ReadingComprehension.php', 'ReadingComprehension']
);
/**

@ -470,7 +470,7 @@ define('UNIQUE_ANSWER_IMAGE', 17);
define('DRAGGABLE', 18);
define('MATCHING_DRAGGABLE', 19);
define('ANNOTATION', 20);
define('READING_SPEED', 21);
define('READING_COMPREHENSION', 21);
define('EXERCISE_CATEGORY_RANDOM_SHUFFLED', 1);
define('EXERCISE_CATEGORY_RANDOM_ORDERED', 2);

@ -271,14 +271,14 @@ class ExerciseLib
}
}
if ($answerType == READING_SPEED) {
if ($answerType == READING_COMPREHENSION) {
$objQuestionTmp->processText(
$objAnswerTmp->selectAnswer(1)
);
}
for ($answerId = 1; $answerId <= $nbrAnswers; $answerId++) {
if ($answerType == READING_SPEED && $answerId === 1) {
if ($answerType == READING_COMPREHENSION && $answerId === 1) {
$answerId++;
}
@ -295,7 +295,7 @@ class ExerciseLib
//no break
case UNIQUE_ANSWER_IMAGE:
//no break
case READING_SPEED:
case READING_COMPREHENSION:
$input_id = 'choice-' . $questionId . '-' . $answerId;
if (isset($user_choice[0]['answer']) && $user_choice[0]['answer'] == $numAnswer) {

Loading…
Cancel
Save