Skip to content

Commit

Permalink
Remove section 0 from combobox
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavobazzo committed Jan 24, 2024
1 parent 8e5b94c commit aedcba5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -727,13 +727,23 @@ public function get_move_section_select($section, $moveSectionUrl){
$index = 0;
$index2 = 0;
foreach ($this->formatrecit->sectionslist as $sectiono) {
// ignore section 0
if($sectiono->section == 0){
continue;
}

if ($section->section == $sectiono->section){
break;
}
$index++;
}

foreach ($this->formatrecit->sectionslist as $sectiono) {
// ignore section 0
if($sectiono->section == 0){
continue;
}

$sectionName = $this->formatrecit->get_section_name($sectiono);
$url = sprintf($moveSectionUrl, 0-($index-$index2));
$sectionname .= "<option value='{$url}'>{$sectionName}</option>";
Expand Down
6 changes: 3 additions & 3 deletions src/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2023101900; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2023101901; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2022041900.00; // Moodle 4.0.0
$plugin->component = 'format_recit'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
$plugin->release = 'v3.1.5-stable';
$plugin->supported = [400, 410]; // Moodle 3.9.x, 3.10.x and 3.11.x are supported.
$plugin->release = 'v3.1.6-stable';
$plugin->supported = [400, 401]; // Moodle 3.9.x, 3.10.x and 3.11.x are supported.
$plugin->dependencies = [
'theme_recit2' => 2023011900
];

0 comments on commit aedcba5

Please sign in to comment.