/**
* Created by cklimkowsky on 4/6/15.
*/
angular
.module('coopEval')
.controller('SearchResultsController', SearchResultsController);
function SearchResultsController($scope, $stateParams, $rootScope, searchService, studentService) {
searchService.getSearchResults($rootScope.searchCriteria)
.success(function (result) {
$scope.searchResults = result;
});
// --------------------------------------------------
// TODO: Probably refactor the below code into another controller or other controllers
//
// Admin Functionality
//
// Get the evaluation data for a student when the user clicks on the student's name from the search results page
if ($stateParams.studentDCE) {
studentService.getStudentOverviewWithId($stateParams.studentDCE)
.success(function (result) {
$scope.overviewData = result;
});
}
/**
* Opens a modal window that allows the user to update the status of the evaluations for the given placement.
* @param placement
*/
$scope.updateStatus = function (placement) {
// TODO: Open a modal window to change the status of the given placement
};
}
|