$scope.year_selected = false; $scope.isstaff = ''; $scope.selected_branch_id = ''; $scope.selected_academic_id = ''; $scope.selected_course_parent_id = ''; $scope.selected_course_id = ''; $scope.selected_year = ''; $scope.selected_semister = 0; $scope.selected_section_id = 0; $scope.courses_object = []; $scope.total_semisters = 0; $scope.semisters = []; $scope.have_semisters = false; $scope.academic_years = []; $scope.parent_courses = []; $scope.courses = []; $scope.parent_selected = false; $scope.years = []; $scope.result_data = []; $scope.resetYears = function(){ $scope.years = []; $scope.selected_year = null; $scope.current_year = null; $scope.result_data = []; $scope.resetSemisters(); } $scope.resetSemisters = function(){ $scope.total_semisters = 0; $scope.semisters = []; $scope.have_semisters = false; $scope.current_semister = ''; $scope.result_data=[]; } $scope.resetCourses = function(){ $scope.selected_course_id = ''; $scope.courses = []; $scope.resetYears(); } $scope.resetParentCourses = function(){ $scope.parent_courses = []; $scope.selected_course_parent_id = ''; $scope.course_parent_id = ''; $scope.resetCourses(); } $scope.resetAcademicYears = function(){ $scope.academic_years = []; $scope.selected_academic_id = ''; $scope.academic_id = ''; $scope.resetParentCourses(); } $scope.resetFields = function(){ $scope.selected_branch_id = ''; $scope.resetAcademicYears(); } $scope.getAcademicYears = function(branch_id) { if(branch_id=='') return; $scope.resetFields(); $scope.selected_branch_id = branch_id; route = '