Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
$rootScope.isPrenotabile = function(esame) {
if ((now.isSame(inizioPrenotazione) ||
now.isSame(finePrenotazione))
|| (inizioPrenotazione.isBefore(now) &&
(now
.isBefore(finePrenotazione)))
)
return true;
return false;
};
if ($rootScope.anagrafica.tipoStudente == -1) {
var tipoStudente = TipoStudenteService.get();
tipoStudente.$promise
.then(
function(result) {
if (result.livelloErrore == 0) {
$rootScope.anagrafica.tipoStudente = result.risultato;
// $log.info("update
// tipoStudente : " +
// result.risultato);
redirect();
}
},
function(error) {
$rootScope
.messageBox(
'Esami sostenibili',
"warn",
"Alcuni dati non sono
momentaneamente disponibili. Riprovare più tardi.");
$log.warn(error);
});
} else {
redirect();
}
function redirect() {
console.log('scope.anagrafica.tipoStudente '
+ $scope.anagrafica.tipoStudente);
$rootScope.showResearchBox = true;
switch ($scope.anagrafica.tipoStudente) {
case null:
// Carriera chiusa
$rootScope.showResearchBox = true;
//console.log('$rootScope.showResearchBox ' +
$rootScope.showResearchBox);
//$location.path('/corsiLaurea/ricerca509');
$scope.anagrafic.accessoPrenotazione=true;
$location.path('/corsiLaurea/ricercaAppelliSostenibili'); //270PF
break;
case 1:
// 509 Nuovi stati introdotti con Tep
// (09/11/2012) decodificati da
// AnagraficaServiceDAO.getTipoStudente
$location.path('/corsiLaurea/ricerca509');
break;
case 2:
$location.path('/corsiLaurea/ricercaAppelliSostenibili'); //270PF
break;
default:
$location.path('/corsiLaurea/ricerca509');
//270
break;
}
}
} ]);