- finish
This commit is contained in:
parent
f63a7c7b70
commit
50085172a9
2 changed files with 20 additions and 20 deletions
|
@ -67,27 +67,27 @@ angular.module('SeHub')
|
||||||
$scope.msg.msgToAdd = null;
|
$scope.msg.msgToAdd = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.reviewTask = function(task)
|
$scope.reviewTask = function(taskId, groupId)
|
||||||
{
|
{
|
||||||
//tasks/overview/:taskId/:submitterId/:gId', {
|
//tasks/overview/:taskId/:submitterId/:gId', {
|
||||||
|
|
||||||
if(task.isPersonal) // As Lecturer
|
// if(task.isPersonal) // As Lecturer
|
||||||
{
|
// {
|
||||||
$location.path('/tasks/overview/' + task.id + '/' + $scope.user.id + '/' + $scope.user.id);
|
$location.path('/tasks/overview/' + taskId + '/' + groupId + '/' + groupId);
|
||||||
}
|
// }
|
||||||
else // it's a project task
|
// else // it's a project task
|
||||||
{
|
// {
|
||||||
apiService.getProjectsByCourse(token, task.courseId).success(function(data)
|
// apiService.getProjectsByCourse(token, task.courseId).success(function(data)
|
||||||
{
|
// {
|
||||||
for(var i = 0; i < $scope.user.projects_id_list.length; i++)
|
// for(var i = 0; i < $scope.user.projects_id_list.length; i++)
|
||||||
for(var j = 0; j < data.length; j++)
|
// for(var j = 0; j < data.length; j++)
|
||||||
if($scope.user.projects_id_list[i] === data[j].id.toString())
|
// if($scope.user.projects_id_list[i] === data[j].id.toString())
|
||||||
$location.path('/tasks/overview/' + task.id + '/' + data[j].id + '/' + data[j].id);
|
// $location.path('/tasks/overview/' + task.id + '/' + data[j].id + '/' + data[j].id);
|
||||||
}).error(function(err)
|
// }).error(function(err)
|
||||||
{
|
// {
|
||||||
console.log(err.message);
|
// console.log(err.message);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.gotoTask = function(task)
|
$scope.gotoTask = function(task)
|
||||||
|
|
|
@ -86,14 +86,14 @@
|
||||||
<div ng-repeat = "uName in task.usersToReview">
|
<div ng-repeat = "uName in task.usersToReview">
|
||||||
Title: {{task.title}}
|
Title: {{task.title}}
|
||||||
<br></br>
|
<br></br>
|
||||||
<md-button ng-click="reviewTask(task)">
|
<md-button ng-click="reviewTask(task.id, uName.id)">
|
||||||
Name: {{uName.name}}
|
Name: {{uName.name}}
|
||||||
</md-button>
|
</md-button>
|
||||||
</div>
|
</div>
|
||||||
<div ng-repeat = "projName in task.projectsToReview">
|
<div ng-repeat = "projName in task.projectsToReview">
|
||||||
Title: {{task.title}}
|
Title: {{task.title}}
|
||||||
<br></br>
|
<br></br>
|
||||||
<md-button ng-click="reviewTask(task)">
|
<md-button ng-click="reviewTask(task.id, projName.id)">
|
||||||
Name: {{projName.projectName}}
|
Name: {{projName.projectName}}
|
||||||
</md-button>
|
</md-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue