Minor - Update redirection plugin documentation and translations - refs #2200

pull/2487/head
Yannick Warnier 8 years ago
parent 057ff9eba4
commit 59a0c53c38
  1. 17
      plugin/redirection/README.md
  2. 12
      plugin/redirection/RedirectionPlugin.php
  3. 2
      plugin/redirection/admin.php
  4. 4
      plugin/redirection/lang/english.php
  5. 2
      plugin/redirection/lang/french.php

@ -1,8 +1,15 @@
# chamilo-plugin-redirection
Plugin chamilo para la redirección de usuarios.
Redirection plugin
===
Requiere agregar:
Chamilo plugin for the redirection of specific users after they login.
<code>
Requires the addition of the following in configuration.php:
```
$_configuration['plugin_redirection_enabled'] = true;
</code>
```
This setting is defined in configuration.php rather than in settings_current to reduce the
load, as it is used on every login.
@TODO Check the load difference for *just* checking it in settings_current rather than building the plugin object

@ -2,7 +2,7 @@
/* For licensing terms, see /license.txt */
/**
* Config the plugin
* Redirection plugin. Allows the configuration of redirection of specific users right after they login
* @author Enrique Alcaraz Lopez
* @package chamilo.plugin.redirection
*/
@ -31,6 +31,7 @@ class RedirectionPlugin extends Plugin
}
/**
* Inser a new redirection (and delete the previous one for this user, if any)
* @param int $userId
* @param string $url
* @return false|string
@ -62,6 +63,7 @@ class RedirectionPlugin extends Plugin
}
/**
* Get the current redirection for a given user (if any)
* @param $userId
* @return array
* @throws \Doctrine\DBAL\DBALException
@ -79,6 +81,7 @@ class RedirectionPlugin extends Plugin
}
/**
* Deletes an existing redirection
* @param int $id
*/
public static function delete($id)
@ -91,6 +94,7 @@ class RedirectionPlugin extends Plugin
}
/**
* Get all current redirection records
* @return array
*/
public static function getAll()
@ -100,6 +104,9 @@ class RedirectionPlugin extends Plugin
return Database::select('*', $table);
}
/**
* Install the required DB structure to store the plugin data
*/
public static function install()
{
$table = Database::get_main_table('plugin_redirection');
@ -113,6 +120,9 @@ class RedirectionPlugin extends Plugin
Database::query($sql);
}
/**
* Uninstall the plugin, cleaning up the database structure created on install
*/
public static function uninstall()
{
$table = Database::get_main_table('plugin_redirection');

@ -2,7 +2,7 @@
/* For licensing terms, see /license.txt */
/**
* Config the plugin
* Admin interface for the plugin configuration
* @author Enrique Alcaraz Lopez
* @package chamilo.plugin.redirection
*/

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
$strings['plugin_title'] = "Redirección personalizada";
$strings['plugin_comment'] = "Redirecciona a una url personalizada a un usuario en concreto";
$strings['plugin_title'] = "Custom redirection by user";
$strings['plugin_comment'] = "Redirect specific users to any specific URL";

@ -4,3 +4,5 @@
* @author Enrique Alcaraz Lopez
* @package chamilo.plugin.redirection
*/
$strings['plugin_title'] = "Redirection personalisée par utilisateur";
$strings['plugin_comment'] = "Rediriger des utilisateurs spécifiques vers des URLs spécifiques";

Loading…
Cancel
Save