let show_orals env (cgi:Netcgi1_compat.Netcgi_types.cgi_activation) =
let hpr = cgi # output # output_string in
export_type := HtmlJscpt;
handle_export_type cgi;
handle_html_arg cgi "projnum" (fun s -> projectssel := (try pa_of_string s
with _ -> []));
handle_html_arg cgi "date" (fun s -> try datesel := string_to_time s
with _ -> ());
begin match !export_type with
| HtmlJscpt
| Html -> begin
initialize_html hpr "Orals sheet";
if (!export_type = HtmlJscpt) then begin
hpr "<a href='list.html'>Student list</a> / Project list : ";
let paddl = get_all_project_addresses () in
let pstr = String.concat " / " (List.map (fun padd ->Printf.sprintf
"<a href='orals.html?projnum=%s'>n\176 %s</a>"
(pa_to_string padd) (pa_to_string padd)) paddl) in
hpr pstr;
hpr "<hr/>\n\n";
end;
(try
if (List.length !projectssel = 0) then raise Not_found
else I.print_orals_html hpr !student_list !projectssel
(!datesel) 1800;
with _ ->
hpr "No valid project selected");
display_exports_html hpr cgi;
if (!verbose_mode) then begin
hpr "<hr/>\n";
display_args_html hpr cgi;
display_values_html hpr;
end;
finalize_html hpr;
end;
| _ -> hpr "This export type has not been implemented yet";
end;
cgi # output # commit_work();