app.controller("mozzCtrl", function($scope,$http,$timeout,$log,$window,$sce,$interval,config,hotkeys){
	//controller variables
	$scope.appConfig=config;
	$scope.ajax_url='../../../'+config.ajaxModule;
	$scope.classSections=[];
	$scope.class_id='';
	$scope.section_id='';
	
	//////////////HELPER FUNCTIONS/////////////////////////////////////		    
    $scope.loadClassSections=function (){
    	if(!$scope.isEmpty($scope.class_id)){
			var data={'class_id':$scope.class_id};
			config.postConfig.params=data;
			$scope.disableButtons();
			$http.get($scope.ajax_url+'fetcher/loadSections',config.postConfig).then(function(response){
				$scope.enableButtons();
				$scope.classSections=response.data.data;
			},function(response){	
				$scope.enableButtons();	
			});
    	}
    };	

	///////autoload functions////////////////////
	// $scope.loadClassSections();
	$timeout(function(){$scope.loadClassSections();},1500); 


});