function advise_get_advisees

6.x advise.module advise_get_advisees($faculty_id = "")
5.x advise.module advise_get_advisees($faculty_id = "")
10 calls to advise_get_advisees()
advise_can_access_view in modules/advise/advise.module
Used by the menu to determine if the user can see the View (Degree and What If) tab for the current student.
advise_user_can_view_advising_session_access_callback in modules/advise/advise.module
This is an access callback. Can the user view the advising session specified in the REQUEST?
alerts_advisees_alerts_form in modules/alerts/alerts.module
Displays alerts for our various advisees.
alerts_display_advisee_activities_page in modules/alerts/alerts.module
Display all advisee activities since the beginning of time, thanks to pager query.
alerts_get_alert_count_by_type in modules/alerts/alerts.module
Implements hook_get_count_for_alert_type

... See full list

File

modules/advise/advise.module, line 465

Code

function advise_get_advisees($faculty_id = "") {
  global $user;
  if ($faculty_id == "") {
    $faculty_id = $user->cwid;
  }

  $rtn = array();

  $res = db_query("SELECT * FROM advisor_student 
                            WHERE faculty_id = ?
                             ", $faculty_id);
  foreach ($res as $cur) {
    $rtn [] = $cur ["student_id"];
  }


  return $rtn;
}