Skip to content

Commit

Permalink
MDL-70558 tool_langimport: sort available language packs.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Jan 4, 2021
1 parent 56fd8c5 commit cbd7195
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admin/tool/langimport/classes/output/langimport_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_langimport\output;
defined('MOODLE_INTERNAL') || die();

use core_collator;
use moodle_url;
use renderable;
use renderer_base;
Expand Down Expand Up @@ -95,6 +95,8 @@ public function export_for_template(renderer_base $output) {

if (!empty($this->availablelanguages)) {
$data->toinstalloptions = [];

core_collator::asort($this->availablelanguages);
foreach ($this->availablelanguages as $code => $language) {
$option = new stdClass();
$option->value = $code;
Expand Down

0 comments on commit cbd7195

Please sign in to comment.