From 2301416715fe2133c735b24ba3a867cf62b26b73 Mon Sep 17 00:00:00 2001 From: Michael Milette Date: Mon, 25 Apr 2022 20:15:45 -0400 Subject: [PATCH] Contact Form is now compatible with Moodle 4.0. --- .gitignore | 182 ++++++++++++++++++++++++++++++++++- CHANGELOG.md | 8 ++ README.md | 6 +- classes/local_contact.php | 7 +- classes/privacy/provider.php | 10 +- db/upgrade.php | 40 -------- index.php | 2 +- lang/en/local_contact.php | 2 +- settings.php | 3 +- version.php | 6 +- 10 files changed, 199 insertions(+), 67 deletions(-) delete mode 100644 db/upgrade.php diff --git a/.gitignore b/.gitignore index afc140b..508eaad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,177 @@ -/lang/* -!/lang/en -*.swp -vendor -.vscode \ No newline at end of file +##### Only include English +/lang/* +!/lang/en + +##### Windows +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Windows shortcuts +*.lnk + +# Test file. +test.php + +# KDE directory preferences +.directory + +##### MacOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +##### Backup +*.bak +*.bakup +*.gho +*.old +*.ori +*.orig +*.original +*.tmp +*.temp + +# Log file - the following switch allows to specify the file that will be +# used to write all messages from simulation: -l +*.log + +##### Dropbox +# Dropbox settings and caches +.dropbox +.dropbox.attr +.dropbox.cache + +##### Vim +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +##### Emacs +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +##### SublimeText +# Cache files for Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# Workspace files are user-specific +*.sublime-workspace + +# Project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using Sublime Text +# *.sublime-project + +##### TextMate +*.tmproj +*.tmproject +tmtags + +##### VisualStudioCode +.vscode/ +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +##### NetBeans +**/nbproject/private/ +**/nbproject/Makefile-*.mk +**/nbproject/Package-*.bash +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + +##### JetBrains +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +##### Eclipse +.metadata +bin/ +tmp/ +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +##### Dreamweaver +# DW Dreamweaver added files +_notes +_compareTemp +configs/ +dwsync.xml +dw_php_codehinting.config +*.mno + +##### CodeKit +# General CodeKit files to ignore +config.codekit +config.codekit3 +/min + +##### Composer +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +##### PHP CodeSniffer +# gitignore for the PHP Codesniffer framework +# website: https://github.com/squizlabs/PHP_CodeSniffer +# +# Recommended template: PHP.gitignore + +/wpcs/* diff --git a/CHANGELOG.md b/CHANGELOG.md index 818dbed..99b4dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log All notable changes to this project will be documented in this file. +## [1.2.2] - 2022-04-25 + +### Updated +- Removed db directory as this plugin does not use any tables. +- .gitignore +- Copyright notice to 2022. +- Compatible with Moodle 3.0 to 4.0. +- ## [1.2.1] - 2021-05-23 ### Updated - Added FAQ information to the README.md on how to fix *sesskey* errors. diff --git a/README.md b/README.md index a0f5c9f..83356e5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Local Contact Form plugin for Moodle ==================================== ![PHP](https://img.shields.io/badge/PHP-v5.6%20%2F%20v7.0%20%2F%20v7.1%20%2F%207.2%20%2F%207.3%20%2F%207.4-blue.svg) -![Moodle](https://img.shields.io/badge/Moodle-v3.0%20to%20v3.10-orange.svg) +![Moodle](https://img.shields.io/badge/Moodle-v3.0%20to%20v4.0-orange.svg) [![GitHub Issues](https://img.shields.io/github/issues/michael-milette/moodle-local_contact.svg)](https://github.com/michael-milette/moodle-local_contact/issues) [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-green.svg)](#contributing) [![License](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](#license) @@ -619,7 +619,7 @@ https://github.com/michael-milette/moodle-local_contact # License -Copyright © 2016-2021 TNG Consulting Inc. - https://www.tngconsulting.ca/ +Copyright © 2016-2022 TNG Consulting Inc. - https://www.tngconsulting.ca/ This file is part of the Contact Form plugin for Moodle - https://moodle.org/plugins/local_contact/ @@ -636,4 +636,4 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Contact Form. If not, see . -[(Back to top)](#table-of-contents) \ No newline at end of file +[(Back to top)](#table-of-contents) diff --git a/classes/local_contact.php b/classes/local_contact.php index d293fb2..3bdd562 100644 --- a/classes/local_contact.php +++ b/classes/local_contact.php @@ -18,16 +18,13 @@ * This plugin for Moodle is used to send emails through a web form. * * @package local_contact - * @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca + * @copyright 2016-2022 TNG Consulting Inc. - www.tngconsulting.ca * @author Michael Milette * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - -defined('MOODLE_INTERNAL') || die(); - /** * local_contact class. Handles processing of information submitted from a web form. - * @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca + * @copyright 2016-2022 TNG Consulting Inc. - www.tngconsulting.ca * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class local_contact { diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 6071bd6..f9a0102 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -18,19 +18,15 @@ * Privacy Subsystem implementation for local_contact. * * @package local_contact - * @copyright 2015-2020 TNG Consulting Inc. - www.tngcosulting.ca + * @copyright 2015-2022 TNG Consulting Inc. - www.tngcosulting.ca * @author Michael Milette * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace local_contact\privacy; - -defined('MOODLE_INTERNAL') || die(); - /** * Privacy Subsystem for local_contact implementing null_provider. * - * @copyright 2018 TNG Consulting Inc. + * @copyright 2022 TNG Consulting Inc. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider { @@ -44,4 +40,4 @@ class provider implements \core_privacy\local\metadata\null_provider { public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/db/upgrade.php b/db/upgrade.php deleted file mode 100644 index f7b5f92..0000000 --- a/db/upgrade.php +++ /dev/null @@ -1,40 +0,0 @@ -. - -/** - * This plugin for Moodle is used to send emails through a web form. - * - * @package local_contact - * @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca - * @author Michael Milette - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -defined('MOODLE_INTERNAL') || die(); - -/** - * Upgrade code for the Contact Form local plugin. - * - * @param int $oldversion - the version we are upgrading from. - * @return bool result - */ -function xmldb_local_contact_upgrade($oldversion) { - - // Moodle v3.1.0 release upgrade line. - // Upgrade steps below. - - return true; -} \ No newline at end of file diff --git a/index.php b/index.php index df5e37d..5915a0e 100644 --- a/index.php +++ b/index.php @@ -18,7 +18,7 @@ * This plugin for Moodle is used to send emails through a web form. * * @package local_contact - * @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca + * @copyright 2016-2022 TNG Consulting Inc. - www.tngconsulting.ca * @author Michael Milette * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/lang/en/local_contact.php b/lang/en/local_contact.php index e6cb8a6..bdc6281 100644 --- a/lang/en/local_contact.php +++ b/lang/en/local_contact.php @@ -18,7 +18,7 @@ * This plugin for Moodle is used to send emails through a web form. * * @package local_contact - * @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca + * @copyright 2016-2022 TNG Consulting Inc. - www.tngconsulting.ca * @author Michael Milette * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/settings.php b/settings.php index 674404c..77b94ca 100644 --- a/settings.php +++ b/settings.php @@ -18,7 +18,7 @@ * This plugin for Moodle is used to send emails through a web form. * * @package local_contact - * @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca + * @copyright 2016-2022 TNG Consulting Inc. - www.tngconsulting.ca * @author Michael Milette * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -92,4 +92,3 @@ $settings->add($setting); } } - diff --git a/version.php b/version.php index 99a6d5d..8401819 100644 --- a/version.php +++ b/version.php @@ -18,7 +18,7 @@ * Version information for Contact Form (also called Contact). * * @package local_contact - * @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca + * @copyright 2016-2022 TNG Consulting Inc. - www.tngconsulting.ca * @author Michael Milette * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -26,8 +26,8 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'local_contact'; // To check on upgrade, that module sits in correct place. -$plugin->version = 2021052300; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2022042501; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2015111600; // Requires Moodle version 3.0. -$plugin->release = '1.2.1'; +$plugin->release = '1.2.2'; $plugin->maturity = MATURITY_STABLE; $plugin->cron = 0;