- in progress
This commit is contained in:
parent
69909ad557
commit
e9845d29b6
|
@ -703,9 +703,9 @@ def getAllUserTasks(token):
|
||||||
taskDic['forSortDate'] = taskTime
|
taskDic['forSortDate'] = taskTime
|
||||||
|
|
||||||
|
|
||||||
if t.isPersonal:
|
|
||||||
ownerId = user.key().id()
|
ownerId = user.key().id()
|
||||||
else:
|
if not t.isPersonal:
|
||||||
project = Project.all().filter("courseId = ", course.key().id())
|
project = Project.all().filter("courseId = ", course.key().id())
|
||||||
for p in project.run():
|
for p in project.run():
|
||||||
if str(p.key().id()) in user.projects_id_list:
|
if str(p.key().id()) in user.projects_id_list:
|
||||||
|
@ -1111,6 +1111,7 @@ def getAllUnsubmittedTasks(token):
|
||||||
taskDic['isPersonal'] = task.isPersonal
|
taskDic['isPersonal'] = task.isPersonal
|
||||||
taskDic['usersToReview'] = []
|
taskDic['usersToReview'] = []
|
||||||
taskDic['projectsToReview'] = []
|
taskDic['projectsToReview'] = []
|
||||||
|
taskDic['id'] = task.key().id()
|
||||||
|
|
||||||
tgs = TaskGrade.all().filter("taskId = ", task.key().id())
|
tgs = TaskGrade.all().filter("taskId = ", task.key().id())
|
||||||
tcs = TaskComponent.all().filter("taskId = ", task.key().id()).filter("order = ", 0).filter("userId != ", -1)
|
tcs = TaskComponent.all().filter("taskId = ", task.key().id()).filter("order = ", 0).filter("userId != ", -1)
|
||||||
|
|
|
@ -7,6 +7,7 @@ angular.module('SeHub')
|
||||||
$scope.oldText = "";
|
$scope.oldText = "";
|
||||||
$scope.messages = [];
|
$scope.messages = [];
|
||||||
$scope.userMessages = [];
|
$scope.userMessages = [];
|
||||||
|
$scope.unSubmittedTasks = [];
|
||||||
$scope.userTasks = [];
|
$scope.userTasks = [];
|
||||||
$scope.messagesDisplay = [];
|
$scope.messagesDisplay = [];
|
||||||
$scope.courses = [];
|
$scope.courses = [];
|
||||||
|
@ -69,6 +70,7 @@ angular.module('SeHub')
|
||||||
$scope.reviewTask = function(task)
|
$scope.reviewTask = function(task)
|
||||||
{
|
{
|
||||||
//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/' + task.id + '/' + $scope.user.id + '/' + $scope.user.id);
|
||||||
|
@ -118,7 +120,6 @@ angular.module('SeHub')
|
||||||
apiService.getAllFutureTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
apiService.getAllFutureTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
||||||
{
|
{
|
||||||
$scope.userTasks = data;
|
$scope.userTasks = data;
|
||||||
console.log($scope.userTasks);
|
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
console.log(err.message);
|
console.log(err.message);
|
||||||
|
@ -193,6 +194,8 @@ angular.module('SeHub')
|
||||||
console.log($scope.courseObj);
|
console.log($scope.courseObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.chooseProjectClicked = function()
|
$scope.chooseProjectClicked = function()
|
||||||
{
|
{
|
||||||
console.log("choose project Clicked!!");
|
console.log("choose project Clicked!!");
|
||||||
|
@ -205,6 +208,16 @@ angular.module('SeHub')
|
||||||
{
|
{
|
||||||
$scope.displayMessages(); // // Display all messages in message feed and the latest one
|
$scope.displayMessages(); // // Display all messages in message feed and the latest one
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apiService.getAllUnsubmittedTasks(token).success(function(data)
|
||||||
|
{
|
||||||
|
console.log(data);
|
||||||
|
$scope.unSubmittedTasks = data;
|
||||||
|
}).error(function(err)
|
||||||
|
{
|
||||||
|
console.log(err.message);
|
||||||
|
});
|
||||||
|
|
||||||
// $scope.displayMessages();
|
// $scope.displayMessages();
|
||||||
$scope.displayTasks(); // Display all tasks in task feed and the latest one
|
$scope.displayTasks(); // Display all tasks in task feed and the latest one
|
||||||
// $scope.getProjects(); // Get all projects info
|
// $scope.getProjects(); // Get all projects info
|
||||||
|
|
|
@ -101,6 +101,9 @@ angular.module('SeHub')
|
||||||
$location.path('/tasks/overview/' + taskId + '/' + groupId + '/' + groupId);
|
$location.path('/tasks/overview/' + taskId + '/' + groupId + '/' + groupId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}).error(function(err)
|
||||||
|
{
|
||||||
|
console.log(err.message);
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -117,6 +117,14 @@ service.factory('apiService', ['$http', function($http) {
|
||||||
};
|
};
|
||||||
return $http(req);
|
return $http(req);
|
||||||
},
|
},
|
||||||
|
getAllUnsubmittedTasks: function(token){
|
||||||
|
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getAllUnsubmittedTasks/" + token;
|
||||||
|
req = {
|
||||||
|
method : "GET",
|
||||||
|
url : url
|
||||||
|
};
|
||||||
|
return $http(req);
|
||||||
|
},
|
||||||
getAllFutureTasks: function(token, courseId){
|
getAllFutureTasks: function(token, courseId){
|
||||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getAllFutureTasks/" + token + "/" + courseId;
|
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getAllFutureTasks/" + token + "/" + courseId;
|
||||||
req = {
|
req = {
|
||||||
|
|
|
@ -81,16 +81,24 @@
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<md-tab label="Tasks waiting for review">
|
<md-tab label="Tasks waiting for review">
|
||||||
<md-content class="md-padding">
|
<md-content class="md-padding">
|
||||||
<md-card ng-repeat = "task in userTasks" layout-padding>
|
<div ng-repeat = "course in unSubmittedTasks">
|
||||||
<div>
|
<md-card ng-repeat = "task in course.tasks" layout-padding>
|
||||||
Title:
|
<div ng-repeat = "uName in task.usersToReview">
|
||||||
<md-button ng-click="reviewTask(task)">
|
Title: {{task.title}}
|
||||||
{{task.title}}
|
<br></br>
|
||||||
</md-button>
|
<md-button ng-click="reviewTask(task)">
|
||||||
<br></br>
|
Name: {{uName.name}}
|
||||||
Description: {{task.description}}
|
</md-button>
|
||||||
</div>
|
</div>
|
||||||
</md-card>
|
<div ng-repeat = "projName in task.projectsToReview">
|
||||||
|
Title: {{task.title}}
|
||||||
|
<br></br>
|
||||||
|
<md-button ng-click="reviewTask(task)">
|
||||||
|
Name: {{projName.projectName}}
|
||||||
|
</md-button>
|
||||||
|
</div>
|
||||||
|
</md-card>
|
||||||
|
</div>
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
</md-tabs>
|
</md-tabs>
|
||||||
|
|
Loading…
Reference in a new issue