From c9452922048ee30d65d8b2c46c9892702fbbfe4d Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 00:12:58 +0300 Subject: [PATCH 01/11] Added API Debug Routes - See The Help Page (Misc) --- SE_API/API.py | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/SE_API/API.py b/SE_API/API.py index faac0a0..670d145 100644 --- a/SE_API/API.py +++ b/SE_API/API.py @@ -205,11 +205,54 @@ def oauth(oauth_token): def login(): return github.authorize() +debug = True # Change In Production +if debug: + counter = 300 -@app.route('/debug/login') -def set_local_token_view(): - return app.send_static_file('DEBUG_Views/set_cookie.html') + @auto.doc() + @app.route('/debug/login') + def set_local_token_view(): + """ + Go To This URL To Set The SE-Token Cookie +
+ Route Parameters
+ - token: None
+
+ Payload
+ - None + Response +
+ None. + """ + return app.send_static_file('DEBUG_Views/set_cookie.html') + @auto.doc() + @app.route('/debug/createUser/') + def createUser(gitHubUserName): + """ + Go To This URL To Set The SE-Token Cookie +
+ Route Parameters
+ - gitHubUserName: A Username
+
+ Payload
+ - None + Response +
+ None. + """ + try: + query = Campus.all().filter('title =', 'JCE') + for c in query.run(limit=1): + campus = c + user = User(name=";", username=gitHubUserName, isFirstLogin=False, + avatar_url='http://placekitten.com/g/200/'+str(counter), accessToken="RandomGitHubToken", + email='username@mailservice.com', campuses_id_list=[str(campus.key().id())], + seToken=str(uuid.uuid4()), isLecturer=True) + db.put(user) + return created(gitHubUserName + 'Was Created. Token: ' + user.seToken) + except Exception as e: + return bad_request(str(e)) @app.route('/api/qa/init') def init_QA(): From a127813c0c0d2c33f3cd981b367a0e761f4077a1 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 00:16:16 +0300 Subject: [PATCH 02/11] More API docs for /debug/* --- SE_API/API.py | 1 + 1 file changed, 1 insertion(+) diff --git a/SE_API/API.py b/SE_API/API.py index 670d145..1f79300 100644 --- a/SE_API/API.py +++ b/SE_API/API.py @@ -232,6 +232,7 @@ if debug: """ Go To This URL To Set The SE-Token Cookie
+

This User Will Automatically be added to JCE Campus as a Lecturer

Route Parameters
- gitHubUserName: A Username

From 33448a2aa1c11228465cafdec63855ffb05eb711 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Thu, 2 Jul 2015 13:14:23 +0300 Subject: [PATCH 03/11] - project tabs scrolling - fixed! --- templates/css/theme.css | 6 ++++++ templates/js/controllers/registerController.js | 1 + templates/views/class.html | 4 ++-- templates/views/project.html | 6 +++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/templates/css/theme.css b/templates/css/theme.css index 7653ec7..cd4e0fc 100644 --- a/templates/css/theme.css +++ b/templates/css/theme.css @@ -428,7 +428,13 @@ body.noscroll .tabDesign { + padding-left: 4px; + padding-right: 4px; + margin: 5px; + /*background-color: #f5f5f5;*/ overflow: scroll; + height:500; + /*width:690;*/ } .tasksContent diff --git a/templates/js/controllers/registerController.js b/templates/js/controllers/registerController.js index 5749b02..a131673 100644 --- a/templates/js/controllers/registerController.js +++ b/templates/js/controllers/registerController.js @@ -36,6 +36,7 @@ angular.module('SeHub') }); $scope.dropdownClicked = function() { + $scope.createCampusClicked = false; if ($scope.campus) { $scope.campusChecked = true; $scope.campusObj = null; diff --git a/templates/views/class.html b/templates/views/class.html index 0a8d051..677d057 100644 --- a/templates/views/class.html +++ b/templates/views/class.html @@ -34,7 +34,7 @@
Join Class
-
+ Create Project @@ -84,7 +84,7 @@
- +
diff --git a/templates/views/project.html b/templates/views/project.html index 5d10acb..02becc4 100644 --- a/templates/views/project.html +++ b/templates/views/project.html @@ -67,8 +67,8 @@ - - + +
@@ -98,7 +98,7 @@ - +
Message Date
From cfdcc038db74864c9654473ecf1a49a30fe4ff96 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 15:26:37 +0300 Subject: [PATCH 04/11] Fixed #113 --- SE_API/GitHub_API_Connector.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SE_API/GitHub_API_Connector.py b/SE_API/GitHub_API_Connector.py index ddba971..052f3fd 100644 --- a/SE_API/GitHub_API_Connector.py +++ b/SE_API/GitHub_API_Connector.py @@ -77,8 +77,9 @@ def make_micro(stats, issues): def get_issue_num(issues, user): numOfIssues = 0 for issue in issues: - if issue['user']['login'] == user: - numOfIssues += 1 + if issue['assignee']: + if issue['assignee']['login'] == user: + numOfIssues += 1 return numOfIssues def get_github_data(repo_url, project_id): From 5c660a73e2058b4fd2c18a1879f4c18c03b4bfd1 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 15:49:30 +0300 Subject: [PATCH 05/11] API Messages Syntax Fix --- SE_API/MessageRoutes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SE_API/MessageRoutes.py b/SE_API/MessageRoutes.py index 4bdd08d..6a3204b 100644 --- a/SE_API/MessageRoutes.py +++ b/SE_API/MessageRoutes.py @@ -155,7 +155,7 @@ def getMessagesByGroup(token, groupId): query = Message.all() try: - query.filter("groupId = ", int(groupId)) + query.filter("groupId =", int(groupId)) except Exception as e: return bad_request("Bad id format") From 9a1222b209b6caeaf397ac0f11c70641f905c32a Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 17:29:35 +0300 Subject: [PATCH 06/11] Project Model Changed Default to logo_url to None --- models/Project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Project.py b/models/Project.py index fa1ec70..7853c0f 100644 --- a/models/Project.py +++ b/models/Project.py @@ -9,7 +9,7 @@ class Project(db.Model): courseId = db.IntegerProperty(required=True) master_id = db.IntegerProperty(required=True) grade = db.IntegerProperty(required=True, default=0) - logo_url = db.StringProperty(required=False) + logo_url = db.StringProperty(required=False, default=None) gitRepository = db.StringProperty(required=True) membersId = db.StringListProperty(required=True) info = db.TextProperty(required=False, default="{}") From f4c9f3be981e6f2ebfb589d4b02abcac980d6701 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 17:29:52 +0300 Subject: [PATCH 07/11] API: Added getCourseById --- SE_API/CourseRoutes.py | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/SE_API/CourseRoutes.py b/SE_API/CourseRoutes.py index 500d341..9331a17 100644 --- a/SE_API/CourseRoutes.py +++ b/SE_API/CourseRoutes.py @@ -354,6 +354,51 @@ def getCoursesByUser(token, userId): return Response(response='[]', status=200, mimetype="application/json") + +@course_routes.route('/api/courses/getCoursesById//', methods=['GET']) +@auto.doc() +def getCoursesByID(token, courseId): + """ + This Call will return A Course By ID +
+ Route Parameters
+ - seToken: 'seToken'
+ - courseId: 1234354543
+
+
+ Payload
+ - NONE
+
+
+ Response +
+ 200 - JSON Array, Example:
+ {
+ 'title': 'JCE',
+ 'email_ending': '@post.jce.ac.il',
+ 'master_user_id': 123453433341, (User that created the campus)
+ 'avatar_url': 'http://some.domain.com/imagefile.jpg',
+ 'id' : 1234567890
+ }
+
+ 403 - Invalid Token
+ """ + + user = get_user_by_token(token) + if user is None: + return bad_request("Bad user Token") + + try: + course = Course.get_by_id(int(courseId)) + except Exception as e: + return bad_request("Bad id format") + + if course is None: + return bad_request("Bad Course Id") + + return Response(response=course.to_JSON(), + status=200, + mimetype="application/json") #---------------------------------------------------------- # PUT #---------------------------------------------------------- From c13b726cbbfa5526b84d13c2111ec67ff6aa8366 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 17:31:33 +0300 Subject: [PATCH 08/11] AngularJS: apiServices: Added Get Campus By ID --- templates/js/services/apiService.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/js/services/apiService.js b/templates/js/services/apiService.js index 81d9e7a..88f78d5 100644 --- a/templates/js/services/apiService.js +++ b/templates/js/services/apiService.js @@ -189,6 +189,14 @@ service.factory('apiService', ['$http', function($http) { data: payLoad }; return $http(req); + }, + getCampuseById: function(token, id){ + var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getCoursesById/" + id; + req = { + method: "GET", + url: url + }; + return $http(req); } }; }]); \ No newline at end of file From 569205957c8682ae6d051de1428a1ffa853ba4c2 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 20:38:08 +0300 Subject: [PATCH 09/11] API: Messages now will return with the User in them --- SE_API/MessageRoutes.py | 15 ++++++++++++++- models/Message.py | 5 ++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/SE_API/MessageRoutes.py b/SE_API/MessageRoutes.py index 6a3204b..8a18726 100644 --- a/SE_API/MessageRoutes.py +++ b/SE_API/MessageRoutes.py @@ -143,7 +143,20 @@ def getMessagesByGroup(token, groupId): },
'id' : 1234567890,
'master_id' : 1234567890,
- 'isProject' : false
+ 'isProject' : false,
+ 'user': {
+ 'username': 'DarkLord',
+ 'name': 'Darth Vader',
+ 'email': 'darkLord@death.planet,
+ 'isLecturer': 'True',
+ 'seToken': 'xxxxxx-xxxxx-xxxxx-xxxxxx',
+ 'avatar_url': 'http://location.git.com/somthing'
+ 'isFirstLogin': False,
+ 'campuses_id_list': [43243532532,5325325325,532532342],
+ 'courses_id_list': [53523,43432423,432432432432]
+ 'id': 1234567890
+ }
+ }

diff --git a/models/Message.py b/models/Message.py index 23019e9..8563174 100644 --- a/models/Message.py +++ b/models/Message.py @@ -2,6 +2,7 @@ import json __author__ = 'Aran' from google.appengine.ext import db +from models.User import User class Message(db.Model): groupId = db.IntegerProperty(required=True) @@ -11,6 +12,7 @@ class Message(db.Model): isProject = db.BooleanProperty(default=False) def to_JSON(self): + user = User.get_by_id(self.master_id) data = { 'groupId' : self.groupId, 'message' : self.message, @@ -23,6 +25,7 @@ class Message(db.Model): }, 'id' : self.key().id(), 'master_id' : self.master_id, - 'isProject' : self.isProject + 'isProject' : self.isProject, + 'user': json.loads(user.to_JSON()) } return json.dumps(data) From 604c19af19c9decff6f63be3e9bf4d9287102fa0 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 2 Jul 2015 21:13:59 +0300 Subject: [PATCH 10/11] API: Messages now will return with the Group associated --- SE_API/MessageRoutes.py | 3 ++- models/Message.py | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/SE_API/MessageRoutes.py b/SE_API/MessageRoutes.py index 8a18726..a181620 100644 --- a/SE_API/MessageRoutes.py +++ b/SE_API/MessageRoutes.py @@ -155,7 +155,8 @@ def getMessagesByGroup(token, groupId): 'campuses_id_list': [43243532532,5325325325,532532342],
'courses_id_list': [53523,43432423,432432432432]
'id': 1234567890
- }
+ },
+ 'group': {The Group Object Project OR Campus (according to isProject)}

}
diff --git a/models/Message.py b/models/Message.py index 8563174..67906f9 100644 --- a/models/Message.py +++ b/models/Message.py @@ -3,6 +3,8 @@ import json __author__ = 'Aran' from google.appengine.ext import db from models.User import User +from models.Project import Project +from models.Course import Course class Message(db.Model): groupId = db.IntegerProperty(required=True) @@ -13,6 +15,10 @@ class Message(db.Model): def to_JSON(self): user = User.get_by_id(self.master_id) + if self.isProject: + group = Project.get_by_id(self.groupId) + else: + group = Course.get_by_id(self.groupId) data = { 'groupId' : self.groupId, 'message' : self.message, @@ -26,6 +32,7 @@ class Message(db.Model): 'id' : self.key().id(), 'master_id' : self.master_id, 'isProject' : self.isProject, - 'user': json.loads(user.to_JSON()) + 'user': json.loads(user.to_JSON()), + 'group': json.loads(group.to_JSON()) } return json.dumps(data) From 15a6d7e2e06d956301c83810682d8b48b5893202 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Thu, 2 Jul 2015 21:24:01 +0300 Subject: [PATCH 11/11] - dashboard - new layout (Still In Progress!) - tab system in dashboard is working with scroll - createMessage - logic fixed (display in progress) --- templates/css/theme.css | 11 +- templates/js/controllers/classController.js | 2 +- templates/js/controllers/homeController.js | 145 +++++++++++----- .../js/controllers/registerController.js | 12 +- templates/js/services/apiService.js | 15 +- templates/views/home.html | 156 +++++++----------- templates/views/tasks.html | 7 +- 7 files changed, 176 insertions(+), 172 deletions(-) diff --git a/templates/css/theme.css b/templates/css/theme.css index cd4e0fc..ab99672 100644 --- a/templates/css/theme.css +++ b/templates/css/theme.css @@ -424,6 +424,7 @@ body.noscroll .messagesContent .msgSent { word-break: break-word; + padding-top: 2em; } .tabDesign @@ -445,7 +446,7 @@ body.noscroll background-color: aliceblue; overflow: scroll; overflow-y: visible; - height:250; + height:500; width:340; } .messagesContent @@ -453,10 +454,10 @@ body.noscroll padding-left: 4px; padding-right: 4px; margin: 5px; - background-color: #f5f5f5; - overflow: scroll; - height:250; - width:690; + /*background-color: #f5f5f5;*/ + /*overflow: scroll;*/ + height:500; + /*width:690;*/ } p.tasksFeed { diff --git a/templates/js/controllers/classController.js b/templates/js/controllers/classController.js index 397890a..5bf3304 100644 --- a/templates/js/controllers/classController.js +++ b/templates/js/controllers/classController.js @@ -73,7 +73,7 @@ angular.module('SeHub') jsonNewProj.logo_url = $scope.project.logoUrl; - apiService.create(token, jsonNewProj).success(function(data) + apiService.createProject(token, jsonNewProj).success(function(data) { loadingData = false; projectId = data.id; diff --git a/templates/js/controllers/homeController.js b/templates/js/controllers/homeController.js index 9bcab36..ddd8125 100644 --- a/templates/js/controllers/homeController.js +++ b/templates/js/controllers/homeController.js @@ -6,27 +6,21 @@ angular.module('SeHub') $scope.msgToPost = ""; $scope.oldText = ""; $scope.messages = []; + $scope.messagesDisplay = []; + $scope.courses = []; + $scope.campuses = []; $scope.msg = {}; + $scope.courseObj = {}; + // $scope.course = ""; // should be "" ? // {} ?? $rootScope.seToken = $cookies['com.sehub.www']; var token = $rootScope.seToken; - var imagePath = $scope.user.avatar_url; - //var campusName = ''; - // $scope.campusName = ''; - - $scope.phones = [ - { type: 'Home', number: '(972) 865-82861' }, - { type: 'Cell', number: '(972) 5251-32309' }, - ]; - - if($scope.user.isLecturer) { $scope.isStudent = false; console.log("Lecturer Mode!"); - // console.log($scope.campusName); } else { @@ -40,31 +34,33 @@ angular.module('SeHub') } $scope.postMessageClicked = function() // Posting the message itself { - if($scope.msg.msgToAdd != null) + console.log($scope.courseObj); + if($scope.msg.msgToAdd != null && $scope.courseObj.courseName) { + console.log("NOW"); + jsonNewMsg = { - 'courseName': 'Math', // TODO Should be ===> $scope.course.courseName + 'groupId': $scope.courseObj.id, // TODO Should be ===> $scope.courseObj.id 'message': $scope.msg.msgToAdd }; - // console.log("J: " + jsonNewMsg.toString() + "msg: " + $scope.msg.msgToAdd); - - // apiService.createMessage(token, jsonNewMsg).success(function(data) - // { - // console.log("create Msg!"); - // }).error(function(err) - // { - // console.log("Error: " + err); - // }); - - /* - 'courseName': 'Advance Math', - 'message': 'The lecture today is canceled' - */ + apiService.createMessage(token, jsonNewMsg).success(function(data) + { + console.log("create Msg!"); + }).error(function(err) + { + console.log("Error Below"); + console.log(err); + }); console.log($scope.msg.msgToAdd); $scope.messages.push({"text": $scope.msg.msgToAdd}); } + else + { + $mdDialog.show($mdDialog.alert().title('Error Creating Message').content('Message content or Course is missing') + .ariaLabel('Send Message alert dialog').ok('Try Again!').targetEvent()); // Pop-up alert + } $scope.msg.msgToAdd = null; } @@ -81,22 +77,54 @@ angular.module('SeHub') } - $scope.getCourses = function() + $scope.displayMessages = function() { - // apiService.getAllCoursesByCampus(token, campusId).success(function(data) // Shows all classes from this campus + // apiService.getMessagesByGroupId(token, $scope.courseObj.id).success(function(data) // { - // $scope.loadingData = false; - // $scope.courses = data; - // console.log("success " + $scope.courses); - // init(); // Executing the function to initialize course display - // if($scope.courses && $scope.courses.length > 0) - // { - // $scope.coursesEmpty = false; - // } + // $scope.messages = data; + // console.log($scope.messages); // }).error(function(err) // { - // console.log("error: " + err); - // }); + // console.log(err); + // }); + } + + + $scope.getCampuses = function() + { + apiService.getCampusesByUser(token).success(function(data) + { + $scope.campuses = data; + $scope.getCourses(); // Get all the courses info + if($scope.messages) + { + $scope.displayMessages(); // // Display all messages in message feed and the latest one + } + }).error(function(err) + { + console.log("Error: " + err); + }); + + } + + $scope.getCourses = function() + { + for(var i = 0; i < $scope.campuses.length; i++) + { + apiService.getAllCoursesByCampus(token, $scope.campuses[i].id).success(function(data) // Shows all classes from this campus + { + $scope.loadingData = false; + $scope.courses = data; + // console.log($scope.courses); + if($scope.courses && $scope.courses.length > 0) + { + $scope.coursesEmpty = false; + } + }).error(function(err) + { + console.log("Error: " + err); + }); + } } $scope.clearAllClicked = function() // Clear Screen from text @@ -106,16 +134,49 @@ angular.module('SeHub') $scope.chooseCourseClicked = function() { - console.log("choose course Clicked!!"); + // console.log($scope.courseObj); + if($scope.courseObj) + { + for(var i = 0; i < $scope.courses.length; i++) + { + if($scope.courses[i].courseName === $scope.courseObj.name) + { + $scope.courseObj = $scope.courses[i]; + } + } + } + console.log($scope.courseObj); } + // $scope.chooseCourseClicked = function() + // { + // console.log("Click "); + // console.log($scope.choosenCourse); + // if($scope.choosenCourse) + // { + // console.log("here"); + // $scope.courseObj = null; + // for(var i = 0; i < $scope.courses.length; i++) + // { + // if($scope.courses[i].courseName === $scope.choosenCourse) + // { + // $scope.courseObj = $scope.courses[i]; + // console.log($scope.courseObj); + // } + // } + // } + // } + $scope.chooseProjectClicked = function() { console.log("choose project Clicked!!"); } + + $scope.getCampuses(); // Get all the campuses info // animation + + // $scope.displayTasks(); // Display all tasks in task feed and the latest one $scope.isEnterd = top.setIsEnterd; - $scope.getCourses(); // Get all the courses info - $scope.displayTasks(); // Display all tasks in task feed + }]); \ No newline at end of file diff --git a/templates/js/controllers/registerController.js b/templates/js/controllers/registerController.js index a131673..8b8503e 100644 --- a/templates/js/controllers/registerController.js +++ b/templates/js/controllers/registerController.js @@ -1,5 +1,6 @@ angular.module('SeHub') - .controller('registerController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', function($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService, $rootScope) { + .controller('registerController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast', '$mdDialog', 'apiService', '$rootScope', + function($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService, $rootScope) { $scope.userHasNoName = false; $scope.campusChecked = false; $scope.createCampusClicked = false; @@ -37,7 +38,7 @@ angular.module('SeHub') $scope.dropdownClicked = function() { $scope.createCampusClicked = false; - if ($scope.campus) { + if($scope.campus) { $scope.campusChecked = true; $scope.campusObj = null; for (var i = $scope.campuses.length - 1; i >= 0; i--) { @@ -47,7 +48,6 @@ angular.module('SeHub') } }; }; - }; $scope.submitClicked = function(ev) { @@ -55,12 +55,8 @@ angular.module('SeHub') if ($scope.user.AcMail != null) { var fullMail = $scope.user.AcMail + $scope.campusObj.email_ending; // Holds the full academic email of the user - apiService.updateUser(token, $scope.user).success(function(data) { - }).error(function() { - // TODO Error - console.log("Error occured on updateUser"); }); console.log("Mail: " + fullMail); @@ -74,7 +70,6 @@ angular.module('SeHub') .ok('Got it!') .targetEvent(ev)) .then(function() { - // TODO ADD- delete cookies and redirect only after pressed 'Got it' $cookieStore.remove("com.sehub.www"); // Removing the cookies $window.location.href = 'http://se-hub.appspot.com'; // Reference to 'welcome' page @@ -115,7 +110,6 @@ angular.module('SeHub') console.log("DONE - 200"); $mdDialog.show($mdDialog.alert().title('E-mail Verification').content('A verification e-mail has been sent to your email address.') .ariaLabel('Email verification alert dialog').ok('Got it!').targetEvent(email)); // Pop-up alert for e-mail verification - // TODO ADD delete cookies and redirect only after pressed 'Got it' $cookieStore.remove("com.sehub.www"); // Removing the cookies $window.location.href = 'http://se-hub.appspot.com'; // Reference to 'welcome' page }).error(function() { diff --git a/templates/js/services/apiService.js b/templates/js/services/apiService.js index 81d9e7a..7da3ab1 100644 --- a/templates/js/services/apiService.js +++ b/templates/js/services/apiService.js @@ -53,8 +53,8 @@ service.factory('apiService', ['$http', function($http) { }; return $http(req); }, - getAllMessages: function(token){ - var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getAllMessages/" + token; + getMessagesByGroupId: function(token, groupId){ + var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/messages/getMessagesByGroup/" + token + "/" + groupId; req = { method : "GET", url : url @@ -134,7 +134,7 @@ service.factory('apiService', ['$http', function($http) { }; return $http(req); }, - create: function(token, payLoad){ // createProject + createProject: function(token, payLoad){ var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/projects/create/" + token; req = { method : "POST", @@ -143,15 +143,6 @@ service.factory('apiService', ['$http', function($http) { }; return $http(req); }, - createMessage: function(token, payLoad){ - var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/createMessage/" + token; - req = { - method : "POST", - url : url, - data: payLoad - }; - return $http(req); - }, sendValidationMail: function(token, email){ var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/validation/sendmail/" + token; payload = { diff --git a/templates/views/home.html b/templates/views/home.html index 0737ca4..ebc3f1f 100644 --- a/templates/views/home.html +++ b/templates/views/home.html @@ -1,8 +1,8 @@ -
+
- +
@@ -25,75 +25,31 @@

Dash Board

+ +
+
+ Closest Task- + + Will Be Here + +
+
+ Latest Message- + + Will Be Here + +
+
+
- -
-
- -

Messages

-
-
-
- -

Tasks

-
-
-
-
-
- -
- -
-
-
- -
-
-
-
- {{user.name}} -
-
- class_name -
-
-
-
-
-
- {{msg.text}} -
-
-
-
-
-
-
-
- -

- For Task 3 Press: Task #3 -

- For Task 4 Press: Task #4 -

- For Task 5 Press: Task #5 -

- For Task 6 Press: Task #6 -

- For Task 7 Press: Task #7 -

- For Task 8 Press: Task #8 -

-
-
-
- - + +
+ - -
+ + +
@@ -106,24 +62,25 @@ {{user.name}}
- class_name + {{c.courseName}}
-
+
{{msg.text}}
-
+ + - + -

Tab One

+

Tasks

One
@@ -135,31 +92,34 @@
- -
-
- +
+ +
+
+ +
+
+
+
+ Post + Clear All +
+
+
+
+ + + + +
+
+ + {{c.courseName}} +
-
-
- Post - Clear All -
-
-
-
- - - - -
-
- -
-
-
- +
+
@@ -225,9 +185,9 @@
- + - +
\ No newline at end of file diff --git a/templates/views/tasks.html b/templates/views/tasks.html index e68dc9a..2279260 100644 --- a/templates/views/tasks.html +++ b/templates/views/tasks.html @@ -6,17 +6,14 @@ - -
Title
+ +
- -
Task Name Date Grade
-