Browse Source

Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

Yannick Warnier 7 years ago
parent
commit
18e2923868

+ 4 - 2
plugin/ims_lti/ImsLtiPlugin.php

@@ -13,6 +13,8 @@ class ImsLtiPlugin extends Plugin
 {
     const TABLE_TOOL = 'plugin_msi_lti_tool';
 
+    public $isAdminPlugin = true;
+
     /**
      * Class cronstructor
      */
@@ -29,7 +31,7 @@ class ImsLtiPlugin extends Plugin
     /**
      * Get the class instance
      * @staticvar MsiLtiPlugin $result
-     * @return MsiLtiPlugin
+     * @return ImsLtiPlugin
      */
     public static function create()
     {
@@ -177,7 +179,7 @@ class ImsLtiPlugin extends Plugin
         $text = $this->get_lang('ImsLtiDescription');
         $text .= sprintf(
             $this->get_lang('ManageToolButton'),
-            api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php'
+            api_get_path(WEB_PLUGIN_PATH).'ims_lti/admin.php'
         );
 
         return $text;

+ 1 - 1
plugin/ims_lti/list.php → plugin/ims_lti/admin.php

@@ -12,7 +12,7 @@ $tools = Database::select('*', ImsLtiPlugin::TABLE_TOOL);
 $template = new Template($plugin->get_title());
 $template->assign('tools', $tools);
 
-$content = $template->fetch('ims_lti/view/list.tpl');
+$content = $template->fetch('ims_lti/view/admin.tpl');
 
 $template->assign('header', $plugin->get_title());
 $template->assign('content', $content);

+ 1 - 1
plugin/ims_lti/create.php

@@ -33,7 +33,7 @@ if ($form->validate()) {
         Display::return_message($plugin->get_lang('ToolAdded'), 'success')
     );
 
-    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php');
+    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/admin.php');
     exit;
 }
 

+ 2 - 2
plugin/ims_lti/edit.php

@@ -20,7 +20,7 @@ if (empty($tool)) {
         Display::return_message($plugin->get_lang('NoTool'), 'error')
     );
 
-    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php');
+    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/admin.php');
     exit;
 }
 
@@ -58,7 +58,7 @@ if ($form->validate()) {
         Display::return_message($plugin->get_lang('ToolEdited'), 'success')
     );
 
-    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php');
+    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/admin.php');
     exit;
 }
 

+ 0 - 6
plugin/ims_lti/start.php

@@ -6,13 +6,7 @@ require_once __DIR__.'/../../main/inc/global.inc.php';
 $toolId = isset($_GET['id']) ? intval($_GET['id']) : 0;
 
 if (empty($toolId)) {
-    if (api_is_platform_admin()) {
-        header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php');
-        exit;
-    }
-
     api_not_allowed(true);
-    exit;
 }
 
 api_protect_course_script();

+ 0 - 0
plugin/ims_lti/view/list.tpl → plugin/ims_lti/view/admin.tpl