MDL-71017 tool_oauth2: show not configured services
This commit is contained in:
@@ -53,7 +53,6 @@ class renderer extends plugin_renderer_base {
|
||||
$table = new html_table();
|
||||
$table->head = [
|
||||
get_string('name'),
|
||||
get_string('configuredstatus', 'tool_oauth2'),
|
||||
get_string('issuerusedforlogin', 'tool_oauth2'),
|
||||
get_string('issuerdisplayas', 'tool_oauth2'),
|
||||
get_string('issuerusedforinternal', 'tool_oauth2'),
|
||||
@@ -86,31 +85,29 @@ class renderer extends plugin_renderer_base {
|
||||
$namecell = new html_table_cell($name);
|
||||
$namecell->header = true;
|
||||
|
||||
// Configured.
|
||||
if ($issuer->is_configured()) {
|
||||
$configured = $this->pix_icon('yes', get_string('configured', 'tool_oauth2'), 'tool_oauth2');
|
||||
} else {
|
||||
$configured = $this->pix_icon('no', get_string('notconfigured', 'tool_oauth2'), 'tool_oauth2');
|
||||
}
|
||||
$configuredstatuscell = new html_table_cell($configured);
|
||||
|
||||
// Login issuer.
|
||||
if ((int)$issuer->get('showonloginpage') != issuer::SERVICEONLY) {
|
||||
$loginissuer = $this->pix_icon('yes', get_string('loginissuer', 'tool_oauth2'), 'tool_oauth2');
|
||||
$logindisplayas = s($issuer->get_display_name());
|
||||
} else {
|
||||
if ((int)$issuer->get('showonloginpage') == issuer::SERVICEONLY) {
|
||||
$loginissuer = $this->pix_icon('no', get_string('notloginissuer', 'tool_oauth2'), 'tool_oauth2');
|
||||
$logindisplayas = '';
|
||||
} else {
|
||||
$logindisplayas = s($issuer->get_display_name());
|
||||
if ($issuer->is_available_for_login()) {
|
||||
$loginissuer = $this->pix_icon('yes', get_string('loginissuer', 'tool_oauth2'), 'tool_oauth2');
|
||||
} else {
|
||||
$loginissuer = $this->pix_icon('notconfigured', get_string('notconfigured', 'tool_oauth2'), 'tool_oauth2');
|
||||
}
|
||||
}
|
||||
$loginissuerstatuscell = new html_table_cell($loginissuer);
|
||||
|
||||
// Internal services issuer.
|
||||
if ((int)$issuer->get('showonloginpage') != issuer::LOGINONLY) {
|
||||
$loginissuer = $this->pix_icon('yes', get_string('loginissuer', 'tool_oauth2'), 'tool_oauth2');
|
||||
if ((int)$issuer->get('showonloginpage') == issuer::LOGINONLY) {
|
||||
$serviceissuer = $this->pix_icon('no', get_string('notloginissuer', 'tool_oauth2'), 'tool_oauth2');
|
||||
} else if ($issuer->is_configured() && $issuer->get('enabled')) {
|
||||
$serviceissuer = $this->pix_icon('yes', get_string('loginissuer', 'tool_oauth2'), 'tool_oauth2');
|
||||
} else {
|
||||
$loginissuer = $this->pix_icon('no', get_string('notloginissuer', 'tool_oauth2'), 'tool_oauth2');
|
||||
$serviceissuer = $this->pix_icon('caution', get_string('notconfigured', 'tool_oauth2'), 'tool_oauth2');
|
||||
}
|
||||
$internalissuerstatuscell = new html_table_cell($loginissuer);
|
||||
$internalissuerstatuscell = new html_table_cell($serviceissuer);
|
||||
|
||||
// Discovered.
|
||||
if (!empty($issuer->get('scopessupported'))) {
|
||||
@@ -198,7 +195,6 @@ class renderer extends plugin_renderer_base {
|
||||
|
||||
$row = new html_table_row([
|
||||
$namecell,
|
||||
$configuredstatuscell,
|
||||
$loginissuerstatuscell,
|
||||
$logindisplayas,
|
||||
$internalissuerstatuscell,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFA500;}
|
||||
</style>
|
||||
<path class="st0" d="M9.1,12.9v-1.7c0-0.1,0-0.2-0.1-0.2s-0.1-0.1-0.2-0.1H7.2c-0.1,0-0.1,0-0.2,0.1s-0.1,0.1-0.1,0.2v1.7
|
||||
c0,0.1,0,0.2,0.1,0.2s0.1,0.1,0.2,0.1h1.7c0.1,0,0.1,0,0.2-0.1S9.1,13,9.1,12.9z M9.1,9.5l0.2-4.1c0-0.1,0-0.1-0.1-0.2
|
||||
C9.1,5.2,9,5.2,9,5.2H7c-0.1,0-0.1,0-0.2,0.1c-0.1,0-0.1,0.1-0.1,0.2l0.2,4.1c0,0.1,0,0.1,0.1,0.1c0.1,0,0.1,0.1,0.2,0.1h1.6
|
||||
c0.1,0,0.2,0,0.2-0.1C9.1,9.7,9.1,9.6,9.1,9.5z M9,1.3l6.8,12.5c0.2,0.4,0.2,0.7,0,1.1c-0.1,0.2-0.2,0.3-0.4,0.4s-0.4,0.2-0.6,0.2
|
||||
H1.2c-0.2,0-0.4-0.1-0.6-0.2S0.3,15,0.2,14.9c-0.2-0.4-0.2-0.7,0-1.1L7,1.3c0.1-0.2,0.2-0.3,0.4-0.4S7.8,0.7,8,0.7s0.4,0.1,0.6,0.2
|
||||
C8.8,0.9,8.9,1.1,9,1.3z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user