Skip to content

Commit

Permalink
Move injected CSS into styles CSS to remove employment of hook that u…
Browse files Browse the repository at this point in the history
…ses a deprecated method of implementation.
  • Loading branch information
gjb2048 committed May 8, 2024
1 parent 9b91daf commit 4bb3d88
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 20 deletions.
4 changes: 4 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Version Information
===================

Version 4.4.0.2
-----------------------------
1. Move injected CSS into styles CSS to remove employment of hook that uses a deprecated method of implementation.

Version 4.4.0.1
-----------------------------
1. Supports Moodle 4.4.
Expand Down
16 changes: 0 additions & 16 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,22 +725,6 @@ function format_vsf_inplace_editable($itemtype, $itemid, $newvalue) {
}
}

/**
* Drop-in replacement for theme custom CSS.
* This will inject the CSS needed for modpic/modtxt specifics.
* Since this callback is called _always_, we're not bound to use of the format.
*/
function format_vsf_before_standard_html_head() {
global $CFG;
$url = new moodle_url($CFG->wwwroot . '/course/format/vsf/injectedcss.css');
// Return CSS injection tag.
return html_writer::empty_tag('link', [
'href' => $url->out(false),
'rel' => 'stylesheet',
'type' => 'text/css',
]);
}

/**
* Add items to course navigation
*
Expand Down
2 changes: 1 addition & 1 deletion injectedcss.css → scss/_extra.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* VSF extra css - Afbeelding bij beschrijving toevoegen */
body:not(.path-course):not(.editing) .modpic,
body:not(.editing).path-course .modtxt {
display: none !important;
display: none !important; // stylelint-disable-line declaration-no-important
}
2 changes: 1 addition & 1 deletion scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -360,5 +360,5 @@
max-width: 100%;
}


@import "progress_chart";
@import "extra";
6 changes: 6 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -841,3 +841,9 @@
.format-vsf .progress-chart-container .progress-doughnut .progress-indicator svg .circle.percent-100 {
stroke-dashoffset: 0;
}

/* VSF extra css - Afbeelding bij beschrijving toevoegen */
body:not(.path-course):not(.editing) .modpic,
body:not(.editing).path-course .modtxt {
display: none !important;
}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024042700;
$plugin->version = 2024042701;
$plugin->maturity = MATURITY_BETA;
$plugin->requires = 2024042200.00; // 4.4 (Build: 20240422).
$plugin->supported = [404, 404];
$plugin->component = 'format_vsf';
$plugin->release = '4.4.0.1';
$plugin->release = '4.4.0.2';

0 comments on commit 4bb3d88

Please sign in to comment.