Fix : opensurvey results.php pageto match studs.php
This commit is contained in:
parent
6dd0f7850f
commit
45e27a6446
@ -701,34 +701,10 @@ if ($object->format == "D") {
|
|||||||
$colspan = 1;
|
$colspan = 1;
|
||||||
$nbofsujet = count($toutsujet);
|
$nbofsujet = count($toutsujet);
|
||||||
for ($i = 0; $i < $nbofsujet; $i++) {
|
for ($i = 0; $i < $nbofsujet; $i++) {
|
||||||
$current = $toutsujet[$i];
|
if (isset($toutsujet[$i + 1]) && date('Y', intval($toutsujet[$i])) == date('Y', intval($toutsujet[$i + 1]))) {
|
||||||
|
|
||||||
if (strpos($toutsujet[$i], '@') !== false) {
|
|
||||||
$current = substr($toutsujet[$i], 0, strpos($toutsujet[$i], '@'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($toutsujet[$i + 1]) && strpos($toutsujet[$i + 1], '@') !== false) {
|
|
||||||
$next = substr($toutsujet[$i + 1], 0, strpos($toutsujet[$i + 1], '@'));
|
|
||||||
} elseif (isset($toutsujet[$i + 1])) {
|
|
||||||
$next = $toutsujet[$i + 1];
|
|
||||||
}
|
|
||||||
|
|
||||||
$currenty = 0;
|
|
||||||
if ($current) {
|
|
||||||
$currenty = strftime("%Y", $current);
|
|
||||||
}
|
|
||||||
$next = 0;
|
|
||||||
if ($next) {
|
|
||||||
$nexty = strftime("%Y", $next);
|
|
||||||
}
|
|
||||||
if (isset($toutsujet[$i + 1]) && ($currenty == $nexty)) {
|
|
||||||
$colspan++;
|
$colspan++;
|
||||||
} else {
|
} else {
|
||||||
print '<td colspan='.$colspan.' class="annee">';
|
print '<td colspan='.$colspan.' class="annee">'.date('Y', intval($toutsujet[$i])).'</td>'."\n";
|
||||||
if ($current) {
|
|
||||||
print strftime("%Y", $current);
|
|
||||||
}
|
|
||||||
print '</td>'."\n";
|
|
||||||
$colspan = 1;
|
$colspan = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user