' : '
';
- $form->addElement('html', $element_conditional);
- $extra = $extra_field->addElements(
+ $form->addElement('html', $elementConditional);
+ $extra = $extraField->addElements(
$form,
$id ? $id : 0,
[],
diff --git a/main/cron/course_announcement.php b/main/cron/course_announcement.php
index e5e4cda9db..4290f6cd57 100644
--- a/main/cron/course_announcement.php
+++ b/main/cron/course_announcement.php
@@ -1,14 +1,16 @@
get_values_by_handler_and_field_variable($announcement->getId(), 'date_to_send_notification');
- $today = date('Y-m-d');
if ($today >= $date_to_send['value']) {
$course_info = api_get_course_info_by_id($announcement->getCId());
diff --git a/main/install/configuration.dist.php b/main/install/configuration.dist.php
index 8919481c9d..bdb897bdde 100755
--- a/main/install/configuration.dist.php
+++ b/main/install/configuration.dist.php
@@ -1966,6 +1966,13 @@ ALTER TABLE gradebook_comment ADD CONSTRAINT FK_C3B70763AD3ED51C FOREIGN KEY (gr
//$_configuration['course_creation_form_set_course_category_mandatory'] = false;
// Show option to set course announcement date
+// Allow send notification at a especific Date. Require DB changes:
+/*
+INSERT INTO `chamilo`.`extra_field`(`extra_field_type`, `field_type`, `variable`, `display_text`, `default_value`, `field_order`, `visible_to_self`, `visible_to_others`, `changeable`, `filter`, `created_at`)
+VALUES (21, 13, 'send_notification_at_a_specific_date', 'Send notification at a specific date', '', 0, 1, 0, 0, 0, NOW());
+INSERT INTO `chamilo`.`extra_field`(`extra_field_type`, `field_type`, `variable`, `display_text`, `default_value`, `field_order`, `visible_to_self`, `visible_to_others`, `changeable`, `filter`, `created_at`)
+VALUES (21, 6, 'date_to_send_notification', 'Date to send notification', '', 0, 1, 0, 0, 0, NOW());
+*/
//$_configuration['course_announcement_scheduled_by_date'] = false;
// Enable upload of large SCORM files from FTP by uploading them to app/cache/