function admin_get_course_array_from_course_id_array

6.x admin_get_course_array_from_course_id_array($course_idArray)
4.x admin_get_course_array_from_course_id_array($course_idArray)
5.x admin_get_course_array_from_course_id_array($course_idArray)
1 call to admin_get_course_array_from_course_id_array()


modules/admin/, line 744


function admin_get_course_array_from_course_id_array($course_idArray) {

  // Convert an array of course_id's into their subject_id ~~ course_num format.
  // Pick non-excluded courses over excluded courses, when you have the option.
  $rtn_array = array();
  $db = new DatabaseHandler();

  // MUST use foreach since we used array_unique earlier.  Can't use
  // count($arr) after you use array_unique!!
  foreach ($course_idArray as $t => $value) {
    $new_course = new Course();
    $new_course->bool_use_draft = true;
    $new_course->db = $db;
    $new_course->course_id = $course_idArray [$t];
    array_push($rtn_array, "$new_course->subject_id ~~ $new_course->course_num");
  return $rtn_array;