diff --git a/classes/external.php b/classes/external.php index 5178a65..69da7a0 100644 --- a/classes/external.php +++ b/classes/external.php @@ -453,6 +453,8 @@ public static function get_user_information($userid) { 'showtimecreated' => get_config('tool_supporter', 'user_details_showtimecreated'), 'showtimemodified' => get_config('tool_supporter', 'user_details_showtimemodified'), 'showlastlogin' => get_config('tool_supporter', 'user_details_showlastlogin'), + 'showsuspension' => get_config('tool_supporter', 'user_details_showsuspension'), + 'showauthtype' => get_config('tool_supporter', 'user_details_showauthtype'), ]; // Get level labels. @@ -492,6 +494,7 @@ public static function get_user_information_returns() { 'lang' => new external_value(PARAM_TEXT, 'lang of the user'), 'auth' => new external_value(PARAM_TEXT, 'auth of the user'), 'idnumber' => new external_value(PARAM_TEXT, 'idnumber of the user'), + 'suspended' => new external_value(PARAM_BOOL, 'suspension of the user'), ]), 'config' => new external_single_structure(( [ 'showusername' => new external_value(PARAM_BOOL, "Show username of user in user details"), @@ -502,6 +505,8 @@ public static function get_user_information_returns() { 'showtimecreated' => new external_value(PARAM_BOOL, "Show time created of user in user details"), 'showtimemodified' => new external_value(PARAM_BOOL, "Show time modified of user in user details"), 'showlastlogin' => new external_value(PARAM_BOOL, "Show last login of user in user details"), + 'showsuspension' => new external_value(PARAM_BOOL, "Show suspension status of user in user details"), + 'showauthtype' => new external_value(PARAM_BOOL, "Show auth type of user in user details"), ])), 'userscourses' => new external_multiple_structure(new external_single_structure([ 'id' => new external_value(PARAM_INT, 'id of course'), diff --git a/settings.php b/settings.php index a0d343b..2635a1a 100644 --- a/settings.php +++ b/settings.php @@ -322,4 +322,16 @@ "", 1 )); + $settings->add(new admin_setting_configcheckbox( + 'tool_supporter/user_details_showsuspension', + get_string('suspended'), + "", + 1 + )); + $settings->add(new admin_setting_configcheckbox( + 'tool_supporter/user_details_showauthtype', + get_string('authentication'), + "", + 1 + )); } diff --git a/templates/user_detail.mustache b/templates/user_detail.mustache index d742471..ee7beee 100644 --- a/templates/user_detail.mustache +++ b/templates/user_detail.mustache @@ -165,6 +165,8 @@ Example context (json): {{#showtimecreated}}