Fix coing style issues
This commit is contained in:
parent
2a6a429b0a
commit
be13e8b069
4 changed files with 6 additions and 7 deletions
6
auth.php
6
auth.php
|
@ -56,7 +56,7 @@ class auth_plugin_userkey extends auth_plugin_base {
|
|||
'mappingfield' => self::DEFAULT_MAPPING_FIELD,
|
||||
'keylifetime' => 60,
|
||||
'iprestriction' => 0,
|
||||
//'createuser' => 0, // TODO: use this field when implementing user creation.
|
||||
// TODO: use this field when implementing user creation. 'createuser' => 0.
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -169,9 +169,9 @@ class auth_plugin_userkey extends auth_plugin_base {
|
|||
*
|
||||
* @param object $config
|
||||
* @param object $err
|
||||
* @param array $userfields
|
||||
*/
|
||||
public function config_form($config, $err, $user_fields) {
|
||||
global $CFG, $OUTPUT;
|
||||
public function config_form($config, $err, $userfields) {
|
||||
$config = (object) array_merge($this->defaults, (array) $config );
|
||||
include("settings.html");
|
||||
}
|
||||
|
|
|
@ -322,7 +322,6 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
|||
$this->auth->validate_form($form, $err);
|
||||
$this->assertEquals('User key life time should be a number.', $err['keylifetime']);
|
||||
|
||||
|
||||
$form->keylifetime = '0';
|
||||
$err = array();
|
||||
$this->auth->validate_form($form, $err);
|
||||
|
|
|
@ -200,7 +200,7 @@ class auth_userkey_externallib_testcase extends advanced_testcase {
|
|||
$CFG->auth = "userkey";
|
||||
|
||||
$context = context_system::instance();
|
||||
$studentrole = $DB->get_record('role', array('shortname'=>'student'), '*', MUST_EXIST);
|
||||
$studentrole = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
|
||||
assign_capability('auth/userkey:generatekey', CAP_ALLOW, $studentrole->id, $context->id);
|
||||
role_assign($studentrole->id, $this->user->id, $context->id);
|
||||
|
||||
|
|
|
@ -26,6 +26,6 @@ defined('MOODLE_INTERNAL') || die;
|
|||
|
||||
$plugin->version = 2016081600; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->release = 2016081600; // Match release exactly to version.
|
||||
$plugin->requires = 2015051100; // Requires this Moodle version
|
||||
$plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->requires = 2015051100; // Requires this Moodle version.
|
||||
$plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
|
Loading…
Reference in a new issue