Skip to content

Commit

Permalink
MDL-55528 core_files: Create new fileconverter plugintype
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Mar 10, 2017
1 parent 29ce005 commit 34df779
Show file tree
Hide file tree
Showing 19 changed files with 2,411 additions and 20 deletions.
13 changes: 13 additions & 0 deletions admin/settings/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,19 @@
300, PARAM_INT, 10));
$ADMIN->add('mediaplayers', $temp);

// Convert plugins.
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
$temp = new admin_settingpage('managefileconverterplugins', new lang_string('type_fileconverter', 'plugin'));
$temp->add(new admin_setting_manage_fileconverter_plugins());
$ADMIN->add('fileconverterplugins', $temp);

$plugins = core_plugin_manager::instance()->get_plugins_of_type('fileconverter');
core_collator::asort_objects_by_property($plugins, 'displayname');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\media $plugin */
$plugin->load_settings($ADMIN, 'fileconverterplugins', $hassiteconfig);
}

$plugins = core_plugin_manager::instance()->get_plugins_of_type('media');
core_collator::asort_objects_by_property($plugins, 'displayname');
foreach ($plugins as $plugin) {
Expand Down
17 changes: 11 additions & 6 deletions admin/templates/setting_manage_plugins.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,33 @@
{{info}}
</td>
{{/infocolumnname}}
<td>
<td class="text-nowrap">
{{#moveuplink}}
<a href="{{{moveuplink}}}">
{{#moveupicon}}{{>core/pix_icon}}{{/moveupicon}}
{{#pix}}t/up, moodle, {{#str}} up, moodle {{/str}}{{/pix}}
</a>
{{/moveuplink}}
{{^moveuplink}}
{{#spacericon}}{{>core/pix_icon}}{{/spacericon}}
{{#pix}}spacer, moodle{{/pix}}
{{/moveuplink}}

{{#movedownlink}}
<a href="{{{movedownlink}}}">
{{#movedownicon}}{{>core/pix_icon}}{{/movedownicon}}
{{#pix}}t/down, moodle, {{#str}} down, moodle {{/str}}{{/pix}}
</a>
{{/movedownlink}}
{{^movedownlink}}
{{#spacericon}}{{>core/pix_icon}}{{/spacericon}}
{{#pix}}spacer, moodle{{/pix}}
{{/movedownlink}}
</td>
<td>
<a href="{{{togglelink}}}">
{{#toggleicon}}{{>core/pix_icon}}{{/toggleicon}}
{{#toggletarget}}
{{#pix}}i/show, moodle, {{#str}} enable, moodle {{/str}}{{/pix}}
{{/toggletarget}}
{{^toggletarget}}
{{#pix}}i/hide, moodle, {{#str}} disable, moodle {{/str}}{{/pix}}
{{/toggletarget}}
</a>
</td>
<td>
Expand Down
Loading

0 comments on commit 34df779

Please sign in to comment.