diff --git a/backup/moodle2/backup_datalynx_activity_task.class.php b/backup/moodle2/backup_datalynx_activity_task.class.php index 7135d2a6..2cb3dcdb 100644 --- a/backup/moodle2/backup_datalynx_activity_task.class.php +++ b/backup/moodle2/backup_datalynx_activity_task.class.php @@ -75,7 +75,7 @@ protected function define_my_steps() { * Code the transformations to perform in the activity in * order to get transportable (encoded) links */ - static public function encode_content_links($content) { + public static function encode_content_links($content) { global $CFG; $base = preg_quote($CFG->wwwroot, "/"); diff --git a/backup/moodle2/restore_datalynx_activity_task.class.php b/backup/moodle2/restore_datalynx_activity_task.class.php index 13328693..41d3122b 100644 --- a/backup/moodle2/restore_datalynx_activity_task.class.php +++ b/backup/moodle2/restore_datalynx_activity_task.class.php @@ -140,7 +140,7 @@ protected function define_my_steps() { * Define the contents in the activity that must be * processed by the link decoder */ - static public function define_decode_contents() { + public static function define_decode_contents() { $contents = array(); $contents[] = new restore_decode_content('datalynx', array('intro'), 'datalynx'); @@ -160,7 +160,7 @@ static public function define_decode_contents() { * Define the decoding rules for links belonging * to the activity to be executed by the link decoder */ - static public function define_decode_rules() { + public static function define_decode_rules() { $rules = array(); $rules[] = new restore_decode_rule('DFINDEX', '/mod/datalynx/index.php?id=$1', 'course'); @@ -200,7 +200,7 @@ static public function define_decode_rules() { * It must return one array * of {@link restore_log_rule} objects */ - static public function define_restore_log_rules() { + public static function define_restore_log_rules() { $rules = array(); $rules[] = new restore_log_rule('datalynx', 'add', @@ -250,7 +250,7 @@ static public function define_restore_log_rules() { * by the restore final task, but are defined here at * activity level. All them are rules not linked to any module instance (cmid = 0) */ - static public function define_restore_log_rules_for_course() { + public static function define_restore_log_rules_for_course() { $rules = array(); $rules[] = new restore_log_rule('datalynx', 'view all', 'index.php?id={course}', null); diff --git a/behavior/behavior_form.php b/behavior/behavior_form.php index 5631fe14..7ff4b8ba 100644 --- a/behavior/behavior_form.php +++ b/behavior/behavior_form.php @@ -158,7 +158,7 @@ public function get_teammemberselect_fields(): array { public function get_allusers() { global $DB; $allusers = []; - $tempusers = $DB->get_records('user', array(), '', $fields='id, firstname, lastname'); + $tempusers = $DB->get_records('user', array(), '', $fields = 'id, firstname, lastname'); foreach($tempusers as $userdata) { // Remove empties to make list more usable. diff --git a/classes/event/course_module_instance_list_viewed.php b/classes/event/course_module_instance_list_viewed.php index 6259e7db..7363b576 100644 --- a/classes/event/course_module_instance_list_viewed.php +++ b/classes/event/course_module_instance_list_viewed.php @@ -24,4 +24,4 @@ defined('MOODLE_INTERNAL') or die(); class course_module_instance_list_viewed extends \core\event\course_module_instance_list_viewed { -} \ No newline at end of file +} diff --git a/classes/event/course_module_viewed.php b/classes/event/course_module_viewed.php index 276f7163..ff9f5e7a 100644 --- a/classes/event/course_module_viewed.php +++ b/classes/event/course_module_viewed.php @@ -29,4 +29,4 @@ protected function init() { $this->data['objecttable'] = 'datalynx'; parent::init(); } -} \ No newline at end of file +} diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index a170f145..9a92888a 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -409,4 +409,4 @@ protected static function sql_fields() { de.approved AS entryapproved, de.groupid AS entrygroupid, de.userid AS entryuserid'; } -} \ No newline at end of file +} diff --git a/db/services.php b/db/services.php index 0bd874f8..ea43f771 100644 --- a/db/services.php +++ b/db/services.php @@ -24,4 +24,4 @@ defined('MOODLE_INTERNAL') or die(); -$functions = array(); \ No newline at end of file +$functions = array(); diff --git a/entries_class.php b/entries_class.php index 009f4be1..3d2b951f 100644 --- a/entries_class.php +++ b/entries_class.php @@ -595,14 +595,14 @@ public function process_entries(string $action, string $eids, $data = null, bool ) { unset($entries[$eid]); $capname = get_string('datalynx:approve', 'mod_datalynx'); - $errorstring .= get_string('missingrequiredcapability', 'webservice', $capname) ; + $errorstring .= get_string('missingrequiredcapability', 'webservice', $capname); $errorstring .= get_string('affectedid', 'mod_datalynx', $eid) . '
'; // Filter managable entries. } else { if (!$dl->user_can_manage_entry($entry)) { unset($entries[$eid]); $capname = get_string('updateentry', 'mod_datalynx'); - $errorstring .= get_string('missingrequiredcapability', 'webservice', $capname) ; + $errorstring .= get_string('missingrequiredcapability', 'webservice', $capname); $errorstring .= get_string('affectedid', 'mod_datalynx', $eid) . '
'; } } diff --git a/field/_approve/version.php b/field/_approve/version.php index ed08cfe6..3df34cbb 100644 --- a/field/_approve/version.php +++ b/field/_approve/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield__approve'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/_comment/version.php b/field/_comment/version.php index b1926795..82f68058 100644 --- a/field/_comment/version.php +++ b/field/_comment/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield__comment'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/_entry/version.php b/field/_entry/version.php index 1325be77..4d0545e7 100644 --- a/field/_entry/version.php +++ b/field/_entry/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield__entry'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/_rating/version.php b/field/_rating/version.php index abf2edef..3a362cad 100644 --- a/field/_rating/version.php +++ b/field/_rating/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield__rating'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/_status/version.php b/field/_status/version.php index 777c0c31..99083554 100644 --- a/field/_status/version.php +++ b/field/_status/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield__status'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/_time/version.php b/field/_time/version.php index 3f8986a5..82ccac1f 100644 --- a/field/_time/version.php +++ b/field/_time/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield__time'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/checkbox/classes/privacy/provider.php b/field/checkbox/classes/privacy/provider.php index 75f60455..210d543e 100644 --- a/field/checkbox/classes/privacy/provider.php +++ b/field/checkbox/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/checkbox/version.php b/field/checkbox/version.php index 93bb2da0..5c48cbba 100644 --- a/field/checkbox/version.php +++ b/field/checkbox/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_checkbox'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/coursegroup/classes/privacy/provider.php b/field/coursegroup/classes/privacy/provider.php index 819d1b48..39207855 100644 --- a/field/coursegroup/classes/privacy/provider.php +++ b/field/coursegroup/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/coursegroup/version.php b/field/coursegroup/version.php index d07311fd..4a466b90 100644 --- a/field/coursegroup/version.php +++ b/field/coursegroup/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_coursegroup'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/datalynxview/classes/privacy/provider.php b/field/datalynxview/classes/privacy/provider.php index fe33243c..6e198b2f 100644 --- a/field/datalynxview/classes/privacy/provider.php +++ b/field/datalynxview/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/datalynxview/renderer.php b/field/datalynxview/renderer.php index 61d88de1..a4edbcd9 100644 --- a/field/datalynxview/renderer.php +++ b/field/datalynxview/renderer.php @@ -295,7 +295,7 @@ public function render_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array $entryid = $entry->id; $fieldname = "field_{$fieldid}_$entryid"; $classname = "datalynxview_{$fieldid}_{$entryid}"; - $required = !empty($options ['required']); + $required = !empty($options['required']); $selected = !empty($entry->{"c{$fieldid}_content"}) ? $entry->{"c{$fieldid}_content"} : array(); // A hidden field is added to autocomplete fields by parent Quickform element. diff --git a/field/datalynxview/version.php b/field/datalynxview/version.php index d5f95511..65060cf7 100644 --- a/field/datalynxview/version.php +++ b/field/datalynxview/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_datalynxview'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/duration/classes/privacy/provider.php b/field/duration/classes/privacy/provider.php index c0dbbb07..c264bf65 100644 --- a/field/duration/classes/privacy/provider.php +++ b/field/duration/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/duration/version.php b/field/duration/version.php index 54b024aa..d82f3453 100644 --- a/field/duration/version.php +++ b/field/duration/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_duration'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/editor/classes/privacy/provider.php b/field/editor/classes/privacy/provider.php index d0de23a6..eeebb32a 100644 --- a/field/editor/classes/privacy/provider.php +++ b/field/editor/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/editor/version.php b/field/editor/version.php index 29c8c246..3bc904d3 100644 --- a/field/editor/version.php +++ b/field/editor/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_editor'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/entryauthor/classes/privacy/provider.php b/field/entryauthor/classes/privacy/provider.php index 700ddfa2..f7a2df30 100644 --- a/field/entryauthor/classes/privacy/provider.php +++ b/field/entryauthor/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/entryauthor/version.php b/field/entryauthor/version.php index 5ca18f5f..a03fb933 100644 --- a/field/entryauthor/version.php +++ b/field/entryauthor/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield_entryauthor'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/entrygroup/classes/privacy/provider.php b/field/entrygroup/classes/privacy/provider.php index e8b6be88..f01fc720 100644 --- a/field/entrygroup/classes/privacy/provider.php +++ b/field/entrygroup/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/entrygroup/version.php b/field/entrygroup/version.php index 1884d173..209de54e 100644 --- a/field/entrygroup/version.php +++ b/field/entrygroup/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_entrygroup'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/field_class.php b/field/field_class.php index e26c2a58..83745c77 100644 --- a/field/field_class.php +++ b/field/field_class.php @@ -892,7 +892,7 @@ public function options_menu($forceget = false, $addnoselection = false) { * @param array $map * @return mixed */ - public abstract function update_options($map = array()); + abstract public function update_options($map = array()); /** * When an option from a single/multi choice is deleted / renamed or added @@ -935,7 +935,7 @@ public function set_field($forminput = null) { unset($newvalues[$id]); } } - + // NOTE: We don't use this code ever, test till 30.04.2021 and remove after. if ($this->field->type != "multiselect") { $dummyentry = "0"; @@ -1324,7 +1324,7 @@ public function get_disabled_values_for_user($entryid = 0) { AND de.id != :entryid GROUP BY dc.content HAVING COUNT(dc.id) >= :selectlimit"; - $params = array('dataid' => $this->df->id(), 'fieldid' => $this->field->id, + $params = array('dataid' => $this->df->id(), 'fieldid' => $this->field->id, 'selectlimit' => $this->field->param5, 'entryid' => $entryid); $results = $DB->get_records_sql($sql, $params); diff --git a/field/fieldgroup/renderer.php b/field/fieldgroup/renderer.php index c3347d93..83c9ccb5 100644 --- a/field/fieldgroup/renderer.php +++ b/field/fieldgroup/renderer.php @@ -42,7 +42,7 @@ class datalynxfield_fieldgroup_renderer extends datalynxfield_renderer { */ public function render_display_mode(stdClass $entry, array $params) { global $OUTPUT; - + // We want to display these fields. $fieldgroupfields = $this->get_subfields(); @@ -190,7 +190,7 @@ public function render_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array // Hide unused lines. global $PAGE; - $PAGE->requires->js_call_amd('mod_datalynx/fieldgroups', 'init', + $PAGE->requires->js_call_amd('mod_datalynx/fieldgroups', 'init', array($this->_field->field->name, $defaultlines, $maxlines, $requiredlines, $fieldname)); // Show a button to add one more line. diff --git a/field/fieldgroup/version.php b/field/fieldgroup/version.php index 332679ef..8d006dec 100644 --- a/field/fieldgroup/version.php +++ b/field/fieldgroup/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_fieldgroup'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/file/classes/privacy/provider.php b/field/file/classes/privacy/provider.php index 4359aebd..48e063d5 100644 --- a/field/file/classes/privacy/provider.php +++ b/field/file/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/file/version.php b/field/file/version.php index 0cb9b92a..797540b8 100644 --- a/field/file/version.php +++ b/field/file/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_file'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/gradeitem/classes/privacy/provider.php b/field/gradeitem/classes/privacy/provider.php index 9bcfabcc..2ac683b0 100644 --- a/field/gradeitem/classes/privacy/provider.php +++ b/field/gradeitem/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/gradeitem/version.php b/field/gradeitem/version.php index 14493b50..da6f79d5 100644 --- a/field/gradeitem/version.php +++ b/field/gradeitem/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_gradeitem'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/identifier/classes/privacy/provider.php b/field/identifier/classes/privacy/provider.php index 2949593d..fa21e695 100644 --- a/field/identifier/classes/privacy/provider.php +++ b/field/identifier/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/identifier/version.php b/field/identifier/version.php index 0fe0c5ed..aafc6c84 100644 --- a/field/identifier/version.php +++ b/field/identifier/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_identifier'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/multiselect/classes/privacy/provider.php b/field/multiselect/classes/privacy/provider.php index 5ad7ed7c..972b1af1 100644 --- a/field/multiselect/classes/privacy/provider.php +++ b/field/multiselect/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/multiselect/version.php b/field/multiselect/version.php index 555393e1..4b944f09 100644 --- a/field/multiselect/version.php +++ b/field/multiselect/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_multiselect'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/number/classes/privacy/provider.php b/field/number/classes/privacy/provider.php index d9defaa4..df56073a 100644 --- a/field/number/classes/privacy/provider.php +++ b/field/number/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/number/version.php b/field/number/version.php index 046e82b5..28cfee04 100644 --- a/field/number/version.php +++ b/field/number/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_number'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/picture/classes/privacy/provider.php b/field/picture/classes/privacy/provider.php index 2dcd4643..b41c75c7 100644 --- a/field/picture/classes/privacy/provider.php +++ b/field/picture/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/picture/field_form.php b/field/picture/field_form.php index 5c2e9a05..345ae42d 100644 --- a/field/picture/field_form.php +++ b/field/picture/field_form.php @@ -34,7 +34,7 @@ public function field_definition() { global $CFG; $mform = &$this->_form; - + // Accepted types. $this->filetypes_definition(); @@ -96,13 +96,13 @@ public function field_definition() { array('param10' => array(array(null, 'numeric', null, 'client')))); $mform->setDefault('param9', ''); $mform->setDefault('param10', ''); - + // Clean up the user interface. $mform->hideIf('dispdim', 'param3', 'eq', 'audio'); $mform->hideIf('maxpicdim', 'param3', 'eq', 'audio'); $mform->hideIf('thumbnaildim', 'param3', 'eq', 'audio'); $mform->hideIf('thumbnaildim', 'param3', 'eq', 'video'); - + } /** diff --git a/field/picture/renderer.php b/field/picture/renderer.php index 128f646f..a86e2777 100644 --- a/field/picture/renderer.php +++ b/field/picture/renderer.php @@ -174,7 +174,7 @@ protected function display_file($file, $path, $altname, $params = null) { } } } - + // Extension to display and embed videos. if ($this->is_valid_video($file)) { $filename = $file->get_filename(); @@ -192,7 +192,7 @@ protected function display_file($file, $path, $altname, $params = null) { $video = html_writer::empty_tag('video controls', $videoattr); return $video; } - + // Embed Audio. if ($this->is_valid_audio($file)) { $filename = $file->get_filename(); @@ -201,7 +201,7 @@ protected function display_file($file, $path, $altname, $params = null) { $audio = html_writer::empty_tag('audio controls', $audioattr); return $audio; } - + return ''; } @@ -232,7 +232,7 @@ public function is_valid_video($file) { } return true; } - + /** * Verifies the file is a valid audio file based on simplified is_valid_image. * @return bool true if file ok diff --git a/field/picture/version.php b/field/picture/version.php index 3b4752b0..bc83332c 100644 --- a/field/picture/version.php +++ b/field/picture/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_picture'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/radiobutton/classes/privacy/provider.php b/field/radiobutton/classes/privacy/provider.php index 0dbb19ea..41e46b80 100644 --- a/field/radiobutton/classes/privacy/provider.php +++ b/field/radiobutton/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/radiobutton/renderer.php b/field/radiobutton/renderer.php index cf913ce6..2606f666 100644 --- a/field/radiobutton/renderer.php +++ b/field/radiobutton/renderer.php @@ -50,7 +50,7 @@ public function render_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array if (!$selected and $defaultval = $field->get('param2')) { $selected = (int) array_search($defaultval, $menuoptions); } - + $separator = $field->separators[0]['chr']; $param2 = (int) $field->get('param2'); if (isset($param2) && array_key_exists($param2, $field->separators)) { diff --git a/field/radiobutton/version.php b/field/radiobutton/version.php index 8cd0d7cf..172f60e6 100644 --- a/field/radiobutton/version.php +++ b/field/radiobutton/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_radiobutton'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/renderer.php b/field/renderer.php index 75059f2d..527408ff 100644 --- a/field/renderer.php +++ b/field/renderer.php @@ -260,7 +260,7 @@ public function render_display_mode(stdClass $entry, array $options) { * @param array $options rendering options * @see datalynxfield_renderer::render_edit_mode */ - public final function prerender_edit_mode(MoodleQuickForm &$mform, stdClass $entry, + final public function prerender_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array $options) { if ($options['editable']) { if (isset($options['template']) && strpos($options['template'], '#input') !== false) { @@ -352,7 +352,7 @@ public function render_search_mode(MoodleQuickForm &$mform, $i = 0, $value = '') /** */ - public final function get_menu($showall = false) { + final public function get_menu($showall = false) { // The default menu category for fields. $patternsmenu = array(); foreach ($this->patterns() as $tag => $pattern) { diff --git a/field/select/classes/privacy/provider.php b/field/select/classes/privacy/provider.php index 6a6b3d03..8d6d0d88 100644 --- a/field/select/classes/privacy/provider.php +++ b/field/select/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/select/version.php b/field/select/version.php index b5b431ba..360a1088 100644 --- a/field/select/version.php +++ b/field/select/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_select'; $plugin->version = 2016111900; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/tag/classes/privacy/provider.php b/field/tag/classes/privacy/provider.php index 094887d5..12de278a 100644 --- a/field/tag/classes/privacy/provider.php +++ b/field/tag/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/tag/renderer.php b/field/tag/renderer.php index 6006a81c..6bcf85ad 100644 --- a/field/tag/renderer.php +++ b/field/tag/renderer.php @@ -62,7 +62,7 @@ public function render_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array */ public function render_display_mode(stdClass $entry, array $params) { global $OUTPUT; - + $str = ''; $field = $this->_field; $fieldid = $field->id(); diff --git a/field/tag/version.php b/field/tag/version.php index 7f8734fd..48bc2fd4 100644 --- a/field/tag/version.php +++ b/field/tag/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_tag'; $plugin->version = 2015092203; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/teammemberselect/classes/privacy/provider.php b/field/teammemberselect/classes/privacy/provider.php index cdcaccb1..57c9125b 100644 --- a/field/teammemberselect/classes/privacy/provider.php +++ b/field/teammemberselect/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/teammemberselect/version.php b/field/teammemberselect/version.php index eb7400cc..45197c5b 100644 --- a/field/teammemberselect/version.php +++ b/field/teammemberselect/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield_teammemberselect'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/text/classes/privacy/provider.php b/field/text/classes/privacy/provider.php index b948263b..e1033927 100644 --- a/field/text/classes/privacy/provider.php +++ b/field/text/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/text/field_form.php b/field/text/field_form.php index fde14a76..b9d4c0d8 100644 --- a/field/text/field_form.php +++ b/field/text/field_form.php @@ -247,7 +247,7 @@ public function has_duplicates() { if (empty($records)) { return false; } - + return true; } } diff --git a/field/text/version.php b/field/text/version.php index f5a02ea1..587976e7 100644 --- a/field/text/version.php +++ b/field/text/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_text'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/textarea/classes/privacy/provider.php b/field/textarea/classes/privacy/provider.php index 8b4c8d81..8e0aaade 100644 --- a/field/textarea/classes/privacy/provider.php +++ b/field/textarea/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/textarea/version.php b/field/textarea/version.php index a521b57f..cf88cb59 100644 --- a/field/textarea/version.php +++ b/field/textarea/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_textarea'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/time/classes/privacy/provider.php b/field/time/classes/privacy/provider.php index db047a47..a0834cb2 100644 --- a/field/time/classes/privacy/provider.php +++ b/field/time/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/time/version.php b/field/time/version.php index 1a7d03bb..c5efecbd 100644 --- a/field/time/version.php +++ b/field/time/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_time'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/url/classes/privacy/provider.php b/field/url/classes/privacy/provider.php index 46b356a1..c2864fe3 100644 --- a/field/url/classes/privacy/provider.php +++ b/field/url/classes/privacy/provider.php @@ -39,4 +39,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/url/version.php b/field/url/version.php index 6737b1b8..f32c403a 100644 --- a/field/url/version.php +++ b/field/url/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxfield_url'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/field/userinfo/classes/privacy/provider.php b/field/userinfo/classes/privacy/provider.php index 90d79416..1b44282e 100644 --- a/field/userinfo/classes/privacy/provider.php +++ b/field/userinfo/classes/privacy/provider.php @@ -38,4 +38,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/youtube/classes/privacy/provider.php b/field/youtube/classes/privacy/provider.php index b85e064e..a1df2961 100644 --- a/field/youtube/classes/privacy/provider.php +++ b/field/youtube/classes/privacy/provider.php @@ -36,4 +36,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/field/youtube/field_class.php b/field/youtube/field_class.php index e27db39d..3c142866 100644 --- a/field/youtube/field_class.php +++ b/field/youtube/field_class.php @@ -51,7 +51,7 @@ protected function format_content($entry, array $values = null) { $fieldid = $this->field->id; $oldcontents = array(); $contents = array(); - + if (!empty($values)) { if (count($values) === 1) { $values = reset($values); @@ -60,8 +60,8 @@ protected function format_content($entry, array $values = null) { // Remove youtube prefix and only store the key. // Source: https://stackoverflow.com/questions/3392993/php-regex-to-get-youtube-video-id. parse_str( parse_url( $values, PHP_URL_QUERY ), $vars ); - $contents[] = $vars['v']; - + $contents[] = $vars['v']; + return array($contents); } } diff --git a/field/youtube/lang/en/datalynxfield_youtube.php b/field/youtube/lang/en/datalynxfield_youtube.php index 86296735..13c0f104 100644 --- a/field/youtube/lang/en/datalynxfield_youtube.php +++ b/field/youtube/lang/en/datalynxfield_youtube.php @@ -26,4 +26,4 @@ $string['heightpx'] = 'Height in pixels.'; $string['widthpx'] = 'Width in pixels.'; $string['youtubeurl'] = 'Youtube URL'; -$string['youtubeurl_help'] = 'Please enter the url of your video, for example https://www.youtube.com/watch?v=dQw4w9WgXcQ'; \ No newline at end of file +$string['youtubeurl_help'] = 'Please enter the url of your video, for example https://www.youtube.com/watch?v=dQw4w9WgXcQ'; diff --git a/field/youtube/renderer.php b/field/youtube/renderer.php index ff47d54c..0a50b665 100644 --- a/field/youtube/renderer.php +++ b/field/youtube/renderer.php @@ -43,12 +43,12 @@ public function render_edit_mode(MoodleQuickForm &$mform, stdClass $entry, array } $fieldattr = array(); $fieldattr['size'] = 45; - + $mform->addElement('text', $fieldname, null, $fieldattr); $mform->addHelpButton($fieldname, 'youtubeurl', 'datalynxfield_youtube'); // TODO: Add help string. $mform->setType($fieldname, PARAM_TEXT); - + $mform->setDefault($fieldname, $content); if ($required) { $mform->addRule($fieldname, null, 'required', null, 'client'); @@ -59,7 +59,7 @@ public function render_display_mode(stdClass $entry, array $params) { $field = $this->_field; $fieldid = $field->id(); $content = $entry->{"c{$fieldid}_content"}; - + if (isset($content)) { $width = $field->field->param1; $height = $field->field->param2; @@ -78,7 +78,7 @@ public function validate($entryid, $tags, $formdata) { $fieldid = $this->_field->id(); $formfieldname = "field_{$fieldid}_{$entryid}"; - + $errors = array(); foreach ($tags as $tag) { list(, $behavior, ) = $this->process_tag($tag); @@ -90,11 +90,11 @@ public function validate($entryid, $tags, $formdata) { } // Check for valid url. $isurl = filter_var($formdata->$formfieldname, FILTER_VALIDATE_URL); - if (!$isurl && $formdata->$formfieldname !='') { + if (!$isurl && $formdata->$formfieldname != '') { $errors[$formfieldname] = get_string('invalidurl', 'datalynx'); } } return $errors; } -} \ No newline at end of file +} diff --git a/field/youtube/version.php b/field/youtube/version.php index 5d96bf02..b3b4a9b9 100644 --- a/field/youtube/version.php +++ b/field/youtube/version.php @@ -25,4 +25,4 @@ $plugin->component = 'datalynxfield_youtube'; $plugin->version = 2021020501; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/js.php b/js.php index 3b005f58..6a442cf6 100644 --- a/js.php +++ b/js.php @@ -89,51 +89,51 @@ public function definition() { new moodle_url('/mod/datalynx/js.php', array('d' => $df->id(), 'jsedit' => 1 ))); - if (!$mform->is_cancelled()) { - if ($data = $mform->get_data()) { - $rec = new stdClass(); - $rec->js = $data->js; - $rec->jsincludes = $data->jsincludes; - $df->update($rec, get_string('jssaved', 'datalynx')); - - // Add uploaded files. - $usercontext = context_user::instance($USER->id); - $fs = get_file_storage(); - if ($files = $fs->get_area_files($usercontext->id, 'user', 'draft', $data->jsupload, - 'sortorder', false) - ) { - $filerec = new stdClass(); - $filerec->contextid = $df->context->id; - $filerec->component = 'mod_datalynx'; - $filerec->filearea = 'js'; - $filerec->filepath = '/'; - - foreach ($files as $file) { - $filerec->filename = $file->get_filename(); - $fs->create_file_from_storedfile($filerec, $file); - } - $fs->delete_area_files($usercontext->id, 'user', 'draft', $data->jsupload); - } - - $event = \mod_datalynx\event\js_saved::create( - array('context' => $df->context, 'objectid' => $df->id() - )); - $event->trigger(); + if (!$mform->is_cancelled()) { + if ($data = $mform->get_data()) { + $rec = new stdClass(); + $rec->js = $data->js; + $rec->jsincludes = $data->jsincludes; + $df->update($rec, get_string('jssaved', 'datalynx')); + + // Add uploaded files. + $usercontext = context_user::instance($USER->id); + $fs = get_file_storage(); + if ($files = $fs->get_area_files($usercontext->id, 'user', 'draft', $data->jsupload, + 'sortorder', false) + ) { + $filerec = new stdClass(); + $filerec->contextid = $df->context->id; + $filerec->component = 'mod_datalynx'; + $filerec->filearea = 'js'; + $filerec->filepath = '/'; + + foreach ($files as $file) { + $filerec->filename = $file->get_filename(); + $fs->create_file_from_storedfile($filerec, $file); } + $fs->delete_area_files($usercontext->id, 'user', 'draft', $data->jsupload); } + $event = \mod_datalynx\event\js_saved::create( + array('context' => $df->context, 'objectid' => $df->id() + )); + $event->trigger(); + } + } + $df->print_header(array('tab' => 'js', 'urlparams' => $urlparams )); $options = array('subdirs' => 0, 'maxbytes' => $COURSE->maxbytes, 'maxfiles' => 10 - ); - $draftitemid = file_get_submitted_draft_itemid('jsupload'); - file_prepare_draft_area($draftitemid, $df->context->id, 'mod_datalynx', 'js', 0, $options); - $df->data->jsupload = $draftitemid; - - $mform->set_data($df->data); - $mform->display(); - $df->print_footer(); + ); + $draftitemid = file_get_submitted_draft_itemid('jsupload'); + file_prepare_draft_area($draftitemid, $df->context->id, 'mod_datalynx', 'js', 0, $options); + $df->data->jsupload = $draftitemid; + + $mform->set_data($df->data); + $mform->display(); + $df->print_footer(); } else { defined('NO_MOODLE_COOKIES') or define('NO_MOODLE_COOKIES', true); // Session not used here. diff --git a/lib.php b/lib.php index 53147b88..799becad 100644 --- a/lib.php +++ b/lib.php @@ -510,7 +510,7 @@ function datalynx_get_file_info($browser, $areas, $course, $cm, $context, $filea */ function mod_datalynx_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) { global $CFG, $DB, $USER; - + // Check permissions, if anonymous access is allowed login user. require_course_login($course, true, $cm); diff --git a/renderer/renderer_form.php b/renderer/renderer_form.php index fd17e03b..cbc7d80f 100644 --- a/renderer/renderer_form.php +++ b/renderer/renderer_form.php @@ -231,4 +231,4 @@ public function validation($data, $files) { return $errors; } -} \ No newline at end of file +} diff --git a/rule/eventnotification/classes/privacy/provider.php b/rule/eventnotification/classes/privacy/provider.php index 7aabd94f..d5598daf 100644 --- a/rule/eventnotification/classes/privacy/provider.php +++ b/rule/eventnotification/classes/privacy/provider.php @@ -41,4 +41,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/rule/eventnotification/rule_class.php b/rule/eventnotification/rule_class.php index 9151a965..8daf13fb 100644 --- a/rule/eventnotification/rule_class.php +++ b/rule/eventnotification/rule_class.php @@ -92,10 +92,10 @@ public function trigger(\core\event\base $event) { // TODO: In else branch: combine added and removed members if notification sent to changed team. } } - + // Check if we only trigger on specific checkbox. if ($this->rule->param5) { - + // If so, test for conditions and stop sending if not met. $entryid = $entryid = $event->get_data()['objectid']; $fieldid = $this->rule->param5; @@ -108,7 +108,7 @@ public function trigger(\core\event\base $event) { if ($content->content != '#1#') { return false; } - + } $df = $this->df; @@ -223,11 +223,11 @@ private function get_recipients($authorid = 0, $entryid = 0) { $recipientids = array_merge($recipientids, $this->get_team_recipients($this->recipient['teams'], $entryid)); } - + if (isset($this->recipient['specificuserid'])) { $recipientids[] = $this->recipient['specificuserid']; } - + return array_diff(array_unique($recipientids), [0]); } diff --git a/rule/eventnotification/rule_form.php b/rule/eventnotification/rule_form.php index 0955851c..5bd9b24b 100644 --- a/rule/eventnotification/rule_form.php +++ b/rule/eventnotification/rule_form.php @@ -83,12 +83,12 @@ public function rule_definition() { /** * Get all users in moodle instance for autocomplete list. * - * @return array with userid -> firstname lastname. + * @return array with userid -> firstname lastname. * @throws coding_exception */ public function get_allusers() { global $DB; - $tempusers = $DB->get_records('user', array(), '', $fields='id, firstname, lastname'); + $tempusers = $DB->get_records('user', array(), '', $fields = 'id, firstname, lastname'); $allusers[0] = get_string('noselection', 'datalynx'); foreach($tempusers as $userdata) { @@ -100,7 +100,7 @@ public function get_allusers() { } return $allusers; } - + public function definition_after_data() { $mform = &$this->_form; $data = $this->get_submitted_data(); @@ -159,7 +159,7 @@ public function set_data($data) { if (isset($recipients['specificuserid'])) { $data->specificuserid = $recipients['specificuserid']; } - + $data->param4 = unserialize($data->param4); parent::set_data($data); } diff --git a/rule/eventnotification/version.php b/rule/eventnotification/version.php index be7ac930..0a6b0a80 100644 --- a/rule/eventnotification/version.php +++ b/rule/eventnotification/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxrule_eventnotification'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/rule/index.php b/rule/index.php index ab9e60ef..3c76d2d3 100644 --- a/rule/index.php +++ b/rule/index.php @@ -97,4 +97,4 @@ $rm->print_rule_list(); } -$df->print_footer(); \ No newline at end of file +$df->print_footer(); diff --git a/rule/rule_class.php b/rule/rule_class.php index 5d1c9dd3..6a7842aa 100644 --- a/rule/rule_class.php +++ b/rule/rule_class.php @@ -93,7 +93,7 @@ public function __construct($df = 0, $rule = 0) { * @return bool * @throws coding_exception */ - public abstract function trigger(\core\event\base $event); + abstract public function trigger(\core\event\base $event); /** * Checks if the rule triggers on the given event diff --git a/rule/rule_form.php b/rule/rule_form.php index 9ca52519..353b85dc 100644 --- a/rule/rule_form.php +++ b/rule/rule_form.php @@ -101,7 +101,7 @@ public function definition() { // If we have selected entry updated, add a new UI when the instance includes a checkbox. if($checkboxes = $this->_df->get_fields_by_type('checkbox', true)) { $checkboxes = array('0' => get_string('noselection', 'datalynx')) + $checkboxes; - $mform->addElement('select', 'param5', get_string('triggerspecificevent', 'datalynxrule_eventnotification'), $checkboxes); + $mform->addElement('select', 'param5', get_string('triggerspecificevent', 'datalynxrule_eventnotification'), $checkboxes); } $this->rule_definition(); diff --git a/statistics/statistics_class.php b/statistics/statistics_class.php index 3e91db0f..315e6355 100644 --- a/statistics/statistics_class.php +++ b/statistics/statistics_class.php @@ -195,4 +195,4 @@ private function get_count($mode, $from = 0, $to = PHP_INT_MAX) { $DB->get_field_sql($queryapproved, $params), $DB->get_field_sql($querydeleted, $params), $DB->get_field_sql($queryvisits, $params)); } -} \ No newline at end of file +} diff --git a/statistics/statistics_form.php b/statistics/statistics_form.php index ab795a4a..dfd87aa3 100644 --- a/statistics/statistics_form.php +++ b/statistics/statistics_form.php @@ -114,4 +114,4 @@ public function validation($data, $files) { return $errors; } -} \ No newline at end of file +} diff --git a/tool/downloadfiles/classes/privacy/provider.php b/tool/downloadfiles/classes/privacy/provider.php index c9ccf4de..4cd1bf5e 100644 --- a/tool/downloadfiles/classes/privacy/provider.php +++ b/tool/downloadfiles/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/tool/downloadfiles/version.php b/tool/downloadfiles/version.php index 0729a194..92d4d111 100644 --- a/tool/downloadfiles/version.php +++ b/tool/downloadfiles/version.php @@ -24,4 +24,4 @@ defined('MOODLE_INTERNAL') or die(); $plugin->component = 'datalynxtool_downloadfiles'; $plugin->version = 2017080600; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/tool/entryperuser/classes/privacy/provider.php b/tool/entryperuser/classes/privacy/provider.php index d4563f03..a6626967 100644 --- a/tool/entryperuser/classes/privacy/provider.php +++ b/tool/entryperuser/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/tool/entryperuser/version.php b/tool/entryperuser/version.php index 28dbe4e5..4e5a7533 100644 --- a/tool/entryperuser/version.php +++ b/tool/entryperuser/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxtool_entryperuser'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/view/csv/classes/privacy/provider.php b/view/csv/classes/privacy/provider.php index 5f1c731e..0c131012 100644 --- a/view/csv/classes/privacy/provider.php +++ b/view/csv/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/view/csv/version.php b/view/csv/version.php index fc18f73b..48a5676c 100644 --- a/view/csv/version.php +++ b/view/csv/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxview_csv'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/view/grid/classes/privacy/provider.php b/view/grid/classes/privacy/provider.php index bbc5efe8..d7be952c 100644 --- a/view/grid/classes/privacy/provider.php +++ b/view/grid/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/view/grid/version.php b/view/grid/version.php index 65470077..5cfbf809 100644 --- a/view/grid/version.php +++ b/view/grid/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxview_grid'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/view/grid/view_class.php b/view/grid/view_class.php index 8e70408c..e6393486 100644 --- a/view/grid/view_class.php +++ b/view/grid/view_class.php @@ -89,11 +89,11 @@ public function generate_default_view() { $thisfield['name'] = $field->name(); $thisfield['tag'] = "[[{$field->name()}]]"; $thisfield['size'] = 3; // Show four elements per row, extend if necessary. - + if ($field->type == "userinfo") { $thisfield['tag'] = "##author:{$field->name()}##"; } - + $mustache['fields'][] = $thisfield; } } diff --git a/view/pdf/classes/privacy/provider.php b/view/pdf/classes/privacy/provider.php index 06b9fe86..47b38f73 100644 --- a/view/pdf/classes/privacy/provider.php +++ b/view/pdf/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/view/pdf/version.php b/view/pdf/version.php index 366113e5..9b907530 100644 --- a/view/pdf/version.php +++ b/view/pdf/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxview_pdf'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/view/tabular/classes/privacy/provider.php b/view/tabular/classes/privacy/provider.php index 2a3d6f0c..78752ba3 100644 --- a/view/tabular/classes/privacy/provider.php +++ b/view/tabular/classes/privacy/provider.php @@ -40,4 +40,4 @@ class provider implements public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/view/tabular/lang/en/datalynxview_tabular.php b/view/tabular/lang/en/datalynxview_tabular.php index cf6b674b..6c131529 100644 --- a/view/tabular/lang/en/datalynxview_tabular.php +++ b/view/tabular/lang/en/datalynxview_tabular.php @@ -25,4 +25,4 @@ $string['pluginname'] = 'Tabular'; $string['headerrow'] = 'Table with header row'; $string['table'] = 'Table design'; -$string['privacy:metadata'] = 'The tabular view does not store personal data.'; \ No newline at end of file +$string['privacy:metadata'] = 'The tabular view does not store personal data.'; diff --git a/view/tabular/version.php b/view/tabular/version.php index af7984ae..4b307c00 100644 --- a/view/tabular/version.php +++ b/view/tabular/version.php @@ -24,4 +24,4 @@ $plugin->component = 'datalynxview_tabular'; $plugin->version = 2015092200; -$plugin->requires = 2014051200; \ No newline at end of file +$plugin->requires = 2014051200; diff --git a/view/view_class.php b/view/view_class.php index a2fb6e87..227d310d 100644 --- a/view/view_class.php +++ b/view/view_class.php @@ -270,7 +270,7 @@ public function set_filter($filteroptions = true, $ignoreurl = false) { // Add all url parameters. if (!$ignoreurl && $filteroptions) { - $urloptions = $urlparams; + $urloptions = $urlparams; } if (is_array($filteroptions)) { @@ -693,7 +693,7 @@ public function set_view_tags($options) { foreach ($this->_vieweditors as $editor) { // Catch potential data mismatch. if (!isset($this->view->{"e$editor"})) { - $this->view->{"e$editor"} = NULL; + $this->view->{"e$editor"} = null; continue; } @@ -798,7 +798,7 @@ public function character_tags() { /** */ - public abstract function generate_default_view(); + abstract public function generate_default_view(); /** */ @@ -914,11 +914,11 @@ public function get_embedded_files($set = null) { /** */ - protected abstract function apply_entry_group_layout($entriesset, $name = ''); + abstract protected function apply_entry_group_layout($entriesset, $name = ''); /** */ - protected abstract function new_entry_definition($entryid = -1); + abstract protected function new_entry_definition($entryid = -1); /** * diff --git a/view/view_patterns.php b/view/view_patterns.php index 9b3586a1..59bd547d 100644 --- a/view/view_patterns.php +++ b/view/view_patterns.php @@ -81,7 +81,7 @@ public function search($text, $checkvisibility = true) { * @param string $showall * @return array */ - public final function get_menu($showall = false) { + final public function get_menu($showall = false) { // The default menu category for views. $patternsmenu = array(); foreach ($this->patterns() as $tag => $pattern) { @@ -168,8 +168,7 @@ public function get_replacements($tags = null, $entry = null, array $options = a * @param array $options * @return string */ - protected function get_regexp_replacements($tag, $entry = null, array $options = null) - { + protected function get_regexp_replacements($tag, $entry = null, array $options = null) { global $OUTPUT; $df = $this->_view->get_df();