Minor: Format code

pull/4430/head
Angel Fernando Quiroz Campos 3 years ago
parent 2a1a7b9d3f
commit 84ca93f845
  1. 4
      main/exercise/exercise.class.php
  2. 2
      main/inc/lib/api.lib.php
  3. 7
      main/inc/lib/course.lib.php
  4. 3
      main/inc/lib/webservices/Rest.php
  5. 8
      plugin/lti_provider/src/LtiProvider.php
  6. 2
      plugin/lti_provider/tool/logout.php

@ -4453,7 +4453,7 @@ class Exercise
$studentAnswerToShow = $studentAnswer; $studentAnswerToShow = $studentAnswer;
if (empty($studentAnswer)) { if (empty($studentAnswer)) {
continue; break;
} }
if ($debug) { if ($debug) {
@ -4477,7 +4477,7 @@ class Exercise
} }
if (empty($correctAnswer)) { if (empty($correctAnswer)) {
continue; break;
} }
if (FillBlanks::isStudentAnswerGood( if (FillBlanks::isStudentAnswerGood(

@ -2158,7 +2158,7 @@ function api_get_anonymous_id()
$login = uniqid('anon_'); $login = uniqid('anon_');
$email = ' anonymous@localhost.local'; $email = ' anonymous@localhost.local';
if (api_get_setting('login_is_email') == 'true') { if (api_get_setting('login_is_email') == 'true') {
$login = $login . "@localhost.local"; $login = $login."@localhost.local";
$email = $login; $email = $login;
} }
$anonList = UserManager::get_user_list(['status' => ANONYMOUS], ['registration_date ASC']); $anonList = UserManager::get_user_list(['status' => ANONYMOUS], ['registration_date ASC']);

@ -5066,10 +5066,7 @@ class CourseManager
} }
/** /**
* Updates the language for all courses * Updates the language for all courses.
*
* @param string $from
* @param string $to
*/ */
public static function updateAllCourseLanguages(string $from, string $to): bool public static function updateAllCourseLanguages(string $from, string $to): bool
{ {
@ -5079,8 +5076,10 @@ class CourseManager
if (!empty($to) && !empty($from)) { if (!empty($to) && !empty($from)) {
$sql = "UPDATE $tableCourse SET course_language = '$to' $sql = "UPDATE $tableCourse SET course_language = '$to'
WHERE course_language = '$from'"; WHERE course_language = '$from'";
return Database::query($sql); return Database::query($sql);
} }
return false; return false;
} }

@ -1927,7 +1927,8 @@ class Rest extends WebService
} }
/** /**
* Set a given message as already read * Set a given message as already read.
*
* @param $messageId * @param $messageId
*/ */
public function setMessageRead(int $messageId) public function setMessageRead(int $messageId)

@ -155,13 +155,13 @@ class LtiProvider
$isLti = false; $isLti = false;
if (isset($request['lti_message_hint'])) { if (isset($request['lti_message_hint'])) {
$isLti = true; $isLti = true;
} else if (isset($request['state'])) { } elseif (isset($request['state'])) {
$isLti = true; $isLti = true;
} else if (isset($request['lti_launch_id']) && 'learnpath' === api_get_origin()) { } elseif (isset($request['lti_launch_id']) && 'learnpath' === api_get_origin()) {
$isLti = true; $isLti = true;
} else if(isset($request['lti_launch_id'])) { } elseif (isset($request['lti_launch_id'])) {
$isLti = true; $isLti = true;
} else if (isset($session['oLP']->lti_launch_id)) { } elseif (isset($session['oLP']->lti_launch_id)) {
$isLti = true; $isLti = true;
} }

@ -1,8 +1,6 @@
<?php <?php
/* For license terms, see /license.txt */ /* For license terms, see /license.txt */
use ChamiloSession as Session;
require_once __DIR__.'/../../../main/inc/global.inc.php'; require_once __DIR__.'/../../../main/inc/global.inc.php';
require_once __DIR__.'/../src/LtiProvider.php'; require_once __DIR__.'/../src/LtiProvider.php';
require_once __DIR__.'/../LtiProviderPlugin.php'; require_once __DIR__.'/../LtiProviderPlugin.php';

Loading…
Cancel
Save