Skip to content

Commit

Permalink
MDL-76867 core_admin: Standardise plugin management when plugin missi…
Browse files Browse the repository at this point in the history
…ng from disk
  • Loading branch information
andrewnicols committed Mar 14, 2023
1 parent 6aba049 commit 573066b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion admin/classes/table/activity_management_table.php
Expand Up @@ -70,7 +70,7 @@ protected function col_name(stdClass $row): string {
$status = $row->plugininfo->get_status();
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
return html_writer::span(
get_string('missingfromdisk'),
get_string('pluginmissingfromdisk', 'core', $row->plugininfo),
'notifyproblem'
);
}
Expand Down
8 changes: 8 additions & 0 deletions admin/classes/table/plugin_management_table.php
Expand Up @@ -275,6 +275,14 @@ public function is_downloadable($downloadable = null): bool {
* @return string
*/
protected function col_name(stdClass $row): string {
$status = $row->plugininfo->get_status();
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
return html_writer::span(
get_string('pluginmissingfromdisk', 'core', $row->plugininfo),
'notifyproblem'
);
}

if ($row->plugininfo->is_installed_and_upgraded()) {
return $row->plugininfo->displayname;
}
Expand Down
1 change: 1 addition & 0 deletions lang/en/moodle.php
Expand Up @@ -1663,6 +1663,7 @@
$string['plugindeletefiles'] = 'All data associated with the plugin \'{$a->name}\' has been deleted from the database. To prevent the plugin re-installing itself, you should now delete this directory from your server: {$a->directory}';
$string['plugincheck'] = 'Plugins check';
$string['pluginitemid'] = 'Item ID';
$string['pluginmissingfromdisk'] = '{$a->name} (Missing from disk)';
$string['pluginsetup'] = 'Setting up plugin tables';
$string['policyaccept'] = 'I understand and agree';
$string['policyagree'] = 'You must agree to this policy to continue using this site. Do you agree?';
Expand Down

0 comments on commit 573066b

Please sign in to comment.