Skip to content

Commit

Permalink
Contact for Moodle v1.2.1 (2021-05-23).
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-milette committed May 23, 2021
1 parent dac06a3 commit 656dd7a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## [1.2.1] - 2021-01-11 (DEV)
## [1.2.1] - 2021-05-23
### Updated
- Added FAQ information to the README.md on how to fix *sesskey* errors.
- Bug fix in creation of temporary user object.
- Copyright notice to 2021.
- Compatible with Moodle 3.11.

## [1.2.0] - 2020-11-23
### Update
Expand Down
13 changes: 7 additions & 6 deletions classes/local_contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* This plugin for Moodle is used to send emails through a web form.
*
* @package local_contact
* @copyright 2016-2020 TNG Consulting Inc. - www.tngconsulting.ca
* @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
*/
Expand All @@ -27,7 +27,7 @@

/**
* local_contact class. Handles processing of information submitted from a web form.
* @copyright 2016-2020 TNG Consulting Inc. - www.tngconsulting.ca
* @copyright 2016-2021 TNG Consulting Inc. - www.tngconsulting.ca
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class local_contact {
Expand Down Expand Up @@ -157,10 +157,10 @@ public function __construct() {
// Validate against email address whitelist and blacklist.
$skipdomaintest = false;
// TODO: Create a plugin setting for this list.
$whitelist = ''; // $config->whitelistemails .
$whitelist = ''; // Future code: $config->whitelistemails .
$whitelist = ',' . $whitelist . ',';
// TODO: Create a plugin blacklistemails setting.
$blacklist = ''; // $config->blacklistemails .
$blacklist = ''; // Future code: $config->blacklistemails .
$blacklist = ',' . $blacklist . ',';
if (!$this->isspambot && stripos($whitelist, ',' . $this->fromemail . ',') != false) {
$skipdomaintest = true; // Skip the upcoming domain test.
Expand All @@ -175,7 +175,7 @@ public function __construct() {
// Validate against domain whitelist and blacklist... except for the nice people.
if (!$skipdomaintest && !$this->isspambot) {
// TODO: Create a plugin whitelistdomains setting.
$whitelist = ''; // $config->whitelistdomains .
$whitelist = ''; // Future code: $config->whitelistdomains .
$whitelist = ',' . $whitelist . ',';
$domain = substr(strrchr($this->fromemail, '@'), 1);

Expand All @@ -184,7 +184,7 @@ public function __construct() {
$blacklist = '';
} else {
// TODO: Create a plugin blacklistdomains setting.
$blacklist = 'example.com,example.net,sample.com,test.com,specified.com'; // $config->blacklistdomains .
$blacklist = 'example.com,example.net,sample.com,test.com,specified.com'; // Future code:$config->blacklistdomains .
$blacklist = ',' . $blacklist . ',';
if ($blacklist != ',,'
&& $this->isspambot = ($blacklist == '*' || stripos($blacklist, ',' . $domain . ',') != false)) {
Expand Down Expand Up @@ -223,6 +223,7 @@ private function makeemailuser($email, $name = '', $id = -99) {
$emailuser->lastnamephonetic = '';
$emailuser->middlename = '';
$emailuser->alternatename = '';
$emailuser->username = '';
return $emailuser;
}

Expand Down
2 changes: 1 addition & 1 deletion db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* This plugin for Moodle is used to send emails through a web form.
*
* @package local_contact
* @copyright 2016-2020 TNG Consulting Inc. - www.tngconsulting.ca
* @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
*/
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* This plugin for Moodle is used to send emails through a web form.
*
* @package local_contact
* @copyright 2016-2020 TNG Consulting Inc. - www.tngconsulting.ca
* @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
*/
Expand Down
2 changes: 1 addition & 1 deletion lang/en/local_contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* This plugin for Moodle is used to send emails through a web form.
*
* @package local_contact
* @copyright 2016-2020 TNG Consulting Inc. - www.tngconsulting.ca
* @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
*/
Expand Down
2 changes: 1 addition & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* This plugin for Moodle is used to send emails through a web form.
*
* @package local_contact
* @copyright 2016-2020 TNG Consulting Inc. - www.tngconsulting.ca
* @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
*/
Expand Down
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
* Version information for Contact Form (also called Contact).
*
* @package local_contact
* @copyright 2016-2020 TNG Consulting Inc. - www.tngconsulting.ca
* @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();

$plugin->component = 'local_contact'; // To check on upgrade, that module sits in correct place.
$plugin->version = 2020112300; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2021052300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2015111600; // Requires Moodle version 3.0.
$plugin->release = '1.2.0';
$plugin->release = '1.2.1';
$plugin->maturity = MATURITY_STABLE;
$plugin->cron = 0;

0 comments on commit 656dd7a

Please sign in to comment.