@@ -1542,26 +1542,29 @@ public function Formata_Horario($Horario, $dia, $hora, $meu, Periodo $Periodo =
15421542 return "- " ;
15431543 $ formatado = array ();
15441544 $ i = 0 ;
1545- foreach ($ Horario [$ dia ][$ hora ] as $ Oferecimento ) {
1546- $ strong_oferecimento = ((!$ meu ) && ($ Periodo !== null ) && ($ this ->Cursando ($ Oferecimento [0 ])));
1547- $ strong_sala = ((!$ meu ) && ($ Periodo !== null ) && ($ this ->Tem_Dimensao (array ($ Oferecimento [1 ], $ dia , $ hora ), $ Periodo )));
1545+ foreach ($ Horario [$ dia ][$ hora ] as $ dados ) {
1546+ list ($ Oferecimento , $ sala ) = $ dados ;
1547+ $ strong_oferecimento = ((!$ meu ) && ($ Periodo !== null ) && ($ this ->Cursando ($ Oferecimento )));
1548+ $ strong_sala = ((!$ meu ) && ($ Periodo !== null ) && ($ this ->Tem_Dimensao (array ($ sala , $ dia , $ hora ), $ Periodo )));
15481549 $ formatado [$ i ] = (
15491550 ($ links )
1550- ? "<a href= \"" .CONFIG_URL ."oferecimento/ " .$ Oferecimento[ 0 ] ->getID ()."/ \" title= \"" .$ Oferecimento[ 0 ] ->getDisciplina ()->getNome ()."\"> "
1551+ ? "<a href= \"" .CONFIG_URL ."oferecimento/ " .$ Oferecimento ->getID ()."/ \" title= \"" .$ Oferecimento ->getDisciplina ()->getNome (true )."\"> "
15511552 : null
15521553 ).
15531554 (($ strong_oferecimento ) ? "<strong> " : null ).
1554- $ Oferecimento[ 0 ] ->getSigla ().$ Oferecimento[ 0 ] ->getTurma ().
1555+ $ Oferecimento ->getSigla (true ).$ Oferecimento ->getTurma (true ).
15551556 (($ strong_oferecimento ) ? "</strong> " : null ).
15561557 (($ links ) ? "</a> " : null );
1557- if (!empty ($ Oferecimento [1 ]))
1558+ if (!empty ($ dados [1 ])) {
15581559 $ formatado [$ i ] .= (($ links )
1559- ? "/<a href= \"" .CONFIG_URL ."sala/ " .$ Oferecimento [1 ]."/ \"> "
1560- : "/ " ).
1561- (($ strong_sala ) ? "<strong> " : null ).
1562- $ Oferecimento [1 ].
1563- (($ strong_sala ) ? "</strong> " : null ).
1564- (($ links ) ? "</a> " : null );
1560+ ? "/<a href= \"" . CONFIG_URL . "sala/ " . $ sala . "/ \"> "
1561+ : "/ " ) .
1562+ (($ strong_sala ) ? "<strong> " : null ) .
1563+ $ sala .
1564+ (($ strong_sala ) ? "</strong> " : null ) .
1565+ (($ links ) ? "</a> " : null );
1566+ }
1567+ $ i ++;
15651568 }
15661569 return implode ("<br /> " , $ formatado );
15671570 }
@@ -1581,7 +1584,7 @@ public function Formata_Horario_Sala($Horario, $dia, $hora) {
15811584 if (isset ($ Horario [$ dia ][$ hora ])) {
15821585 foreach ($ Horario [$ dia ][$ hora ] as $ Oferecimento ) {
15831586 $ strong = $ this ->Cursando ($ Oferecimento );
1584- $ formatado [] = "<a href= \"" .CONFIG_URL ."oferecimento/ " .$ Oferecimento ->getID ()."/ \"> " .(($ strong ) ? "<strong> " : "" ).$ Oferecimento ->getSigla ().$ Oferecimento ->getTurma ().(($ strong ) ? "</strong> " : "" )."</a> " ;
1587+ $ formatado [] = "<a href= \"" .CONFIG_URL ."oferecimento/ " .$ Oferecimento ->getID ()."/ \"> " .(($ strong ) ? "<strong> " : "" ).$ Oferecimento ->getSigla (true ).$ Oferecimento ->getTurma (true ).(($ strong ) ? "</strong> " : "" )."</a> " ;
15851588 }
15861589 return implode ("<br /> " , $ formatado );
15871590 } else
0 commit comments