Skip to content

Commit 0fe65c2

Browse files
Fixed array syntax issues.
1 parent e9bc220 commit 0fe65c2

12 files changed

+27
-27
lines changed

classes/api/custom_element_parameters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class custom_element_parameters {
4242
public const CE_VALID_PARAMS = [
4343
self::CE_PARAM_NUMBER,
4444
self::CE_PARAM_BOOL,
45-
self::CE_PARAM_STRING
45+
self::CE_PARAM_STRING,
4646
];
4747

4848
/**
@@ -122,7 +122,7 @@ public function add_parameter(string $name, string $type): void {
122122
}
123123
$this->parameters[] = [
124124
'name' => $name,
125-
'type' => $type
125+
'type' => $type,
126126
];
127127
}
128128

classes/api/custom_element_requirements.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function get_plugins(): array {
129129
public function add_plugin(string $pluginid, string $pluginversion): void {
130130
$this->plugins[] = [
131131
'pluginid' => $pluginid,
132-
'pluginversion' => $pluginversion
132+
'pluginversion' => $pluginversion,
133133
];
134134
}
135135

classes/api/instance_config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function get_parameters(): array {
106106
public function add_parameter(string $name, $value): void {
107107
$this->parameters[] = [
108108
'name' => $name,
109-
'value' => $value
109+
'value' => $value,
110110
];
111111
}
112112
}

classes/form/custom_element_form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function get_iconfile_options($forform = false) {
132132

133133
if ($forform) {
134134
$opts['accepted_types'] = [
135-
'web_image'
135+
'web_image',
136136
];
137137
$opts['return_types'] = FILE_INTERNAL | FILE_EXTERNAL;
138138
}
@@ -153,7 +153,7 @@ public function get_modulefile_options($forform = false) {
153153

154154
if ($forform) {
155155
$opts['accepted_types'] = [
156-
'js'
156+
'js',
157157
];
158158
$opts['return_types'] = FILE_INTERNAL | FILE_EXTERNAL;
159159
}

classes/form/set_form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function definition() {
6262
$mform->addElement('course', 'courseids', get_string('courses'), [
6363
'multiple' => true,
6464
'includefrontpage' => true,
65-
'noselectionstring' => get_string('allcourses', 'search')
65+
'noselectionstring' => get_string('allcourses', 'search'),
6666
]);
6767

6868
$capabilityopts = [
@@ -101,7 +101,7 @@ public function get_iconfile_options($forform = false) {
101101

102102
if ($forform) {
103103
$opts['accepted_types'] = [
104-
'web_image'
104+
'web_image',
105105
];
106106
$opts['return_types'] = FILE_INTERNAL | FILE_EXTERNAL;
107107
}

classes/model/custom_element.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,14 @@ public function __construct($id, $name, $cename, $cetype, $channel, $defaulticon
164164
$murl = new \moodle_url('/local/ce/view.php', [
165165
'controller' => 'admin',
166166
'action' => 'editce',
167-
'ceid' => $this->id
167+
'ceid' => $this->id,
168168
]);
169169
$this->editurl = $murl->out(false);
170170

171171
$murl = new \moodle_url('/local/ce/view.php', [
172172
'controller' => 'admin',
173173
'action' => 'deletece',
174-
'ceid' => $this->id
174+
'ceid' => $this->id,
175175
]);
176176
$this->deleteurl = $murl->out(false);
177177

classes/model/instance.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,21 @@ public function __construct($id, $customname, $customelementid, $setid, $config,
105105
'controller' => 'admin',
106106
'action' => 'editinstance',
107107
'setid' => $this->setid,
108-
'instanceid' => $this->id
108+
'instanceid' => $this->id,
109109
]);
110110
$this->editurl = $murl->out(false);
111111

112112
$murl = new \moodle_url('/local/ce/view.php', [
113113
'controller' => 'admin',
114114
'action' => 'deleteinstance',
115115
'setid' => $this->setid,
116-
'instanceid' => $this->id
116+
'instanceid' => $this->id,
117117
]);
118118
$this->deleteurl = $murl->out(false);
119119

120120
$murl = new \moodle_url('/local/ce/view.php', [
121121
'action' => 'launch',
122-
'instanceid' => $this->id
122+
'instanceid' => $this->id,
123123
]);
124124
$this->launchurl = $murl->out(false);
125125

classes/model/set.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,21 @@ public function __construct($id, $name, $status, $defaulticon, $requiredcapabili
109109
$murl = new \moodle_url('/local/ce/view.php', [
110110
'controller' => 'admin',
111111
'action' => 'editset',
112-
'setid' => $this->id
112+
'setid' => $this->id,
113113
]);
114114
$this->editurl = $murl->out(false);
115115

116116
$murl = new \moodle_url('/local/ce/view.php', [
117117
'controller' => 'admin',
118118
'action' => 'deleteset',
119-
'setid' => $this->id
119+
'setid' => $this->id,
120120
]);
121121
$this->deleteurl = $murl->out(false);
122122

123123
$murl = new \moodle_url('/local/ce/view.php', [
124124
'controller' => 'admin',
125125
'action' => 'listinstances',
126-
'setid' => $this->id
126+
'setid' => $this->id,
127127
]);
128128
$this->instancesurl = $murl->out(false);
129129

@@ -206,7 +206,7 @@ public static function get_all_published_with_caps($caps = []) : array {
206206
$capquery .= ')';
207207

208208
$params = array_merge([
209-
'status' => self::SET_STATUS_PUBLISHED
209+
'status' => self::SET_STATUS_PUBLISHED,
210210
], $capparams);
211211

212212
$thetable = static::get_table();

controller/admin.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public function editset_action() {
283283
$courseidsparams = [
284284
'courseids' => array_map(function($setcourse) {
285285
return $setcourse->courseid;
286-
}, $setcourses)
286+
}, $setcourses),
287287
];
288288

289289
$mform->set_data((object)array_merge((array)$set, (array)$toform, $courseidsparams));
@@ -338,7 +338,7 @@ public function listinstances_action() {
338338
$newurl = new moodle_url('/local/ce/view.php', [
339339
'controller' => 'admin',
340340
'action' => 'editinstance',
341-
'setid' => $setid
341+
'setid' => $setid,
342342
]);
343343

344344
$saved = optional_param('saved', 0, PARAM_INT);
@@ -356,7 +356,7 @@ public function listinstances_action() {
356356
'instances' => $instances,
357357
'newurl' => $newurl->out(false),
358358
'setname' => $setname,
359-
'listsetsurl' => $listsetsurl
359+
'listsetsurl' => $listsetsurl,
360360
]);
361361
}
362362

@@ -372,7 +372,7 @@ public function editinstance_action() {
372372
$listinstancessmurl = new moodle_url('/local/ce/view.php', [
373373
'controller' => 'admin',
374374
'action' => 'listinstances',
375-
'setid' => $setid
375+
'setid' => $setid,
376376
]);
377377
$listinstancesurl = $listinstancessmurl->out(false);
378378
$listinstancesstr = get_string('admin_listinstances', 'local_ce');
@@ -396,7 +396,7 @@ public function editinstance_action() {
396396
$submitparams = [
397397
'controller' => 'admin',
398398
'action' => 'editinstance',
399-
'setid' => $setid
399+
'setid' => $setid,
400400
];
401401
if (!empty($instanceid)) {
402402
$submitparams['instanceid'] = $instanceid;
@@ -480,7 +480,7 @@ private function render_ce_admin_tabs($action) {
480480
'url' => $listsetsurl,
481481
'label' => $listsetsstr,
482482
],
483-
]
483+
],
484484
]);
485485
}
486486
}

lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function local_ce_add_dock_to_footer() {
113113
$currentcaps = [];
114114
$capstocheck = [
115115
'local/ce:learnerset_view',
116-
'local/ce:instructorset_view'
116+
'local/ce:instructorset_view',
117117
];
118118
// Check for caps.
119119
foreach ($capstocheck as $cap) {
@@ -137,7 +137,7 @@ function local_ce_add_dock_to_footer() {
137137
}
138138

139139
$template = $OUTPUT->render_from_template('local_ce/set_dock', (object)[
140-
'sets' => $setstorender
140+
'sets' => $setstorender,
141141
]);
142142

143143
if (!isset($CFG->additionalhtmlfooter)) {

settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
// Custom Elements management page.
5757
$urlmanagece = new moodle_url('/local/ce/view.php', [
5858
'controller' => 'admin',
59-
'action' => 'view'
59+
'action' => 'view',
6060
]);
6161
$ADMIN->add($plugin, new admin_externalpage('adminpage_view',
6262
new lang_string('adminpageheading', $plugin),

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
$plugin->cron = 0;
3333
$plugin->maturity = MATURITY_ALPHA;
3434
$plugin->dependencies = [
35-
'local_mr' => ANY_VERSION
35+
'local_mr' => ANY_VERSION,
3636
];

0 commit comments

Comments
 (0)