SendMailWhenLpIsPublish: Remove Backtick. Clean unnecessary code - refs BT#18214

pull/3743/head
Carlos Alvarado 5 years ago
parent 4199c5e4e2
commit 886f374721
No known key found for this signature in database
GPG Key ID: B612DB1EE6658FBB
  1. 14
      plugin/send_notification_new_lp/SendNotificationToPublishLp.php
  2. 6
      plugin/send_notification_new_lp/index.php
  3. 1
      plugin/send_notification_new_lp/install.php
  4. 2
      plugin/send_notification_new_lp/plugin.php

@ -152,18 +152,18 @@ class SendNotificationToPublishLp extends Plugin
$extraFieldId != 0
&& $extraFieldOption['field_id'] == $notifyId) {
// Update?
$query = "UPDATE `".$this->tblExtraFieldOption."`
$query = "UPDATE ".$this->tblExtraFieldOption."
SET
`option_value` = $i,
`option_order` = $order,
`display_text` = '$extraFieldOptionValue'
option_value = $i,
option_order = $order,
display_text = '$extraFieldOptionValue'
WHERE
`field_id` = $notifyId
AND `id` = $extraFieldId";
field_id = $notifyId
AND id = $extraFieldId";
} else {
$query = "
INSERT INTO ".$this->tblExtraFieldOption."
(`field_id`, `option_value`, `display_text`, `priority`, `priority_message`, `option_order`) VALUES
(field_id, option_value, display_text, priority, priority_message, option_order) VALUES
( '$notifyId', $i, '$extraFieldOptionValue', NULL, NULL, '$order');
";
}

@ -1,9 +1,3 @@
<?php
/* For licensing terms, see /license.txt */
// Check extra_field remedialcourselist and advancedCourseList
require_once __DIR__.'/../../main/inc/global.inc.php';
if (api_is_anonymous()) {
}

@ -3,7 +3,6 @@
/* For licensing terms, see /license.txt */
// Check extra_field remedialcourselist and advancedCourseList
require_once 'SendNotificationToPublishLp.php';
if (!api_is_platform_admin()) {
exit('You must have admin permissions to install plugins');

@ -16,5 +16,5 @@
*/
$plugin_info['title'] = 'Mailing new LPs to students and their HR Managers';
$plugin_info['comment'] = 'Add the ability to send emails to students and hr when a lp is published. It will be sent in each execution of the respective cron "main/cron/learning_path_reminder.php"';
$plugin_info['version'] = '1.0'; // o la versión que corresponda
$plugin_info['version'] = '1.0';
$plugin_info['author'] = 'Carlos Alvarado';

Loading…
Cancel
Save