Skip to content

Commit

Permalink
Code checker and release reverted, related to #9.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jul 24, 2024
1 parent 2c9c69c commit bae0b2c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
4 changes: 2 additions & 2 deletions classes/course_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function course_section_cm_text_vsf($course, cm_info $mod, $vsfavailabili
);
}
if ($mod->modname == 'folder') {
$folder = $DB->get_record('folder', array('id' => $mod->instance), 'display', MUST_EXIST);
$folder = $DB->get_record('folder', ['id' => $mod->instance], 'display', MUST_EXIST);
if ($folder->display == FOLDER_DISPLAY_INLINE) {
$modcontent = $mod->get_formatted_content(['overflowdiv' => true, 'noclean' => true]);
$output .= html_writer::tag(
Expand Down Expand Up @@ -362,7 +362,7 @@ public function course_section_cm_vsf($course, &$completioninfo, cm_info $mod, $
* @param array $displayoptions
* @return string
*/
public function course_section_cm_name(cm_info $mod, $displayoptions = array()) {
public function course_section_cm_name(cm_info $mod, $displayoptions = []) {
if (!$mod->is_visible_on_course_page() || !$mod->url) {
// Nothing to be displayed to the user.
return '';
Expand Down
23 changes: 21 additions & 2 deletions js/vsf_colourpopup.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ class MoodleQuickForm_vsfcolourpopup extends HTML_QuickForm_text implements temp
* @var string
*/
public $_helpbutton = '';

/**
* Hidden label?
*
* @var bool
*/
public $_hiddenLabel = false;

/**
* Constructor.
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null, $options = null) {
parent::__construct($elementName, $elementLabel, $attributes);
/* Pretend we are a 'static' MoodleForm element so that we get the core_form/element-static template where
Expand All @@ -64,17 +68,27 @@ public function __construct($elementName = null, $elementLabel = null, $attribut
$this->setType('static');
}

/*
* PHP4 constructor method, kept for compatibility
/**
* PHP4 constructor method, kept for compatibility.
*/
public function MoodleQuickForm_gfcolourpopup($elementName = null, $elementLabel = null, $attributes = null, $options = null) {
self::__construct($elementName, $elementLabel, $attributes, $options);
}

/**
* Set hidden label.
*
* @param bool $hiddenLabel
*/
public function setHiddenLabel($hiddenLabel) {
$this->_hiddenLabel = $hiddenLabel;
}

/**
* To HTML.
*
* @return string Markup.
*/
public function toHtml() {
global $CFG, $COURSE, $USER, $PAGE, $OUTPUT;
$id = $this->getAttribute('id');
Expand Down Expand Up @@ -148,6 +162,11 @@ public function getElementTemplateType() {
}
}

/**
* Export for template.
*
* @return array Context.
*/
public function export_for_template(renderer_base $output) {
$context = $this->export_for_template_base($output);
$context['html'] = $this->toHtml();
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
$plugin->requires = 2024042200.00; // 4.4 (Build: 20240422).
$plugin->supported = [404, 404];
$plugin->component = 'format_vsf';
$plugin->release = '4.4.0.3';
$plugin->release = '4.4.0.2';

0 comments on commit bae0b2c

Please sign in to comment.