Skip to content

Commit ea9bbf2

Browse files
Merge pull request #123 from catalyst/bugfixes-41
Bugfixes 41
2 parents 3448b6c + 8146342 commit ea9bbf2

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

.github/workflows/ci.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
name: Run all tests for Moodle 4.0+
1+
name: ci
22

33
on: [push, pull_request]
44

55
jobs:
6-
workflow_group_40_plus_ci:
7-
uses: catalyst/catalyst-moodle-workflows/.github/workflows/group-40-plus-ci.yml@main
6+
ci:
7+
uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main
8+
with:
9+
disable_behat: true
10+
disable_grunt: true
11+
disable_phpcpd: true

lib.php

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ function observation_supports($feature) {
123123
return true;
124124
case FEATURE_BACKUP_MOODLE2:
125125
return true;
126+
// Activity plugins default this to true, so explicity set to false.
127+
// Since it is not supported by mod_observation.
128+
case FEATURE_MOD_INTRO:
129+
return false;
126130
default:
127131
return null;
128132
}

mod_form.php

+10-5
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,17 @@ public function data_preprocessing(&$defaultvalues) {
7979
}
8080

8181
// Editing, find the defaults and update the form values.
82-
$obsdata = $DB->get_record('observation', array('id' => $obsid));
82+
$obsdata = (object) $DB->get_record('observation', array('id' => $obsid));
8383

84-
$defaultvalues['observerins_editor']->text = $obsdata->observer_ins;
85-
$defaultvalues['observerins_editor']->format = $obsdata->observer_ins_f;
86-
$defaultvalues['observeeins_editor']->text = $obsdata->observee_ins;
87-
$defaultvalues['observeeins_editor']->format = $obsdata->observee_ins_f;
84+
$defaultvalues['observerins_editor'] = (object) [
85+
'text' => $obsdata->observer_ins,
86+
'format' => $obsdata->observer_ins_f
87+
];
88+
89+
$defaultvalues['observeeins_editor'] = (object) [
90+
'text' => $obsdata->observee_ins,
91+
'format' => $obsdata->observee_ins_f
92+
];
8893

8994
return;
9095
}

version.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@
3030
$plugin->requires = 2022041900;
3131
$plugin->component = 'mod_observation';
3232
$plugin->maturity = MATURITY_STABLE;
33+
$plugin->supported = [40, 41];

0 commit comments

Comments
 (0)