Skip to content

Commit

Permalink
Fix checkbox section option on old courses
Browse files Browse the repository at this point in the history
  • Loading branch information
emilevirus committed Jun 7, 2022
1 parent 20323ee commit 7a98a78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,10 +757,10 @@ protected function update_format_options($data, $sectionid = null) {
), '', 'name,id,value');
$changed = $needrebuild = false;
foreach ($defaultoptions as $key => $value) {
if (in_array($key, array('ttsectionshowactivities','ttsectiontitle')) && !$data[$key]){
$data[$key] = 0;
}
if (isset($records[$key])) {
if (in_array($key, array('ttsectionshowactivities','ttsectiontitle')) && !$data[$key]){
$data[$key] = 0;
}
if (array_key_exists($key, $data) && $records[$key]->value !== $data[$key]) {
$value = $data[$key];
if (is_array($data[$key])) {
Expand Down

0 comments on commit 7a98a78

Please sign in to comment.