Skip to content

Commit

Permalink
Pequeno fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guaycuru committed May 22, 2017
1 parent 57796da commit b113a63
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion classes/GDE/Usuario.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1541,10 +1541,27 @@ public function Formata_Horario($Horario, $dia, $hora, $meu, Periodo $Periodo =
if(!isset($Horario[$dia][$hora]))
return "-";
$formatado = array();
$i = 0;
foreach($Horario[$dia][$hora] as $Oferecimento) {
$strong_oferecimento = ((!$meu) && ($Periodo !== null) && ($this->Cursando($Oferecimento[0])));
$strong_sala = ((!$meu) && ($Periodo !== null) && ($this->Tem_Dimensao(array($Oferecimento[1], $dia, $hora), $Periodo)));
$formatado[] = (($links) ? "<a href=\"".CONFIG_URL."oferecimento/".$Oferecimento[0]->getID()."/\" title=\"".$Oferecimento[0]->getDisciplina()->getNome()."\">":null).(($strong_oferecimento)?"<strong>":null).$Oferecimento[0]->getSigla().$Oferecimento[0]->getTurma().(($strong_oferecimento)?"</strong>":null).(($links)?"</a>":null).((($links) && ($Oferecimento[1] != '????'))?"/<a href=\"".CONFIG_URL."sala/".$Oferecimento[1]."/\">":"/").(($strong_sala)?"<strong>":null).$Oferecimento[1].(($strong_sala)?"</strong>":null).(($links)?"</a>":null);
$formatado[$i] = (
($links)
? "<a href=\"".CONFIG_URL."oferecimento/".$Oferecimento[0]->getID()."/\" title=\"".$Oferecimento[0]->getDisciplina()->getNome()."\">"
: null
).
(($strong_oferecimento) ? "<strong>" : null).
$Oferecimento[0]->getSigla().$Oferecimento[0]->getTurma().
(($strong_oferecimento) ? "</strong>" : null ).
(($links) ? "</a>" : null);
if(!empty($Oferecimento[1]))
$formatado[$i] .= (($links)
? "/<a href=\"".CONFIG_URL."sala/".$Oferecimento[1]."/\">"
: "/").
(($strong_sala) ? "<strong>" : null).
$Oferecimento[1].
(($strong_sala) ? "</strong>" : null).
(($links) ? "</a>" : null);
}
return implode("<br />", $formatado);
}
Expand Down

0 comments on commit b113a63

Please sign in to comment.