reexam_list.js 613 B

123456789101112131415161718192021222324
  1. app.controller('StdReexamListCtrl', [ '$rootScope', '$scope', function($rootScope, $scope) {
  2. $scope.getEnrolArray = function() {
  3. $rootScope.ajaxRequest({
  4. url : '../enrol/std/reexam/list.htm'
  5. }, function(response) {
  6. if (response.array.length == 1&& response.array[0].std_batch>1) {
  7. $scope.goInfo(response.array[0]);
  8. return;
  9. }
  10. $scope.EnrolArray = response.array;
  11. });
  12. }
  13. $scope.goInfo = function(enrol) {
  14. if(enrol.batch_end_time!=null && $rootScope.isAfterTime(enrol.batch_end_time)) {
  15. $rootScope.goLocation('reexam/info/' + enrol.enrol_id);
  16. }
  17. }
  18. $scope.getEnrolArray();
  19. } ])