let print_project_html (hpr:string -> unit) (gl:student list) (padd:paddress) (groupnum:int) =
let colsp = if (!export_type = HtmlJscpt) then 2 else 1 in
hpr "<table width=\"90%%\" frame=\"hsides\" \nrules=\"groups\" border=\"3\" summary=\"Groupes\">\n<colgroup align=\"center\"/>\n";
for i = 1 to (if (!do_assign_resp) then 3 else 1) do
hpr (Printf.sprintf "<colgroup align=\"center\" span=\"%d\"/>\n" colsp);
done;
if (not(!nogrades_mode)) then hpr "<colgroup align=\"center\"/>\n";
hpr "<thead>\n";
hpr (Printf.sprintf "<tr valign=\"middle\">\n<th width='150'> %s </th>\n"
(get_group_project_name groupnum padd));
if (!export_type = HtmlJscpt) then
hpr (Printf.sprintf "<th colspan=\"%d\"><a href='list.html'>%s</a></th>\n"
(if (!do_assign_resp) then 3*colsp else colsp) (get_group_name groupnum))
else hpr (Printf.sprintf "<th colspan=\"%d\">%s</th>\n"
(if (!do_assign_resp) then 3*colsp else colsp) (get_group_name groupnum));
if (not(!nogrades_mode)) then hpr "<th>Note</th>\n</tr>\n";
if (!do_assign_resp) then begin
let semisp = (if !export_type = HtmlJscpt then 2 else 1) in
hpr (Printf.sprintf "<tr>\n<th> </th>\n<th colspan='%d'><font size='1'> Capt. </font></th>\n<th colspan='%d'><font size='1'> Secr. </font></th>\n<th colspan='%d'><font size='1'> Prog. </font></th>\n</tr>\n" semisp semisp semisp);
end;
hpr "</thead>\n";
let teams = List.sort compare (H.assoc_to_keys (get_group_project_teams groupnum padd)) in
List.iter (fun tnum ->
let (bval,sval) = (is_team_valid !ref_validity
!student_list groupnum padd tnum) in
hpr (Printf.sprintf "<tbody>\n<tr %salign='center'>\n"
(if bval then "" else "bgcolor='#FFBBBB'"));
print_team_html_in_table hpr sval
gl padd groupnum tnum;
hpr "</tr>\n</tbody>\n";
) teams;
if (!export_type = HtmlJscpt) then begin
hpr "<tbody>\n<tr align=\"left\">\n<td>";
hpr (Printf.sprintf "<form method='post' action=''>\n<input type='hidden' value='%s' name='projnum'/>\n<input type='hidden' value='%d' name='group_team'/>\n<input type='submit' class='buttonpm' value='+' name='create_team'/></form>"
(pa_to_string padd) groupnum);
hpr "</td></tr>\n</tbody>\n";
end;
hpr "</table>\n\n"