Minor - fix php code

pull/3064/head
Julio 6 years ago
parent f8ec0f3125
commit f96d7c9457
  1. 4
      public/main/index/user_portal.php
  2. 3
      public/main/lp/lp_add_item.php
  3. 4
      public/main/lp/lp_controller.php
  4. 3
      public/main/lp/lp_list.php
  5. 1
      src/CoreBundle/Framework/Container.php
  6. 2
      src/CourseBundle/Entity/CGroupInfo.php
  7. 2
      src/GraphQlBundle/Resolver/CourseResolver.php

@ -96,7 +96,7 @@ if ($load_dirs) {
$folder_icon = api_get_path(WEB_IMG_PATH).'icons/22/folder.png';
$close_icon = api_get_path(WEB_IMG_PATH).'loading1.gif';
$htmlHeadXtra[] = '<script>
$(document).ready(function() {
$(function() {
$(".document_preview_container").hide();
$(".document_preview").click(function() {
var my_id = this.id;
@ -128,7 +128,7 @@ if ($displayMyCourseViewBySessionLink) {
$htmlHeadXtra[] = '
<script>
userId = '.$userId.'
$(document).ready(function() {
$(function() {
changeMyCoursesView($.cookie("defaultMyCourseView" + userId));
});

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
@ -9,8 +10,6 @@ use ChamiloSession as Session;
* @author Roan Embrechts, refactoring and code cleaning
* @author Yannick Warnier <ywarnier@beeznest.org> - cleaning and update
* @author Julio Montoya - Improving the list of templates
*
* @package chamilo.learnpath
*/
$this_section = SECTION_COURSES;

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
@ -9,8 +10,6 @@ use ChamiloSession as Session;
*
* @todo remove repeated if $lp_found redirect
*
* @package chamilo.learnpath
*
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
@ -22,7 +21,6 @@ require_once __DIR__.'/../inc/global.inc.php';
api_protect_course_script(true);
$current_course_tool = TOOL_LEARNPATH;
$_course = api_get_course_info();
$glossaryExtraTools = api_get_setting('show_glossary_in_extra_tools');

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CourseBundle\Entity\CLpCategory;
@ -9,8 +10,6 @@ use ChamiloSession as Session;
* the direct file view is not any more needed, if the user uploads a SCORM zip file, a directory
* will be automatically created for it, and the files will be uncompressed there for example ;.
*
* @package chamilo.learnpath
*
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
$this_section = SECTION_COURSES;

@ -11,7 +11,6 @@ use Chamilo\CoreBundle\Repository\CourseCategoryRepository;
use Chamilo\CoreBundle\Repository\CourseRepository;
use Chamilo\CoreBundle\Repository\IllustrationRepository;
use Chamilo\CoreBundle\ToolChain;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CourseBundle\Repository\CDocumentRepository;
use Chamilo\CourseBundle\Repository\CExerciseCategoryRepository;
use Chamilo\CourseBundle\Repository\CForumAttachmentRepository;

@ -195,6 +195,7 @@ class CGroupInfo extends AbstractResource implements ResourceInterface
{
return $this->getName();
}
/**
* Get iid.
*
@ -672,7 +673,6 @@ class CGroupInfo extends AbstractResource implements ResourceInterface
return $relation->count() > 0;
}
/**
* Resource identifier.
*/

@ -261,7 +261,7 @@ class CourseResolver implements ContainerAwareInterface
/** @var Course $course */
$course = $context->offsetGet('course');
/** @var Session $session */
$session = $context->offsetGet('session');
//$session = $context->offsetGet('session');
$threadRepo = $this->em->getRepository('ChamiloCourseBundle:CForumThread');
$thread = $threadRepo->find($id);

Loading…
Cancel
Save