Skip to content

Commit

Permalink
Add "Tested On" Meta in snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
Menrath committed Feb 6, 2025
1 parent 2cc08cf commit 2007065
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion amd/build/snippetsdetailsmodal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/snippetsdetailsmodal.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions amd/src/snippetsdetailsmodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const buildModal = async(element) => {
goalbadge: element.getAttribute('data-goal-badge'),
scopebadge: element.getAttribute('data-scope-badge'),
creator: element.getAttribute('data-creator'),
testedon: element.getAttribute('data-testedon'),
usagenote: element.getAttribute('data-usagenote'),
id: element.getAttribute('data-id'),
code: element.getAttribute('data-code'),
Expand Down
2 changes: 2 additions & 0 deletions classes/snippets.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class snippets {
'Scope',
'Creator',
'Usage note',
'Tested on',
];

/**
Expand Down Expand Up @@ -230,6 +231,7 @@ public static function get_snippet_meta($path, $source): stdClass|null {
$snippet->goal = $headers['Goal'];
$snippet->creator = $headers['Creator'];
$snippet->usagenote = $headers['Usage note'];
$snippet->testedon = $headers['Tested on'];
$snippet->source = $source;
$snippet->image = $image;

Expand Down
1 change: 1 addition & 0 deletions classes/table/snippets_overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ public function col_actions($data) {
'data-description' => $data->description,
'data-creator' => $data->creator,
'data-usagenote' => $data->usagenote,
'data-testedon' => $data->testedon,
'data-image' => $data->image,
'data-id' => $data->id,
'data-code' => snippets::get_snippet_scss($data->path, $data->source),
Expand Down
1 change: 1 addition & 0 deletions lang/en/theme_boost_union.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

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

// Settings: General warnings.
$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.';
Expand Down
1 change: 1 addition & 0 deletions snippets/builtin/rainbow_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Goal: eyecandy
* 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.
* Creator: Nils Promer and Alexander Brehm
* Tested on: Moodle 4.5, Firefox for Linux
*
* @copyright 2024 University of Applied Science Hamburg
* @author Nils Promer <[email protected]>, Alexander Brehm <[email protected]
Expand Down
1 change: 1 addition & 0 deletions snippets/builtin/site_policy_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Goal: easeofuse
* 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.
* Creator: Heba Amer
* Tested on: Moodle 4.5, Firefox for Linux
*
* @copyright 2024 The American University in Cairo, based on pre-existing work by lern.link
* @author Heba Amer <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions snippets/builtin/visual_depth.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Goal: eyecandy
* 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.
* Creator: Nils Promer
* Tested on: Moodle 4.5, Firefox for Linux
*
* @copyright 2024 University of Applied Science Hamburg
* @author Nils Promer <[email protected]>
Expand Down
6 changes: 6 additions & 0 deletions templates/snippetsdetailsmodal.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
<td>{{{scopebadge}}}</td>
</tr>
{{/scopebadge}}
{{#testedon}}
<tr>
<th scope="row">{{#str}}snippetstestedon, theme_boost_union{{/str}}</th>
<td>{{{testedon}}}</td>
</tr>
{{/testedon}}
</tbody>
</table>
{{#code}}
Expand Down

0 comments on commit 2007065

Please sign in to comment.