function student_files_get_files_for_student

6.x student_files.module student_files_get_files_for_student($student_id)

Return an array of the files which belong to this student.

5 calls to student_files_get_files_for_student()
student_files_content_alter in modules/student_files/student_files.module
Implememnt hook_content_alter
student_files_handle_delete in modules/student_files/student_files.module
student_files_handle_download in modules/student_files/student_files.module
This actually finds and downloads the file for the user, decrypting if necessary.
student_files_user_may_delete_student_file in modules/student_files/student_files.module
Returns TRUE or FALSE if the current user is allowed to delete the file.
student_files_user_may_download_student_file in modules/student_files/student_files.module
Returns TRUE or FALSE if the user has access to download this particular student's file.

File

modules/student_files/student_files.module, line 949
This is the student_files module, which will facilitate uploading (securely) files to be associated with student accounts.

Code

function student_files_get_files_for_student($student_id) {
  $rtn = array();
  $res = db_query("SELECT * FROM student_files 
                   WHERE student_id = ?
                   ORDER BY posted DESC ", $student_id);

  while ($cur = db_fetch_array($res)) {
    $rtn [$cur ["fid"]] = $cur;
  }

  return $rtn;

}