Skip to content

Commit 2007065

Browse files
committed
Add "Tested On" Meta in snippets
1 parent 2cc08cf commit 2007065

10 files changed

+16
-2
lines changed

amd/build/snippetsdetailsmodal.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/snippetsdetailsmodal.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/snippetsdetailsmodal.js

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const buildModal = async(element) => {
7272
goalbadge: element.getAttribute('data-goal-badge'),
7373
scopebadge: element.getAttribute('data-scope-badge'),
7474
creator: element.getAttribute('data-creator'),
75+
testedon: element.getAttribute('data-testedon'),
7576
usagenote: element.getAttribute('data-usagenote'),
7677
id: element.getAttribute('data-id'),
7778
code: element.getAttribute('data-code'),

classes/snippets.php

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class snippets {
4646
'Scope',
4747
'Creator',
4848
'Usage note',
49+
'Tested on',
4950
];
5051

5152
/**
@@ -230,6 +231,7 @@ public static function get_snippet_meta($path, $source): stdClass|null {
230231
$snippet->goal = $headers['Goal'];
231232
$snippet->creator = $headers['Creator'];
232233
$snippet->usagenote = $headers['Usage note'];
234+
$snippet->testedon = $headers['Tested on'];
233235
$snippet->source = $source;
234236
$snippet->image = $image;
235237

classes/table/snippets_overview.php

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public function col_actions($data) {
242242
'data-description' => $data->description,
243243
'data-creator' => $data->creator,
244244
'data-usagenote' => $data->usagenote,
245+
'data-testedon' => $data->testedon,
245246
'data-image' => $data->image,
246247
'data-id' => $data->id,
247248
'data-code' => snippets::get_snippet_scss($data->path, $data->source),

lang/en/theme_boost_union.php

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
// Settings: General strings.
4444
$string['dontchange'] = 'Do not change anything';
45+
$string['snippetstestedon'] = 'Tested on';
4546

4647
// Settings: General warnings.
4748
$string['warningslashargumentsdisabled'] = 'Warning: The <a href="{$a->url}">slasharguments setting</a> is disabled in your Moodle configuration currently. However, this setting is required for the correct operation of the following Boost Union setting. Please enable slasharguments, otherwise the following Boost Union setting will not have any effect.';

snippets/builtin/rainbow_navbar.scss

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Goal: eyecandy
55
* Description: 17 May is a special day for the queer community - the international day against homophobia, biphobia and transphobia. This snippet changes the background of the navbar to rainbow colors to commemorate and support this special day.
66
* Creator: Nils Promer and Alexander Brehm
7+
* Tested on: Moodle 4.5, Firefox for Linux
78
*
89
* @copyright 2024 University of Applied Science Hamburg
910
* @author Nils Promer <[email protected]>, Alexander Brehm <[email protected]

snippets/builtin/site_policy_modal.scss

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Goal: easeofuse
55
* Description: Change the site policy banner which is shown at the bottom of the page when first visiting the site to a modal dialogue which is much more eye-catching and convenien for the user.
66
* Creator: Heba Amer
7+
* Tested on: Moodle 4.5, Firefox for Linux
78
*
89
* @copyright 2024 The American University in Cairo, based on pre-existing work by lern.link
910
* @author Heba Amer <[email protected]>

snippets/builtin/visual_depth.scss

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Goal: eyecandy
55
* Description: A less flat design than the original Boost theme. Realized with box-shadows on a number of page elements and a colour gradient on the page background.
66
* Creator: Nils Promer
7+
* Tested on: Moodle 4.5, Firefox for Linux
78
*
89
* @copyright 2024 University of Applied Science Hamburg
910
* @author Nils Promer <[email protected]>

templates/snippetsdetailsmodal.mustache

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@
7373
<td>{{{scopebadge}}}</td>
7474
</tr>
7575
{{/scopebadge}}
76+
{{#testedon}}
77+
<tr>
78+
<th scope="row">{{#str}}snippetstestedon, theme_boost_union{{/str}}</th>
79+
<td>{{{testedon}}}</td>
80+
</tr>
81+
{{/testedon}}
7682
</tbody>
7783
</table>
7884
{{#code}}

0 commit comments

Comments
 (0)