Minor - fix lang vars, fix php errors

pull/3733/head
Julio Montoya 4 years ago
parent c8c92f46ce
commit 572bd5e15f
  1. 2
      public/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
  2. 2
      public/main/exercise/UniqueAnswerImage.php
  3. 29
      public/main/exercise/exercise.class.php
  4. 2
      public/main/exercise/global_multiple_answer.class.php
  5. 2
      public/main/exercise/multiple_answer.class.php
  6. 2
      public/main/exercise/multiple_answer_combination.class.php
  7. 2
      public/main/exercise/multiple_answer_true_false.class.php
  8. 2
      public/main/exercise/unique_answer.class.php
  9. 2
      public/main/exercise/unique_answer_no_option.class.php
  10. 3
      public/main/forum/forumfunction.inc.php
  11. 7
      public/main/inc/ajax/exercise.ajax.php

@ -309,7 +309,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
$header .= '<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
$header .= '<th>'

@ -427,7 +427,7 @@ class UniqueAnswerImage extends UniqueAnswer
<tr>
<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
$header .= '<th>'.get_lang('Answer').'</th>';
$header .= '<th>'.get_lang('Status').'</th>';

@ -5690,6 +5690,27 @@ class Exercise
$final_overlap = 100;
}
$overlap = 0;
if ($final_overlap > 0) {
$overlap = (int) $final_overlap;
}
$overlap = 0;
if ($final_overlap > 0) {
$overlap = (int) $final_overlap;
}
$excess = 0;
if ($final_excess > 0) {
$excess = (int) $final_excess;
}
$missing = 0;
if ($final_missing > 0) {
$missing = (int) $final_missing;
}
$table_resume = '<table class="table table-hover table-striped data_table">
<tr class="row_odd" >
<td></td>
@ -5698,21 +5719,21 @@ class Exercise
</tr>
<tr class="row_even">
<td><b>'.get_lang('Overlapping areaping area').'</b></td>
<td>'.get_lang('Minimumimum').' '.$threadhold1.'</td>
<td>'.get_lang('Minimum').' '.$threadhold1.'</td>
<td class="text-right '.($overlap_color ? 'text-success' : 'text-danger').'">'
.$final_overlap < 0 ? 0 : (int) $final_overlap.'</td>
.$overlap.'</td>
</tr>
<tr>
<td><b>'.get_lang('Excessive areaive area').'</b></td>
<td>'.get_lang('max. 20 characters, e.g. <i>INNOV21</i>').' '.$threadhold2.'</td>
<td class="text-right '.($excess_color ? 'text-success' : 'text-danger').'">'
.$final_excess < 0 ? 0 : (int) $final_excess.'</td>
.$excess.'</td>
</tr>
<tr class="row_even">
<td><b>'.get_lang('Missing area area').'</b></td>
<td>'.get_lang('max. 20 characters, e.g. <i>INNOV21</i>').' '.$threadhold3.'</td>
<td class="text-right '.($missing_color ? 'text-success' : 'text-danger').'">'
.$final_missing < 0 ? 0 : (int) $final_missing.'</td>
.$missing.'</td>
</tr>
</table>';
if ($next == 0) {

@ -252,7 +252,7 @@ class GlobalMultipleAnswer extends Question
if (!in_array($exercise->results_disabled, [RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER])) {
$header .= '<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
}

@ -227,7 +227,7 @@ class MultipleAnswer extends Question
$header .= '<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
$header .= '<th>'.get_lang('Answer').'</th>';

@ -228,7 +228,7 @@ class MultipleAnswerCombination extends Question
) {
$header .= '<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
}

@ -317,7 +317,7 @@ class MultipleAnswerTrueFalse extends Question
) {
$header .= '<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
}

@ -445,7 +445,7 @@ class UniqueAnswer extends Question
$header .= '<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
$header .= '<th>'.get_lang('Answer').'</th>';

@ -402,7 +402,7 @@ class UniqueAnswerNoOption extends Question
) {
$header .= '<th>'.get_lang('Your choice').'</th>';
if ($exercise->showExpectedChoiceColumn()) {
$header .= '<th>'.get_lang('ExpectedYour choice').'</th>';
$header .= '<th>'.get_lang('Expected choice').'</th>';
}
}
$header .= '<th>'.get_lang('Answer').'</th>';

@ -6031,7 +6031,8 @@ function getAttachedFiles(
$courseId = (int) $courseId;
$attachId = (int) $attachId;
$postId = (int) $postId;
$threadId = !empty($threadId) ? (int) $threadId : isset($_REQUEST['thread']) ? (int) ($_REQUEST['thread']) : '';
$threadId = (int) $threadId;
if (empty($courseId)) {
// $courseId can be null, use api method
$courseId = api_get_course_int_id();

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\TrackEExerciseConfirmation;
@ -9,10 +10,7 @@ require_once __DIR__.'/../global.inc.php';
$current_course_tool = TOOL_QUIZ;
$debug = false;
api_protect_course_script(true);
$action = $_REQUEST['a'];
$course_id = api_get_course_int_id();
$session_id = isset($_REQUEST['session_id']) ? (int) $_REQUEST['session_id'] : api_get_session_id();
$course_code = isset($_REQUEST['cidReq']) ? $_REQUEST['cidReq'] : api_get_course_id();
@ -405,8 +403,7 @@ switch ($action) {
$choice = isset($_REQUEST['choice']) ? $_REQUEST['choice'] : [];
// certainty degree choice
$choiceDegreeCertainty = isset($_REQUEST['choiceDegreeCertainty'])
? $_REQUEST['choiceDegreeCertainty'] : [];
$choiceDegreeCertainty = $_REQUEST['choiceDegreeCertainty'] ?? [];
// Hot spot coordinates from all questions.
$hot_spot_coordinates = isset($_REQUEST['hotspot']) ? $_REQUEST['hotspot'] : [];

Loading…
Cancel
Save