diff --git a/public/main/inc/lib/display.lib.php b/public/main/inc/lib/display.lib.php index c74a282bf8..84db9dae55 100644 --- a/public/main/inc/lib/display.lib.php +++ b/public/main/inc/lib/display.lib.php @@ -841,12 +841,6 @@ class Display $filterPath = true ) { if (empty($image_path)) { - // For some reason, the call to img() happened without a proper - // image. Log the error and return an empty string to avoid - // breaking the HTML - $trace = debug_backtrace(); - $caller = $trace[1]; - //error_log('No image provided in Display::img(). Caller info: '.print_r($caller, 1)); return ''; } // Sanitizing the parameter $image_path @@ -2830,8 +2824,9 @@ HTML; } $lpJs = api_get_path(WEB_PUBLIC_PATH).'build/lp.js'; - //{type:"script", src:"'.api_get_jquery_ui_js_web_path().'"}, - //{type:"script", src: "'.$webPublicPath.'build/libs/mediaelement/plugins/markersrolls/markersrolls.js"}, + // {type:"script", src:"'.api_get_jquery_ui_js_web_path().'"}, + // {type:"script", src: "'.$webPublicPath.'build/libs/mediaelement/plugins/markersrolls/markersrolls.js"}, + // {type:"script", src:"'.$webPublicPath.'build/libs/mathjax/MathJax.js?config=AM_HTMLorMML"}, $videoFeatures = implode("','", $videoFeatures); $frameReady = ' $.frameReady(function() { @@ -2860,8 +2855,6 @@ HTML; '.$translateHtml.' ]}, '.$videoPluginCssFiles.' - {type:"script", src:"'.$webPublicPath.'build/libs/mathjax/MathJax.js?config=AM_HTMLorMML"}, - ]);'; return $frameReady; diff --git a/public/main/lp/learnpath.class.php b/public/main/lp/learnpath.class.php index 58278ce73a..136c700c4e 100644 --- a/public/main/lp/learnpath.class.php +++ b/public/main/lp/learnpath.class.php @@ -6371,7 +6371,7 @@ class learnpath } if ($allowExpand) { - $actionsLeft .= Display::url( + /*$actionsLeft .= Display::url( Display::return_icon( 'expand.png', get_lang('Expand'), @@ -6386,7 +6386,7 @@ class learnpath ), '#', ['role' => 'button', 'id' => 'hide_bar_template'] - ); + );*/ } if ($showRequirementButtons) { diff --git a/public/main/lp/lp_edit.php b/public/main/lp/lp_edit.php index eab95095ac..7baf83eab9 100644 --- a/public/main/lp/lp_edit.php +++ b/public/main/lp/lp_edit.php @@ -3,6 +3,7 @@ /* For licensing terms, see /license.txt */ use Chamilo\CoreBundle\Framework\Container; +use Chamilo\CourseBundle\Entity\CLp; use ChamiloSession as Session; /** @@ -24,7 +25,7 @@ if (empty($lpId)) { } $lpId = (int) $lpId; -/** @var \Chamilo\CourseBundle\Entity\CLp $lp */ +/** @var CLp $lp */ $lp = $lpRepo->find($lpId); $nameTools = get_lang('Document'); @@ -172,7 +173,7 @@ $expired_on = $learnPath->expired_on; $publicated_on = $learnPath->publicated_on; // Prerequisites -$form->addElement('html', '
'); +$form->addElement('html', '
'); $items = $learnPath->display_lp_prerequisites_list(); $form->addElement('html', ''); $form->addElement('html', '
'); diff --git a/public/main/lp/lp_subscribe_users.php b/public/main/lp/lp_subscribe_users.php index 702591471f..c87d5b254c 100644 --- a/public/main/lp/lp_subscribe_users.php +++ b/public/main/lp/lp_subscribe_users.php @@ -51,7 +51,6 @@ $courseCode = api_get_course_id(); $sessionId = api_get_session_id(); $url = api_get_self().'?'.api_get_cidreq().'&lp_id='.$lpId; -$lp = new learnpath($courseCode, $lpId, api_get_user_id()); $em = Database::getManager(); $courseRepo = Container::getCourseRepository(); diff --git a/public/main/lp/lp_view.php b/public/main/lp/lp_view.php index 4515ab3416..248241333e 100644 --- a/public/main/lp/lp_view.php +++ b/public/main/lp/lp_view.php @@ -424,7 +424,7 @@ switch ($returnLink) { $lpPreviewImagePath = Display::returnIconPath('unknown.png', ICON_SIZE_BIG); if ($lp->getResourceNode()->hasResourceFile()) { - $lpPreviewImagePath = $lpRepo->getResourceFileUrl($lp); + $lpPreviewImagePath = $lpRepo->getResourceFileUrl($lp).'?'.api_get_cidreq(); } if ($oLP->current == $oLP->get_last()) { @@ -571,15 +571,7 @@ if (!empty(api_get_configuration_value('lp_menu_location'))) { } $template->assign('menu_location', $menuLocation); $template->assign('disable_js_in_lp_view', (int) api_get_configuration_value('disable_js_in_lp_view')); -$template->assign( - 'lp_preview_image', - Display::img( - $lpPreviewImagePath, - $oLP->getNameNoTags(), - [], - ICON_SIZE_BIG - ) -); +$template->assign('lp_preview_image', ''.$oLP->getNameNoTags().''); $frameReady = Display::getFrameReadyBlock('#content_id, #content_id_blank'); $template->assign('frame_ready', $frameReady); diff --git a/public/main/template/default/auth/inscription.html.twig b/public/main/template/default/auth/inscription.html.twig index 9b0ea6b1de..c80301ae96 100644 --- a/public/main/template/default/auth/inscription.html.twig +++ b/public/main/template/default/auth/inscription.html.twig @@ -7,8 +7,6 @@ {% block content %} {% autoescape false %} - {{ sonata_page_render_container('content', page) }} - {{ inscription_header }} {{ inscription_content }} {{ form }} diff --git a/public/main/template/default/auth/inscription_edit.html.twig b/public/main/template/default/auth/inscription_edit.html.twig index 08c4ea21d2..cfbb345dec 100644 --- a/public/main/template/default/auth/inscription_edit.html.twig +++ b/public/main/template/default/auth/inscription_edit.html.twig @@ -2,13 +2,7 @@ {% block content %} {% autoescape false %} - -
- {{ sonata_page_render_container('content', page) }} -
- {{ form }} - {% endautoescape %} {% endblock %} diff --git a/src/CoreBundle/Controller/ResourceController.php b/src/CoreBundle/Controller/ResourceController.php index 014f28c003..cc5f50acd7 100644 --- a/src/CoreBundle/Controller/ResourceController.php +++ b/src/CoreBundle/Controller/ResourceController.php @@ -533,8 +533,7 @@ class ResourceController extends AbstractResourceController implements CourseCon public function viewAction(Request $request, RouterInterface $router): Response { $id = $request->get('id'); - $filter = $request->get('filter'); // See filters definitions in /config/services.yml - $em = $this->getDoctrine(); + $filter = $request->get('filter'); // See filters definitions in /config/services.yml. /** @var ResourceNode $resourceNode */ $resourceNode = $this->getResourceNodeRepository()->find($id); @@ -542,14 +541,6 @@ class ResourceController extends AbstractResourceController implements CourseCon throw new FileNotFoundException('Resource not found'); } - /*$repo = $this->getRepositoryFromRequest($request); - if ($repo instanceof ResourceWithLinkInterface) { - $resource = $repo->getResourceFromResourceNode($resourceNode->getId()); - $url = $repo->getLink($resource, $router, $this->getCourseUrlQueryToArray()); - - return $this->redirect($url); - }*/ - return $this->processFile($request, $resourceNode, 'show', $filter); } @@ -611,7 +602,7 @@ class ResourceController extends AbstractResourceController implements CourseCon } $zipName = $resourceNode->getSlug().'.zip'; - $rootNodePath = $resourceNode->getPathForDisplay(); + //$rootNodePath = $resourceNode->getPathForDisplay(); $resourceNodeRepo = $repo->getResourceNodeRepository(); $type = $repo->getResourceType(); @@ -704,7 +695,6 @@ class ResourceController extends AbstractResourceController implements CourseCon $this->trans('Unauthorised view access to resource') ); - //$repo = $this->getRepositoryFromRequest($request); $resourceFile = $resourceNode->getResourceFile(); if (!$resourceFile) {