Skip to content
Permalink
Browse files

Fix author id

  • Loading branch information...
jmontoyaa committed Jan 23, 2017
1 parent 20f1e3b commit a528c98074ededca461b18abdba7c5419297c79a
Showing with 11 additions and 3 deletions.
  1. +6 −1 main/cron/import_csv.php
  2. +5 −2 main/inc/lib/AnnouncementManager.php
@@ -1053,7 +1053,12 @@ private function importCalendarStatic($file, $moveFile = true)
$event['session_id'],
$subject,
$emailBody,
['everyone']
['everyone'],
[],
null,
null,
false,
$this->defaultAdminId
);
if ($announcementId) {
@@ -413,6 +413,8 @@ public static function get_last_announcement_order($courseInfo)
* @param string $file_comment Comment describing the attachment
* @param string $end_date
* @param bool $sendToUsersInSession
* @param int $authorId
*
* @return int false on failure, ID of the announcement on success
*/
public static function add_announcement(
@@ -424,7 +426,8 @@ public static function add_announcement(
$file = array(),
$file_comment = null,
$end_date = null,
$sendToUsersInSession = false
$sendToUsersInSession = false,
$authorId = 0
) {
if (empty($courseInfo)) {
return false;
@@ -433,7 +436,7 @@ public static function add_announcement(
$course_id = $courseInfo['real_id'];
$tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$authorId = api_get_user_id();
$authorId = empty($authorId) ? api_get_user_id() : $authorId;
if (empty($end_date)) {
$end_date = api_get_utc_datetime();

0 comments on commit a528c98

Please sign in to comment.
You can’t perform that action at this time.