Fix coing style issues

This commit is contained in:
Dmitrii Metelkin 2016-08-18 23:30:58 +10:00
parent 2a6a429b0a
commit be13e8b069
4 changed files with 6 additions and 7 deletions

View file

@ -56,7 +56,7 @@ class auth_plugin_userkey extends auth_plugin_base {
'mappingfield' => self::DEFAULT_MAPPING_FIELD, 'mappingfield' => self::DEFAULT_MAPPING_FIELD,
'keylifetime' => 60, 'keylifetime' => 60,
'iprestriction' => 0, '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 $config
* @param object $err * @param object $err
* @param array $userfields
*/ */
public function config_form($config, $err, $user_fields) { public function config_form($config, $err, $userfields) {
global $CFG, $OUTPUT;
$config = (object) array_merge($this->defaults, (array) $config ); $config = (object) array_merge($this->defaults, (array) $config );
include("settings.html"); include("settings.html");
} }

View file

@ -322,7 +322,6 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
$this->auth->validate_form($form, $err); $this->auth->validate_form($form, $err);
$this->assertEquals('User key life time should be a number.', $err['keylifetime']); $this->assertEquals('User key life time should be a number.', $err['keylifetime']);
$form->keylifetime = '0'; $form->keylifetime = '0';
$err = array(); $err = array();
$this->auth->validate_form($form, $err); $this->auth->validate_form($form, $err);

View file

@ -200,7 +200,7 @@ class auth_userkey_externallib_testcase extends advanced_testcase {
$CFG->auth = "userkey"; $CFG->auth = "userkey";
$context = context_system::instance(); $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); assign_capability('auth/userkey:generatekey', CAP_ALLOW, $studentrole->id, $context->id);
role_assign($studentrole->id, $this->user->id, $context->id); role_assign($studentrole->id, $this->user->id, $context->id);

View file

@ -26,6 +26,6 @@ defined('MOODLE_INTERNAL') || die;
$plugin->version = 2016081600; // The current plugin version (Date: YYYYMMDDXX) $plugin->version = 2016081600; // The current plugin version (Date: YYYYMMDDXX)
$plugin->release = 2016081600; // Match release exactly to version. $plugin->release = 2016081600; // Match release exactly to version.
$plugin->requires = 2015051100; // Requires this Moodle version $plugin->requires = 2015051100; // Requires this Moodle version.
$plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics) $plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE; $plugin->maturity = MATURITY_STABLE;