From 50085172a98401eb408d7a7136c980feca96ccc4 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Mon, 3 Aug 2015 02:55:00 +0300 Subject: [PATCH] - finish --- templates/js/controllers/homeController.js | 36 +++++++++++----------- templates/views/home.html | 4 +-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/templates/js/controllers/homeController.js b/templates/js/controllers/homeController.js index eb50835..eabc663 100644 --- a/templates/js/controllers/homeController.js +++ b/templates/js/controllers/homeController.js @@ -67,27 +67,27 @@ angular.module('SeHub') $scope.msg.msgToAdd = null; } - $scope.reviewTask = function(task) + $scope.reviewTask = function(taskId, groupId) { //tasks/overview/:taskId/:submitterId/:gId', { - if(task.isPersonal) // As Lecturer - { - $location.path('/tasks/overview/' + task.id + '/' + $scope.user.id + '/' + $scope.user.id); - } - else // it's a project task - { - apiService.getProjectsByCourse(token, task.courseId).success(function(data) - { - for(var i = 0; i < $scope.user.projects_id_list.length; i++) - for(var j = 0; j < data.length; j++) - if($scope.user.projects_id_list[i] === data[j].id.toString()) - $location.path('/tasks/overview/' + task.id + '/' + data[j].id + '/' + data[j].id); - }).error(function(err) - { - console.log(err.message); - }); - } + // if(task.isPersonal) // As Lecturer + // { + $location.path('/tasks/overview/' + taskId + '/' + groupId + '/' + groupId); + // } + // else // it's a project task + // { + // apiService.getProjectsByCourse(token, task.courseId).success(function(data) + // { + // for(var i = 0; i < $scope.user.projects_id_list.length; i++) + // for(var j = 0; j < data.length; j++) + // if($scope.user.projects_id_list[i] === data[j].id.toString()) + // $location.path('/tasks/overview/' + task.id + '/' + data[j].id + '/' + data[j].id); + // }).error(function(err) + // { + // console.log(err.message); + // }); + // } } $scope.gotoTask = function(task) diff --git a/templates/views/home.html b/templates/views/home.html index 472d6f7..a59b40d 100644 --- a/templates/views/home.html +++ b/templates/views/home.html @@ -86,14 +86,14 @@
Title: {{task.title}}

- + Name: {{uName.name}}
Title: {{task.title}}

- + Name: {{projName.projectName}}