Minor - format code

pull/2487/head
jmontoyaa 8 years ago
parent 881874ccbb
commit dfcae97d09
  1. 1
      main/announcements/announcements.php
  2. 22
      main/inc/lib/AnnouncementManager.php

@ -440,7 +440,6 @@ switch ($action) {
}
$form->addHtml('</div>');
// $form->setRequired($element);
$form->addCheckBox('email_ann', '', get_lang('EmailOption'));
if (!isset($announcement_to_modify)) {

@ -866,9 +866,9 @@ class AnnouncementManager
/**
* Gets all announcements from a user by course
* @param string course db
* @param int user id
* @return array html with the content and count of announcements or false otherwise
* @param string course db
* @param int user id
* @return array html with the content and count of announcements or false otherwise
*/
public static function get_all_annoucement_by_user_course($course_code, $user_id)
{
@ -956,7 +956,7 @@ class AnnouncementManager
if (Database::num_rows($result)) {
return Database::fetch_array($result);
}
return array();
return [];
}
/**
@ -1013,6 +1013,9 @@ class AnnouncementManager
/**
* This tools loads all the users and all the groups who have received
* a specific item (in this case an announcement item)
* @param string $tool
* @param int $id
* @return array
*/
public static function load_edit_users($tool, $id)
{
@ -1040,16 +1043,17 @@ class AnnouncementManager
$to[] = "GROUP:" . $row['to_group_id'];
}
}
return $to;
}
/**
* constructs the form to display all the groups and users the message has been sent to
* input: $sent_to_array is a 2 dimensional array containing the groups and the users
* the first level is a distinction between groups and users:
* $sent_to_array['groups'] * and $sent_to_array['users']
* $sent_to_array['groups'] (resp. $sent_to_array['users']) is also an array
* containing all the id's of the groups (resp. users) who have received this message.
* input: $sent_to_array is a 2 dimensional array containing the groups and the users
* the first level is a distinction between groups and users:
* $sent_to_array['groups'] * and $sent_to_array['users']
* $sent_to_array['groups'] (resp. $sent_to_array['users']) is also an array
* containing all the id's of the groups (resp. users) who have received this message.
* @author Patrick Cool <patrick.cool@>
*/
public static function sent_to_form($sent_to_array)

Loading…
Cancel
Save