let print_student_txt hpr gl (paddl:paddress list) (s:student) =
let name = cut_string_to_length "Nom : " s.name name_length in
let surn = cut_string_to_length "Pre : " s.pren pren_length in
let logn = cut_string_to_length "Log : " s.login logn_length in
let grop = string_to_bold (cut_string_to_length "Grp : "
(string_of_int s.group) grop_length) in
hpr (Printf.sprintf "%s %s %s %s" name surn logn grop);
List.iter (fun padd ->
try let t = H.get_assoc s.teams padd in
hpr (print_team_txt gl s t)
with Not_found ->
hpr (cut_string_to_length "" " "
(if (!do_assign_resp) then 11 else 9));
) paddl;
if (!do_assign_resp) then
hpr (Printf.sprintf " C:%d S:%d A:%d T:%d" (s.numc) (s.nums)
(s.numc+s.nums) (s.numt));
hpr (Printf.sprintf " M:%s" (string_to_red (Printf.sprintf "%4.1f" (student_mean s))));
hpr (Printf.sprintf " m:%s" (string_to_red (Printf.sprintf "%4.1f" (student_corrected_mean s))));
if (String.compare s.login (!loginsel) == 0) then begin
hpr "\n";
hpr (String.make (name_length + pren_length + logn_length + grop_length + 3)
' ');
List.iter (fun padd ->
try let t = H.get_assoc s.teams padd in
hpr (cut_string_to_length "" (Printf.sprintf "%.3f " t.c)
(if (!do_assign_resp) then 11 else 9));
with _ ->
hpr (cut_string_to_length "" " "
(if (!do_assign_resp) then 11 else 9));
) paddl;
end;
hpr "\n"