Compare commits
No commits in common. "master" and "API_Dev" have entirely different histories.
20 changed files with 130 additions and 871 deletions
|
@ -703,9 +703,9 @@ def getAllUserTasks(token):
|
||||||
taskDic['forSortDate'] = taskTime
|
taskDic['forSortDate'] = taskTime
|
||||||
|
|
||||||
|
|
||||||
|
if t.isPersonal:
|
||||||
ownerId = user.key().id()
|
ownerId = user.key().id()
|
||||||
if not t.isPersonal:
|
else:
|
||||||
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:
|
||||||
|
@ -1114,7 +1114,6 @@ 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)
|
||||||
|
|
|
@ -2,7 +2,6 @@ __author__ = 'etye'
|
||||||
import unittest
|
import unittest
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
import webbrowser
|
|
||||||
from Testing.config import __CONFIG__
|
from Testing.config import __CONFIG__
|
||||||
class UserTestPlan(unittest.TestCase):
|
class UserTestPlan(unittest.TestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -70,18 +69,8 @@ class UserTestPlan(unittest.TestCase):
|
||||||
self.assertEquals(r.status_code, 200)
|
self.assertEquals(r.status_code, 200)
|
||||||
self.assertTrue(len(r.json())>= 1)
|
self.assertTrue(len(r.json())>= 1)
|
||||||
|
|
||||||
def test_campusesGet_validToken_hebrewToken(self):
|
|
||||||
r = requests.get(self.__class__.url_+'api/campuses/getAll/????')
|
|
||||||
self.assertEquals(r.status_code, 403)
|
|
||||||
|
|
||||||
# connectUserToCampus = self.__class__.url_+'http://localhost:8080/api/help/validation/confirm/TOKEN|post.jce.ac.il'
|
|
||||||
# webbrowser.open('http://eample.com')
|
|
||||||
#/api/campuses/getCampusesByUser/<string:token>
|
|
||||||
def test_getCampusesByUser_lecturerToken(self):
|
|
||||||
connectUserToCampus = self.__class__.url_+'api/help/validation/confirm/'++__CONFIG__['TOKENS']['LECTURER']+'|post.jce.ac.il'
|
|
||||||
webbrowser.open('http://localhost:8080/api/help/validation/confirm/_QA_TOKEN_TEST_LECTURER|post.jce.ac.il')
|
|
||||||
r = requests.get(self.__class__.url_+'api/campuses/getCampusesByUser/'+__CONFIG__['TOKENS']['LECTURER'])
|
|
||||||
self.assertEquals(r.status_code, 200)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
|
@ -1,191 +0,0 @@
|
||||||
__author__ = 'etye'
|
|
||||||
import unittest
|
|
||||||
import requests
|
|
||||||
import json
|
|
||||||
#import logging
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
from Testing.config import __CONFIG__
|
|
||||||
class MessagesTestPlan(unittest.TestCase):
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
debug = __CONFIG__['DEBUG']
|
|
||||||
if debug:
|
|
||||||
url = __CONFIG__['PATHS']['DEBUG']
|
|
||||||
else:
|
|
||||||
url = __CONFIG__['PATHS']['PRODUCTION']
|
|
||||||
cls.url_ = url
|
|
||||||
request = requests.get(url+'api/qa/init')
|
|
||||||
if 200 <= request.status_code <= 299:
|
|
||||||
print 'Initialized'
|
|
||||||
'''
|
|
||||||
/api/messages/create/<string:token>
|
|
||||||
POST OPTIONS
|
|
||||||
token user payload e msg
|
|
||||||
This call will create a new Message in the DB
|
|
||||||
'''
|
|
||||||
def test_messageCreate_Student(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_+'api/messages/create/_QA_TOKEN_TEST_STUDENT'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'groupId' : 123456789,
|
|
||||||
'message' : 'Class is canceled',
|
|
||||||
'isProject' : True
|
|
||||||
}
|
|
||||||
|
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
self.assertEquals(r.status_code, 403, 'message: ' + r.json()['message'])
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
def test_messageCreate_Lecturer(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_+'api/messages/create/_QA_TOKEN_TEST_LECTURER'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'groupId' : 123456789,
|
|
||||||
'message' : 'Class is canceled',
|
|
||||||
'isProject' : True
|
|
||||||
}
|
|
||||||
|
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
self.assertEquals(r.status_code, 403, 'message: ' + r.json()['message'])
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
def test_messageCreate_INVALIDTOKEN(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_+'api/messages/create/invlaidToken'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'groupId' : 123456789,
|
|
||||||
'message' : 'Class is canceled',
|
|
||||||
'isProject' : True
|
|
||||||
}
|
|
||||||
|
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
self.assertEquals(r.status_code, 403, 'message: ' + r.json()['message'])
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
'''
|
|
||||||
/api/messages/deleteMessage/<string:token>/<string:msgId>
|
|
||||||
OPTIONS DELETE
|
|
||||||
token msgId user msg e
|
|
||||||
>This Call will delete a message by owner token
|
|
||||||
Route Parameters
|
|
||||||
- SeToken: token - msgId: 1234567890
|
|
||||||
|
|
||||||
Payload
|
|
||||||
- NONE
|
|
||||||
'''
|
|
||||||
def test_deleteMessage_Student(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
#create Message and get the id to call delete message API REST
|
|
||||||
r = requests.delete(self.__class__.url_+'api/messages/deleteMessage/_QA_TOKEN_TEST_STUDENT/<string:msgID')
|
|
||||||
self.assertEquals(r.status_code, 204)
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
def test_deleteMessage_Lecturer(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
#create Message and get the id to call delete message API REST
|
|
||||||
r = requests.delete(self.__class__.url_+'api/messages/deleteMessage/_QA_TOKEN_TEST_LECTURER/<string:msgID')
|
|
||||||
self.assertEquals(r.status_code, 204)
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
def test_deleteMessage_invalidToken(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
#create Message and get the id to call delete message API REST
|
|
||||||
r = requests.delete(self.__class__.url_+'api/messages/deleteMessage/InvalidToken/<string:msgID')
|
|
||||||
self.assertEquals(r.status_code, 204)
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
'''
|
|
||||||
/api/messages/getAllUserMessages/<string:token>
|
|
||||||
HEAD OPTIONS GET
|
|
||||||
token user arr allMsgs projectMsgs m msgDic msgTime i
|
|
||||||
>This Call will return an array of all messages (sorted by date),
|
|
||||||
|
|
||||||
Route Parameters
|
|
||||||
- SeToken: token
|
|
||||||
- groupId: 1234567890
|
|
||||||
|
|
||||||
Payload
|
|
||||||
- NONE
|
|
||||||
|
|
||||||
'''
|
|
||||||
def test_getAllUserMessages_Lecturer(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
#create Message and get the id to call delete message API REST
|
|
||||||
r = requests.get(self.__class__.url_+'api/messages/getAllUserMessages/_QA_TOKEN_TEST_LECTURER')
|
|
||||||
self.assertEquals(r.status_code, 200)
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
def test_getAllUserMessages_STUDENT(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
#create Message and get the id to call delete message API REST
|
|
||||||
r = requests.get(self.__class__.url_+'api/messages/getAllUserMessages/_QA_TOKEN_TEST_STUDENT')
|
|
||||||
self.assertEquals(r.status_code, 200)
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
'''
|
|
||||||
/api/messages/create/<string:token>
|
|
||||||
POST OPTIONS
|
|
||||||
token user payload e msg
|
|
||||||
This call will create a new Message in the DB
|
|
||||||
Route Parameters
|
|
||||||
- seToken: 'seToken'
|
|
||||||
|
|
||||||
Payload
|
|
||||||
- JSON Object, Example:
|
|
||||||
{
|
|
||||||
'groupId' : 123456789,
|
|
||||||
'message' : 'Class is canceled',
|
|
||||||
'isProject' : true
|
|
||||||
}
|
|
||||||
'''
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
__author__ = 'etye'
|
|
|
@ -1,396 +0,0 @@
|
||||||
__author__ = 'etye'
|
|
||||||
import unittest
|
|
||||||
import requests
|
|
||||||
import json
|
|
||||||
#import logging
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
from Testing.config import __CONFIG__
|
|
||||||
class TaskTestPlan(unittest.TestCase):
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
debug = __CONFIG__['DEBUG']
|
|
||||||
if debug:
|
|
||||||
url = __CONFIG__['PATHS']['DEBUG']
|
|
||||||
else:
|
|
||||||
url = __CONFIG__['PATHS']['PRODUCTION']
|
|
||||||
cls.url_ = url
|
|
||||||
request = requests.get(url+'api/qa/init')
|
|
||||||
if 200 <= request.status_code <= 299:
|
|
||||||
print 'Initialized'
|
|
||||||
|
|
||||||
'''
|
|
||||||
/api/tasks/create/<string:token>
|
|
||||||
POST OPTIONS
|
|
||||||
|
|
||||||
|
|
||||||
'''
|
|
||||||
def test_tasks_create_LectureToken(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_+'api/tasks/create/_QA_TOKEN_TEST_LECTURER'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
|
|
||||||
data = {
|
|
||||||
'title':'task1',
|
|
||||||
'courseId':1234567890,
|
|
||||||
'description':'pls fddfsdfdsk',
|
|
||||||
'dueDate':{'year':2010,
|
|
||||||
'month':2,
|
|
||||||
'day':4
|
|
||||||
}, 'isPersonal':True,
|
|
||||||
'components':[
|
|
||||||
{
|
|
||||||
'type' : 'should be type1',
|
|
||||||
'label' : 'should be label1',
|
|
||||||
'isMandatory' : True,
|
|
||||||
'order' : 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type' : 'should be type2',
|
|
||||||
'label' : 'should be label2',
|
|
||||||
'isMandatory' : True,
|
|
||||||
'order' : 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type' : 'should be type3',
|
|
||||||
'label' : 'should be label3',
|
|
||||||
'isMandatory' : False,
|
|
||||||
'order' : 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
self.assertEquals(r.status_code, 201, 'message: ' + r.json()['message'])
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
def test_tasks_create_Student_Token(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_+'api/tasks/create/_QA_TOKEN_TEST_STUDENT'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
|
|
||||||
data = {
|
|
||||||
'title':'task1',
|
|
||||||
'courseId':1234567890,
|
|
||||||
'description':'pls fddfsdfdsk',
|
|
||||||
'dueDate':{'year':2010,
|
|
||||||
'month':2,
|
|
||||||
'day':4
|
|
||||||
}, 'isPersonal':True,
|
|
||||||
'components':[
|
|
||||||
{
|
|
||||||
'type' : 'should be type1',
|
|
||||||
'label' : 'should be label1',
|
|
||||||
'isMandatory' : True,
|
|
||||||
'order' : 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type' : 'should be type2',
|
|
||||||
'label' : 'should be label2',
|
|
||||||
'isMandatory' : True,
|
|
||||||
'order' : 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type' : 'should be type3',
|
|
||||||
'label' : 'should be label3',
|
|
||||||
'isMandatory' : False,
|
|
||||||
'order' : 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
self.assertEquals(r.status_code, 201, 'message: ' + r.json()['message'])
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
def test_tasks_create_Student_Token(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_+'api/tasks/create/INVALIDTOKEN'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
|
|
||||||
data = {
|
|
||||||
'title':'task1',
|
|
||||||
'courseId':1234567890,
|
|
||||||
'description':'pls fddfsdfdsk',
|
|
||||||
'dueDate':{'year':2010,
|
|
||||||
'month':2,
|
|
||||||
'day':4
|
|
||||||
}, 'isPersonal':True,
|
|
||||||
'components':[
|
|
||||||
{
|
|
||||||
'type' : 'should be type1',
|
|
||||||
'label' : 'should be label1',
|
|
||||||
'isMandatory' : True,
|
|
||||||
'order' : 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type' : 'should be type2',
|
|
||||||
'label' : 'should be label2',
|
|
||||||
'isMandatory' : True,
|
|
||||||
'order' : 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type' : 'should be type3',
|
|
||||||
'label' : 'should be label3',
|
|
||||||
'isMandatory' : False,
|
|
||||||
'order' : 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
self.assertEquals(r.status_code, 201, 'message: ' + r.json()['message'])
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has finished Successfully")
|
|
||||||
print("***********************************************")
|
|
||||||
|
|
||||||
'''
|
|
||||||
/api/tasks/submitGrade/<string:token>/<string:taskId>/<string:projectname>
|
|
||||||
'''
|
|
||||||
|
|
||||||
def test_submitGrade_Lecturer(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_ +'api/tasks/submitGrade/_QA_TOKEN_TEST_LECTURER/_QA__TEST_PROJECT/QA_TEST_PROJECT_NAME'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'title': 'task1',
|
|
||||||
'courseId': 1234567890,
|
|
||||||
'description': 'plsfddfsdfdsk',
|
|
||||||
'dueDate': {
|
|
||||||
'year': 2010,
|
|
||||||
'month': 2,
|
|
||||||
'day': 4
|
|
||||||
},
|
|
||||||
'isPersonal': True,
|
|
||||||
'components': [{
|
|
||||||
'type': 'shouldbetype1',
|
|
||||||
'label': 'shouldbelabel1',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype2',
|
|
||||||
'label': 'shouldbelabel2',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype3',
|
|
||||||
'label': 'shouldbelabel3',
|
|
||||||
'isMandatory': False,
|
|
||||||
'order': 3
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
|
|
||||||
print(r._content)
|
|
||||||
|
|
||||||
if(r.status_code!=201):print("_____"+self._testMethodName+" has Failed"+"_____" + r._content)
|
|
||||||
self.assertEquals(r.status_code, 201)
|
|
||||||
self.assertEquals(r.status_code, 201, 'message: ' + r.json()['message'])
|
|
||||||
|
|
||||||
def test_submitGrade_Student(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_ +'api/tasks/submitGrade/_QA_TOKEN_TEST_STUDENT/_QA__TEST_PROJECT/QA_TEST_PROJECT_NAME'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'title': 'task1',
|
|
||||||
'courseId': 1234567890,
|
|
||||||
'description': 'plsfddfsdfdsk',
|
|
||||||
'dueDate': {
|
|
||||||
'year': 2010,
|
|
||||||
'month': 2,
|
|
||||||
'day': 4
|
|
||||||
},
|
|
||||||
'isPersonal': True,
|
|
||||||
'components': [{
|
|
||||||
'type': 'shouldbetype1',
|
|
||||||
'label': 'shouldbelabel1',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype2',
|
|
||||||
'label': 'shouldbelabel2',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype3',
|
|
||||||
'label': 'shouldbelabel3',
|
|
||||||
'isMandatory': False,
|
|
||||||
'order': 3
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
|
|
||||||
print(r._content)
|
|
||||||
if(r.status_code!=201):print("_____"+self._testMethodName+" has Failed"+"_____" + r._content)
|
|
||||||
self.assertEquals(r.status_code, 404)
|
|
||||||
#self.assertEquals(r.status_code, 400, 'message: ' + r.json()['message'])
|
|
||||||
|
|
||||||
def test_submitGrade_INVALIDTOKEN(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_ +'api/tasks/submitGrade/InvalidToken/invalidId/InvalidProject'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'title': 'task1',
|
|
||||||
'courseId': 1234567890,
|
|
||||||
'description': 'fun course',
|
|
||||||
'dueDate': {
|
|
||||||
'year': 2010,
|
|
||||||
'month': 2,
|
|
||||||
'day': 4
|
|
||||||
},
|
|
||||||
'isPersonal': True,
|
|
||||||
'components': [{
|
|
||||||
'type': 'shouldbetype1',
|
|
||||||
'label': 'shouldbelabel1',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype2',
|
|
||||||
'label': 'shouldbelabel2',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype3',
|
|
||||||
'label': 'shouldbelabel3',
|
|
||||||
'isMandatory': False,
|
|
||||||
'order': 3
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
|
|
||||||
print(r._content)
|
|
||||||
if(r.status_code!=201):print("_____"+self._testMethodName+" has Failed"+"_____" + r._content)
|
|
||||||
self.assertEquals(r.status_code, 404)
|
|
||||||
|
|
||||||
'''
|
|
||||||
/api/tasks/submitTask/<string:token>/<string:taskId>/<stringProjectName>
|
|
||||||
'''
|
|
||||||
def test_submitTask_LECTURER(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_ +'api/tasks/submitTask/_QA_TOKEN_TEST_LECTURER/_QA__TEST_PROJECT/QA_TEST_PROJECT_NAME'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'title': 'task1',
|
|
||||||
'courseId': 1234567890,
|
|
||||||
'description': 'plsfddfsdfdsk',
|
|
||||||
'dueDate': {
|
|
||||||
'year': 2010,
|
|
||||||
'month': 2,
|
|
||||||
'day': 4
|
|
||||||
},
|
|
||||||
'isPersonal': True,
|
|
||||||
'components': [{
|
|
||||||
'type': 'shouldbetype1',
|
|
||||||
'label': 'shouldbelabel1',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype2',
|
|
||||||
'label': 'shouldbelabel2',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype3',
|
|
||||||
'label': 'shouldbelabel3',
|
|
||||||
'isMandatory': False,
|
|
||||||
'order': 3
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
|
|
||||||
print(r._content)
|
|
||||||
if(r.status_code!=201):print("_____"+self._testMethodName+" has Failed"+"_____" + r._content)
|
|
||||||
self.assertEquals(r.status_code, 500)
|
|
||||||
|
|
||||||
def test_submitTask_STUDENT(self):
|
|
||||||
print (datetime.datetime.now().time())
|
|
||||||
print("***********************************************")
|
|
||||||
print(self._testMethodName+"Has begun")
|
|
||||||
print("***********************************************")
|
|
||||||
headers = {'content-type': 'application/json'}
|
|
||||||
url = self.__class__.url_ +'api/tasks/submitTask/_QA_TOKEN_TEST_STUDENT/_QA__TEST_PROJECT/QA_TEST_PROJECT_NAME'
|
|
||||||
#params = {'seToken': 'seToken' }
|
|
||||||
data = {
|
|
||||||
'title': 'task1',
|
|
||||||
'courseId': 1234567890,
|
|
||||||
'description': 'plsfddfsdfdsk',
|
|
||||||
'dueDate': {
|
|
||||||
'year': 2010,
|
|
||||||
'month': 2,
|
|
||||||
'day': 4
|
|
||||||
},
|
|
||||||
'isPersonal': True,
|
|
||||||
'components': [{
|
|
||||||
'type': 'shouldbetype1',
|
|
||||||
'label': 'shouldbelabel1',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype2',
|
|
||||||
'label': 'shouldbelabel2',
|
|
||||||
'isMandatory': True,
|
|
||||||
'order': 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'type': 'shouldbetype3',
|
|
||||||
'label': 'shouldbelabel3',
|
|
||||||
'isMandatory': False,
|
|
||||||
'order': 3
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
r = requests.post(url, data=json.dumps(data), headers=headers)
|
|
||||||
|
|
||||||
print(r._content)
|
|
||||||
if(r.status_code!=201):print("_____"+self._testMethodName+" has Failed"+"_____" + r._content)
|
|
||||||
self.assertEquals(r.status_code, 500)
|
|
|
@ -271,7 +271,7 @@ class UserTestPlan(unittest.TestCase):
|
||||||
}
|
}
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
||||||
r = requests.put(url, data=json.dumps(data), headers=headers)
|
r = requests.put(url, data=json.dumps(data), headers=headers)
|
||||||
self.assertEquals(r.status_code, 404)
|
self.assertEquals(r.status_code, 400)
|
||||||
|
|
||||||
def test_addUserToCampus_invalidToken(self):
|
def test_addUserToCampus_invalidToken(self):
|
||||||
headers = {'content-type': 'application/json'}
|
headers = {'content-type': 'application/json'}
|
||||||
|
@ -282,7 +282,7 @@ class UserTestPlan(unittest.TestCase):
|
||||||
}
|
}
|
||||||
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
#r = requests.post(self.__class__.url_+'api/courses/create/'+__CONFIG__['TOKENS']['STUDENT'],data=payload)
|
||||||
r = requests.put(url, data=json.dumps(data), headers=headers)
|
r = requests.put(url, data=json.dumps(data), headers=headers)
|
||||||
self.assertEquals(r.status_code, 404)
|
self.assertEquals(r.status_code, 400)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
def test_addUserToCourse_invalidToken(self):
|
def test_addUserToCourse_invalidToken(self):
|
||||||
|
@ -311,13 +311,13 @@ class UserTestPlan(unittest.TestCase):
|
||||||
#url = self.__class__.url_+'api/users/getUserById/'+__CONFIG__['TOKENS']['STUDENT'] + '/'+__CONFIG__['ID']['STUDENT_ID']
|
#url = self.__class__.url_+'api/users/getUserById/'+__CONFIG__['TOKENS']['STUDENT'] + '/'+__CONFIG__['ID']['STUDENT_ID']
|
||||||
url = 'http://localhost:8080/api/users/getUserById/_QA_TOKEN_TEST_STUDENT/6225984592281600'
|
url = 'http://localhost:8080/api/users/getUserById/_QA_TOKEN_TEST_STUDENT/6225984592281600'
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
self.assertEquals(r.status_code, 204)
|
self.assertEquals(r.status_code, 200)
|
||||||
|
|
||||||
def test_getUserById_lecturer(self):
|
def test_getUserById_lecturer(self):
|
||||||
#url = self.__class__.url_+'api/users/getUserById/'+__CONFIG__['TOKENS']['STUDENT'] + '/'+__CONFIG__['ID']['STUDENT_ID']
|
#url = self.__class__.url_+'api/users/getUserById/'+__CONFIG__['TOKENS']['STUDENT'] + '/'+__CONFIG__['ID']['STUDENT_ID']
|
||||||
url = 'http://localhost:8080/api/users/getUserById/_QA_TOKEN_TEST_LECTURER/6225984592281600'
|
url = 'http://localhost:8080/api/users/getUserById/_QA_TOKEN_TEST_LECTURER/6225984592281600'
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
self.assertEquals(r.status_code, 204)
|
self.assertEquals(r.status_code, 200)
|
||||||
|
|
||||||
def test_getUserById_invalidToken(self):
|
def test_getUserById_invalidToken(self):
|
||||||
#url = self.__class__.url_+'api/users/getUserById/'+__CONFIG__['TOKENS']['STUDENT'] + '/'+__CONFIG__['ID']['STUDENT_ID']
|
#url = self.__class__.url_+'api/users/getUserById/'+__CONFIG__['TOKENS']['STUDENT'] + '/'+__CONFIG__['ID']['STUDENT_ID']
|
||||||
|
@ -331,8 +331,8 @@ class UserTestPlan(unittest.TestCase):
|
||||||
print("***********************************************")
|
print("***********************************************")
|
||||||
print(self._testMethodName+"Has begun")
|
print(self._testMethodName+"Has begun")
|
||||||
print("***********************************************")
|
print("***********************************************")
|
||||||
url=self.__class__.url_+'api/users/getUsersByCampus/'+__CONFIG__['TOKENS']['STUDENT']+'/6736157987569664'#campus id
|
#url=self.__class__.url_+'api/users/getUsersByCampus/'+__CONFIG__['TOKENS']['STUDENT']+'/6736157987569664'#campus id
|
||||||
#url='http://localhost:8080/api/users/getUsersByCampus/_QA_TOKEN_TEST_STUDENT/6736157987569664'
|
url='http://localhost:8080/api/users/getUsersByCampus/_QA_TOKEN_TEST_STUDENT/6736157987569664'
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
self.assertEquals(r.status_code, 200)
|
self.assertEquals(r.status_code, 200)
|
||||||
print("***********************************************")
|
print("***********************************************")
|
||||||
|
@ -344,8 +344,8 @@ class UserTestPlan(unittest.TestCase):
|
||||||
print("***********************************************")
|
print("***********************************************")
|
||||||
print(self._testMethodName+"Has begun")
|
print(self._testMethodName+"Has begun")
|
||||||
print("***********************************************")
|
print("***********************************************")
|
||||||
url=self.__class__.url_+'api/users/getUsersByCampus/'+__CONFIG__['TOKENS']['LECTURER']+'/6736157987569664'#campus id
|
#url=self.__class__.url_+'api/users/getUsersByCampus/'+__CONFIG__['TOKENS']['LECTURER']+'/6736157987569664'#campus id
|
||||||
#url = 'http://localhost:8080/api/users/getUsersByCampus/_QA_TOKEN_TEST_STUDENT/6736157987569664'
|
url = 'http://localhost:8080/api/users/getUsersByCampus/_QA_TOKEN_TEST_STUDENT/6736157987569664'
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
self.assertEquals(r.status_code, 200)
|
self.assertEquals(r.status_code, 200)
|
||||||
print("***********************************************")
|
print("***********************************************")
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
__author__ = 'etye'
|
|
|
@ -2,7 +2,7 @@ __author__ = 'etye'
|
||||||
|
|
||||||
|
|
||||||
__CONFIG__ = {
|
__CONFIG__ = {
|
||||||
'DEBUG': False,
|
'DEBUG': True,
|
||||||
'PATHS': {
|
'PATHS': {
|
||||||
'DEBUG': 'http://localhost:8080/',
|
'DEBUG': 'http://localhost:8080/',
|
||||||
'PRODUCTION': 'http://se-hub.appspot.com/'
|
'PRODUCTION': 'http://se-hub.appspot.com/'
|
||||||
|
|
17
index.yaml
17
index.yaml
|
@ -1,17 +0,0 @@
|
||||||
indexes:
|
|
||||||
|
|
||||||
# AUTOGENERATED
|
|
||||||
|
|
||||||
# This index.yaml is automatically updated whenever the dev_appserver
|
|
||||||
# detects that a new type of query is run. If you want to manage the
|
|
||||||
# index.yaml file manually, remove the above marker line (the line
|
|
||||||
# saying "# AUTOGENERATED"). If you want to manage some indexes
|
|
||||||
# manually, move them above the marker line. The index.yaml file is
|
|
||||||
# automatically uploaded to the admin console when you next deploy
|
|
||||||
# your application using appcfg.py.
|
|
||||||
|
|
||||||
- kind: TaskComponent
|
|
||||||
properties:
|
|
||||||
- name: order
|
|
||||||
- name: taskId
|
|
||||||
- name: userId
|
|
|
@ -92,11 +92,17 @@ body.noscroll
|
||||||
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
|
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
.md-toolbar-tools h1 {
|
/* Added BY devMatan */
|
||||||
font-size: inherit;
|
|
||||||
font-weight: inherit;
|
/*.disabledSubmitButton:
|
||||||
margin: inherit;
|
{
|
||||||
}
|
/*background: #f7f7f7;*/
|
||||||
|
/*border-radius: 10000px;*/
|
||||||
|
/*text-align: center;*/
|
||||||
|
|
||||||
|
/*position: relative !important;*
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
.campusAvatar img
|
.campusAvatar img
|
||||||
{
|
{
|
||||||
|
@ -292,16 +298,6 @@ body.noscroll
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hoverable{
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hoverable:hover{
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: #E2E2E2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.se-menu li:active{
|
.se-menu li:active{
|
||||||
background-color: #B2B2B2;
|
background-color: #B2B2B2;
|
||||||
text-shadow:#e0e0e0 1px 1px 0;
|
text-shadow:#e0e0e0 1px 1px 0;
|
||||||
|
|
|
@ -7,7 +7,6 @@ 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 = [];
|
||||||
|
@ -67,9 +66,26 @@ angular.module('SeHub')
|
||||||
$scope.msg.msgToAdd = null;
|
$scope.msg.msgToAdd = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.reviewTask = function(taskId, groupId)
|
$scope.reviewTask = function(task)
|
||||||
{
|
{
|
||||||
$location.path('/tasks/overview/' + taskId + '/' + groupId + '/' + 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);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.gotoTask = function(task)
|
$scope.gotoTask = function(task)
|
||||||
|
@ -176,11 +192,6 @@ angular.module('SeHub')
|
||||||
console.log($scope.courseObj);
|
console.log($scope.courseObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.getDate = function(msg){
|
|
||||||
return msg.date.day.toString() + "-" + msg.date.month.toString() +"-"+ msg.date.year.toString() + " " + msg.date.hour.toString() +":"+msg.date.minute.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$scope.chooseProjectClicked = function()
|
$scope.chooseProjectClicked = function()
|
||||||
{
|
{
|
||||||
console.log("choose project Clicked!!");
|
console.log("choose project Clicked!!");
|
||||||
|
@ -193,16 +204,6 @@ 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService', '$cookies', '$location',
|
angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService', '$cookies', '$location' ,
|
||||||
function($scope, apiService, $cookies, $location) {
|
function($scope, apiService, $cookies, $location) {
|
||||||
|
|
||||||
$scope.newComp = {};
|
$scope.newComp = {};
|
||||||
|
@ -44,10 +44,10 @@ angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService'
|
||||||
day: payload.dueDate.getDate()
|
day: payload.dueDate.getDate()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apiService.createTask(token, payload).success(function(data) {
|
apiService.createTask(token, payload).success(function(data){
|
||||||
$location.path('/tasks');
|
$location.path('/tasks');
|
||||||
}).error(function(err) {
|
}).error(function(err){
|
||||||
console.error(err);
|
console.error(err);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -95,10 +95,10 @@ angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService'
|
||||||
var type = $scope.newComp.type;
|
var type = $scope.newComp.type;
|
||||||
comp.type = type;
|
comp.type = type;
|
||||||
comp.order = compOrder;
|
comp.order = compOrder;
|
||||||
compOrder++;
|
compOrder ++;
|
||||||
comp.isMandatory = $scope.newComp.isMandatory;
|
comp.isMandatory = $scope.newComp.isMandatory;
|
||||||
comp.label = "";
|
comp.label = "";
|
||||||
var i = 0;
|
var i = 0
|
||||||
if (!(type === 'textbox' || type === 'textarea' || type === 'checkbox'))
|
if (!(type === 'textbox' || type === 'textarea' || type === 'checkbox'))
|
||||||
while ($scope.newComp.label[i]) {
|
while ($scope.newComp.label[i]) {
|
||||||
comp.label += $scope.newComp.label[i] + "|";
|
comp.label += $scope.newComp.label[i] + "|";
|
||||||
|
|
|
@ -7,48 +7,35 @@ angular.module('SeHub')
|
||||||
$scope.isEditPressed = false;
|
$scope.isEditPressed = false;
|
||||||
$scope.user = $scope.$parent.user;
|
$scope.user = $scope.$parent.user;
|
||||||
$scope.loadingData = true;
|
$scope.loadingData = true;
|
||||||
$scope.displayingMessages = true;
|
|
||||||
$scope.isMaster = false;
|
$scope.isMaster = false;
|
||||||
$scope.isMember = false;
|
$scope.isMember = false;
|
||||||
$scope.project = [];
|
$scope.project = [];
|
||||||
$scope.isInProject = false;
|
$scope.isInProject = false;
|
||||||
$scope.projectMessages = [];
|
$scope.projectMessages = [];
|
||||||
$scope.msg = {};
|
$scope.msg = {};
|
||||||
$scope.isMaster = false;
|
|
||||||
$scope.isLecturer = $scope.user.isLecturer;
|
|
||||||
|
|
||||||
// $scope.thisProject = {};
|
// $scope.thisProject = {};
|
||||||
// $scope.thisProject.courseName = $routeParams.className;
|
// $scope.thisProject.courseName = $routeParams.className;
|
||||||
|
|
||||||
|
|
||||||
console.log($scope.user.id)
|
|
||||||
// console.log($scope.projectid)
|
|
||||||
|
|
||||||
$scope.getDate = function(msg){
|
|
||||||
return msg.date.day.toString() + "-" + msg.date.month.toString() +"-"+ msg.date.year.toString() + " " + msg.date.hour.toString() +":"+msg.date.minute.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.displayProjectMessages = function()
|
$scope.displayProjectMessages = function()
|
||||||
{
|
{
|
||||||
apiService.getAllUserMessages(token).success(function(data)
|
apiService.getAllUserMessages(token).success(function(data)
|
||||||
{
|
{
|
||||||
$scope.displayingMessages = false;
|
$scope.projectMessages = data;
|
||||||
// for(var i = 0; i < data.length; i ++)
|
|
||||||
// if(!data.isPersonal)
|
|
||||||
$scope.projectMessages = data;
|
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
console.log(err.message);
|
console.log(err.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.goToProfile = function(memberId)
|
$scope.goToProfile = function(memberId)
|
||||||
{
|
{
|
||||||
$location.path('/profile/' + memberId);
|
$location.path('#/profile/' + memberId);
|
||||||
}
|
}
|
||||||
$scope.removeUserFromProject = function()
|
$scope.removeUserFromProject = function()
|
||||||
{
|
{
|
||||||
apiService.removeUserFromProject(token, $scope.user.id, projectId).success(function(data)
|
apiService.removeUserFromProject.success(function(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
|
@ -79,9 +66,6 @@ angular.module('SeHub')
|
||||||
|
|
||||||
$scope.removeProject = function(ev)
|
$scope.removeProject = function(ev)
|
||||||
{
|
{
|
||||||
if($scope.user.id === $scope.project.master_id)
|
|
||||||
$scope.isMaster = true;
|
|
||||||
|
|
||||||
var confirm = $mdDialog.confirm().title('Remove Project').content('Would you like to delete this project?').ariaLabel('removeProj')
|
var confirm = $mdDialog.confirm().title('Remove Project').content('Would you like to delete this project?').ariaLabel('removeProj')
|
||||||
.ok('Please do it!').cancel('No').targetEvent(ev);
|
.ok('Please do it!').cancel('No').targetEvent(ev);
|
||||||
$mdDialog.show(confirm).then(function()
|
$mdDialog.show(confirm).then(function()
|
||||||
|
@ -95,7 +79,7 @@ angular.module('SeHub')
|
||||||
$location.path('/myProjects');
|
$location.path('/myProjects');
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
$mdDialog.show($mdDialog.alert().title('Project Removal').content('Project removal failed - reason ' + err.message)
|
$mdDialog.show($mdDialog.alert().title('Project Removal').content('Project removal failed - reason' + err.message)
|
||||||
.ariaLabel('project remove alert dialog').ok('Try Again').targetEvent(ev));
|
.ariaLabel('project remove alert dialog').ok('Try Again').targetEvent(ev));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -119,6 +103,9 @@ angular.module('SeHub')
|
||||||
'message': $scope.msg.msgToAdd,
|
'message': $scope.msg.msgToAdd,
|
||||||
'isProject': true
|
'isProject': true
|
||||||
};
|
};
|
||||||
|
console.log(jsonNewMsg.message);
|
||||||
|
console.log(jsonNewMsg.groupId);
|
||||||
|
console.log(jsonNewMsg.isProject);
|
||||||
|
|
||||||
apiService.createMessage(token, jsonNewMsg).success(function(data)
|
apiService.createMessage(token, jsonNewMsg).success(function(data)
|
||||||
{
|
{
|
||||||
|
@ -154,8 +141,6 @@ angular.module('SeHub')
|
||||||
apiService.getProjectsById(token, projectId).success(function(data)
|
apiService.getProjectsById(token, projectId).success(function(data)
|
||||||
{
|
{
|
||||||
$scope.project = data;
|
$scope.project = data;
|
||||||
if($scope.user.id === $scope.project.master_id)
|
|
||||||
$scope.isMaster = true;
|
|
||||||
for(var i = 0; i < data.members.length; i++)
|
for(var i = 0; i < data.members.length; i++)
|
||||||
{
|
{
|
||||||
if($scope.user.id === data.members[i].id)
|
if($scope.user.id === data.members[i].id)
|
||||||
|
|
|
@ -38,8 +38,6 @@ angular.module('SeHub')
|
||||||
$scope.readOnly = true;
|
$scope.readOnly = true;
|
||||||
|
|
||||||
} else { //In This Case We Need An Empty Task To Be Able To Fill It
|
} else { //In This Case We Need An Empty Task To Be Able To Fill It
|
||||||
if($scope.isMaster)
|
|
||||||
$location.path('/tasks');
|
|
||||||
$scope.readOnly = false;
|
$scope.readOnly = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,12 +88,7 @@ angular.module('SeHub')
|
||||||
|
|
||||||
$scope.submitTask = function(event) { //Dialog will pop-up if not all mandatory fields are filled
|
$scope.submitTask = function(event) { //Dialog will pop-up if not all mandatory fields are filled
|
||||||
if (validateComponents()) {
|
if (validateComponents()) {
|
||||||
payload = $scope.task.components;
|
apiService.submitTask(token, taskId, groupId, $scope.task.components).success(function(data) {
|
||||||
for(var i = 0 ; i < payload.length ; i++){
|
|
||||||
if (payload[i].type === 'checkbox')
|
|
||||||
payload[i].value = payload[i].value.toString();
|
|
||||||
}
|
|
||||||
apiService.submitTask(token, taskId, groupId, payload).success(function(data) {
|
|
||||||
$mdDialog.show(
|
$mdDialog.show(
|
||||||
$mdDialog.alert()
|
$mdDialog.alert()
|
||||||
.title('Submitted!')
|
.title('Submitted!')
|
||||||
|
@ -108,9 +101,6 @@ 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 {
|
||||||
|
@ -148,7 +138,6 @@ angular.module('SeHub')
|
||||||
.ok('No Problem!')
|
.ok('No Problem!')
|
||||||
.targetEvent(event)
|
.targetEvent(event)
|
||||||
);
|
);
|
||||||
console.error(err);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,11 @@ angular.module('SeHub')
|
||||||
///Need to show the List
|
///Need to show the List
|
||||||
$mdDialog.show({
|
$mdDialog.show({
|
||||||
controller: DialogController,
|
controller: DialogController,
|
||||||
templateUrl: 'templates/views/UserStateList.html?v=1122231',
|
templateUrl: 'templates/views/UserStateList.html?v=1',
|
||||||
parent: $scope,
|
parent: $scope,
|
||||||
targetEvent: ev,
|
targetEvent: ev,
|
||||||
locals: {
|
locals: {
|
||||||
data: {
|
data: {task: task, token: token, isPersonal: isPersonal}
|
||||||
task: task,
|
|
||||||
token: token,
|
|
||||||
isPersonal: isPersonal
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function(answer) {
|
.then(function(answer) {
|
||||||
|
@ -46,83 +42,35 @@ angular.module('SeHub')
|
||||||
ownerId = $scope.user.projects_id_list[j];
|
ownerId = $scope.user.projects_id_list[j];
|
||||||
}
|
}
|
||||||
apiService.isTaskSubmitted(token, task.id, ownerId).success(function(data) {
|
apiService.isTaskSubmitted(token, task.id, ownerId).success(function(data) {
|
||||||
if (data.submitted) {
|
if (data.submitted)
|
||||||
if (ownerId)
|
$location.path('/tasks/overview/' + task.id + '/' + ownerId + '/' + ownerId)
|
||||||
$location.path('/tasks/overview/' + task.id + '/' + ownerId + '/' + ownerId);
|
else
|
||||||
else {
|
$location.path('/tasks/fill/' + task.id + '/' + ownerId)
|
||||||
$mdDialog.show(
|
})
|
||||||
$mdDialog.alert()
|
|
||||||
.title('You Have No Project in this class')
|
|
||||||
.content('To Be Able To Fill A Project Task you need to be assigned to a project')
|
|
||||||
.ariaLabel('ddd')
|
|
||||||
.ok('Ok, ill join/create a project')
|
|
||||||
.targetEvent(event)
|
|
||||||
|
|
||||||
).then(function() {
|
|
||||||
$location.path('/campuses');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (ownerId)
|
|
||||||
$location.path('/tasks/fill/' + task.id + '/' + ownerId);
|
|
||||||
else {
|
|
||||||
$mdDialog.show(
|
|
||||||
$mdDialog.alert()
|
|
||||||
.title('You Have No Project in this class')
|
|
||||||
.content('To Be Able To Fill A Project Task you need to be assigned to a project')
|
|
||||||
.ariaLabel('ddd')
|
|
||||||
.ok('Ok, ill join/create a project')
|
|
||||||
.targetEvent(event)
|
|
||||||
|
|
||||||
).then(function() {
|
|
||||||
$location.path('/campuses');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).error(function(err) {
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
}).error(function(err) {
|
}).error(function(err) {
|
||||||
console.error('Error: ', err);
|
console.error('Error: ', err);
|
||||||
});
|
|
||||||
} else {
|
|
||||||
apiService.isTaskSubmitted(token, task.id, $scope.user.id).success(function(data) {
|
|
||||||
if (data.submitted) {
|
|
||||||
$location.path('/tasks/overview/' + task.id + '/' + $scope.user.id + '/' + $scope.user.id);
|
|
||||||
} else {
|
|
||||||
$location.path('/tasks/fill/' + task.id + '/' + $scope.user.id);
|
|
||||||
}
|
|
||||||
}).error(function(err) {
|
|
||||||
console.error(err);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.createNewTask = function() {
|
|
||||||
$location.path('/tasks/new');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function DialogController($scope, $mdDialog, data, apiService) {
|
function DialogController($scope, $mdDialog, data, apiService) {
|
||||||
|
|
||||||
|
console.log(apiService);
|
||||||
$scope.task = data.task;
|
$scope.task = data.task;
|
||||||
$scope.isPersonal = data.isPersonal;
|
$scope.isPersonal = data.isPersonal;
|
||||||
var token = data.token;
|
var token = data.token;
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
|
|
||||||
apiService.getUsersStateByTask(token, $scope.task.id).success(function(data) {
|
apiService.getUsersStateByTask(token, $scope.task.id).success(function(data){
|
||||||
$scope.classList = data;
|
$scope.classList = data;
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
}).error(function(err) {
|
}).error(function(err){
|
||||||
console.error(err);
|
console.error(err);
|
||||||
$scope.hide();
|
$scope.hide();
|
||||||
})
|
})
|
||||||
|
|
||||||
$scope.goToTask = function(obj) {
|
|
||||||
$mdDialog.hide();
|
|
||||||
$location.path('/tasks/overview/' + $scope.task.id + '/' + obj.id + '/' + obj.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$scope.hide = function() {
|
$scope.hide = function() {
|
||||||
$mdDialog.hide();
|
$mdDialog.hide();
|
||||||
|
|
|
@ -117,14 +117,6 @@ 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 = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<md-dialog aria-label="Class Status" style='width: 60%'>
|
<md-dialog aria-label="Class Status" style='width: 80%'>
|
||||||
<form>
|
<form>
|
||||||
<md-toolbar>
|
<md-toolbar>
|
||||||
<div class="md-toolbar-tools">
|
<div class="md-toolbar-tools">
|
||||||
|
@ -10,14 +10,14 @@
|
||||||
</div>
|
</div>
|
||||||
</md-toolbar>
|
</md-toolbar>
|
||||||
<md-dialog-conten layout-padding>
|
<md-dialog-conten layout-padding>
|
||||||
<!-- <div ng-if='loading'>
|
<div ng-if='loading'>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div ng-if='!loading'>
|
<div ng-if='!loading'>
|
||||||
<div ng-repeat="obj in classList">
|
<div ng-repeat="obj in classList">
|
||||||
<div layout='row' width='100%' max-height="20px">
|
<div layout='row' width='100%' >
|
||||||
<div>
|
<div>
|
||||||
<img ng-src="{{obj.avatar_url || obj.logo_url}}" alt="" class='campusAvatar' style='max-height=15px'>
|
<img ng-src="{{obj.avatar_url || obj.logo_url}}" alt="" class='campusAvatar' style='max-height:auto'>
|
||||||
</div>
|
</div>
|
||||||
<div class='spacer'></div>
|
<div class='spacer'></div>
|
||||||
<div>{{obj.name || obj.projectName}}</div>
|
<div>{{obj.name || obj.projectName}}</div>
|
||||||
|
@ -28,20 +28,9 @@
|
||||||
</div>
|
</div>
|
||||||
<md-divider ng-if="!$last"></md-divider>
|
<md-divider ng-if="!$last"></md-divider>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
<md-list>
|
|
||||||
<md-list-item class="md-3-line hoverable" ng-repeat="obj in classList" layout="row" ng-click='goToTask(obj)'>
|
|
||||||
<img ng-src="{{obj.avatar_url || obj.logo_url}}?{{$index}}" class="md-avatar" alt="{{obj.id}}" />
|
|
||||||
<div class="md-list-item-text">
|
|
||||||
<h4>{{obj.name || obj.projectName}}</h3>
|
|
||||||
<p>Grade: {{obj.grade.grade || "Not Yet Reviewed"}}</p>
|
|
||||||
<!-- <p>{{ item.notes }}</p> -->
|
|
||||||
</div>
|
|
||||||
</md-list-item>
|
|
||||||
</md-list>
|
|
||||||
|
|
||||||
</md-dialog-content>
|
</md-dialog-content>
|
||||||
<!-- <div class="md-actions" layout="row">
|
<div class="md-actions" layout="row">
|
||||||
<md-button href="http://en.wikipedia.org/wiki/Mango" target="_blank" hide show-md>
|
<md-button href="http://en.wikipedia.org/wiki/Mango" target="_blank" hide show-md>
|
||||||
More on Wikipedia
|
More on Wikipedia
|
||||||
</md-button>
|
</md-button>
|
||||||
|
@ -52,6 +41,6 @@
|
||||||
<md-button ng-click="answer('useful')" class="md-primary">
|
<md-button ng-click="answer('useful')" class="md-primary">
|
||||||
Useful
|
Useful
|
||||||
</md-button>
|
</md-button>
|
||||||
</div> -->
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</md-dialog>
|
</md-dialog>
|
|
@ -70,7 +70,6 @@
|
||||||
<div>
|
<div>
|
||||||
{{msg.group.courseName}}
|
{{msg.group.courseName}}
|
||||||
{{msg.group.projectName}}
|
{{msg.group.projectName}}
|
||||||
{{getDate(msg)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div flex = "40">
|
<div flex = "40">
|
||||||
|
@ -82,25 +81,16 @@
|
||||||
</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">
|
||||||
<div ng-repeat = "course in unSubmittedTasks">
|
<md-card ng-repeat = "task in userTasks" layout-padding>
|
||||||
<md-card ng-repeat = "task in course.tasks" layout-padding>
|
<div>
|
||||||
Title: {{task.title}}
|
Title:
|
||||||
<br/>{{(task.isPersonal) ? "A personal task": "A project task"}}
|
<md-button ng-click="reviewTask(task)">
|
||||||
<div ng-repeat = "uName in task.usersToReview">
|
{{task.title}}
|
||||||
<br></br>
|
</md-button>
|
||||||
<md-button ng-click="reviewTask(task.id, uName.id)">
|
<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.id, projName.id)">
|
|
||||||
Name: {{projName.projectName}}
|
|
||||||
</md-button>
|
|
||||||
</div>
|
|
||||||
</md-card>
|
|
||||||
</div>
|
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
</md-tabs>
|
</md-tabs>
|
||||||
|
@ -122,15 +112,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Latest Message-
|
Latest Message-
|
||||||
<md-card layout-margin layout-padding>
|
<md-card layout-margin layout-padding ng-if="!userMessages">
|
||||||
{{userMessages[0].message}}
|
{{userMessages[0].message}}
|
||||||
</md-card>
|
</md-card>
|
||||||
|
<md-card layout-margin layout-padding ng-if="userMessages">
|
||||||
|
No Messages.
|
||||||
|
</md-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class ="addMessage" layout="row" layout-margin layout padding>
|
<div class ="addMessage" layout="row" layout-margin layout padding>
|
||||||
<div>
|
<div>
|
||||||
<md-button ng-click="addMessageClicked()" ng class="md-raised md-primary" aria-label="aM">
|
<md-button ng-click="addMessageClicked()" ng class="md-raised md-primary" aria-label="aM"><i class="fa fa-comments"></i></md-button>
|
||||||
<i class="fa fa-comments"></i></md-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="addMsg">
|
<div ng-if="addMsg">
|
||||||
|
@ -158,18 +150,17 @@
|
||||||
<md-tabs md-dynamic-height md-border-bottom>
|
<md-tabs md-dynamic-height md-border-bottom>
|
||||||
<md-tab label="Messages">
|
<md-tab label="Messages">
|
||||||
<md-card ng-repeat = "msg in userMessages">
|
<md-card ng-repeat = "msg in userMessages">
|
||||||
<div layout = "row" layout-padding>
|
<div layout = "column" layout-padding>
|
||||||
<div flex = "10" class="md-avatar">
|
<div flex = "30" class="md-avatar">
|
||||||
<img ng-src="{{msg.user.avatar_url}}" style="width:80%">
|
<img ng-src="{{msg.user.avatar_url}}" style="width:100%">
|
||||||
</div>
|
</div>
|
||||||
<div flex = "20" layout = "column">
|
<div flex = "20" layout = "row">
|
||||||
<div>
|
<div>
|
||||||
{{msg.user.username}}
|
{{msg.user.username}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{msg.group.courseName}}
|
{{msg.group.courseName}}
|
||||||
{{msg.group.projectName}}
|
{{msg.group.projectName}}
|
||||||
{{getDate(msg)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div flex = "40">
|
<div flex = "40">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div layout = "row" flex = "45">
|
<div layout = "row" flex = "45">
|
||||||
<!-- <div ng-if = "isMasterOrLecturer"> -->
|
<!-- <div ng-if = "isMasterOrLecturer"> -->
|
||||||
<md-card layout = "row">
|
<md-card layout = "row">
|
||||||
<div ng-if="!isLecturer && !isMember && !isInProject" layout-padding>
|
<div ng-if="!isMember && !isInProject" layout-padding>
|
||||||
<md-button ng-click="joinProject($event)" ng class = "md-raised md-primary" aria-label="jP">
|
<md-button ng-click="joinProject($event)" ng class = "md-raised md-primary" aria-label="jP">
|
||||||
<i class="fa fa-user-plus"></i>
|
<i class="fa fa-user-plus"></i>
|
||||||
</md-button>
|
</md-button>
|
||||||
|
@ -44,20 +44,20 @@
|
||||||
Team Members:
|
Team Members:
|
||||||
<ul layout-padding>
|
<ul layout-padding>
|
||||||
<div layout = "column" ng-repeat = "member in project.members">
|
<div layout = "column" ng-repeat = "member in project.members">
|
||||||
<div layout = "row">
|
<!-- <li ng-repeat = "member in project.members"> -->
|
||||||
<div>
|
<div layout = "row">
|
||||||
<md-button ng-click = "goToProfile(member.id)">
|
<div>
|
||||||
{{member.name}}
|
<md-button ng-click = "goToProfile(member.id)">
|
||||||
</md-button>
|
{{member.name}}
|
||||||
</div>
|
</md-button>
|
||||||
<div ng-if="isMaster">
|
</div>
|
||||||
<div ng-if = "isEditPressed">
|
<div ng-if = "isEditPressed">
|
||||||
<md-button ng-click="removeUserFromProject()" ng class="md-raised md-primary" aria-label="rU">
|
<md-button ng-click="removeUserFromProject()" ng class="md-raised md-primary" aria-label="rU">
|
||||||
<i class="fa fa-times"></i>
|
<i class="fa fa-times"></i>
|
||||||
</md-button>
|
</md-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </li> -->
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,34 +100,28 @@
|
||||||
<div flex = "96" style="height:70%;">
|
<div flex = "96" style="height:70%;">
|
||||||
<div flex>
|
<div flex>
|
||||||
<md-card>
|
<md-card>
|
||||||
<md-content>
|
<md-content class="md-padding">
|
||||||
<md-tabs md-dynamic-height md-border-bottom>
|
<md-tabs md-dynamic-height md-border-bottom>
|
||||||
<md-tab label="Messages">
|
<md-tab label="Messages">
|
||||||
<div ng-if="displayingMessages" layout-paddig layout-margin class="loader">
|
<md-card ng-repeat = "msg in userMessages">
|
||||||
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
|
<div layout = "column" layout-padding>
|
||||||
</div>
|
<div flex = "30" class="md-avatar">
|
||||||
<md-content class="tabDesign">
|
<img ng-src="{{msg.user.avatar_url}}" style="width:100%">
|
||||||
<md-card ng-repeat = "msg in projectMessages">
|
</div>
|
||||||
<div layout = "row" layout-padding ng-if="!displayingMessages && msg.isProject && msg.groupId == project.id">
|
<div flex = "20" layout = "row">
|
||||||
<div flex = "10">
|
<div>
|
||||||
<img ng-src="{{msg.user.avatar_url}}" style="width:80%">
|
{{msg.user.username}}
|
||||||
</div>
|
</div>
|
||||||
<div flex = "20" layout = "column">
|
<div>
|
||||||
<div>
|
{{msg.group.courseName}}
|
||||||
{{msg.user.username}}
|
{{msg.group.projectName}}
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{msg.group.courseName}}
|
|
||||||
{{msg.group.projectName}}
|
|
||||||
{{getDate(msg)}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div flex = "40">
|
|
||||||
{{msg.message}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</md-card>
|
<div flex = "40">
|
||||||
</md-content>
|
{{msg.message}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</md-card>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<md-tab label="Commits">
|
<md-tab label="Commits">
|
||||||
<md-content class="tabDesign">
|
<md-content class="tabDesign">
|
||||||
|
@ -139,21 +133,21 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr ng-repeat = "commit in project.info.commits" layout-margin align = "center">
|
<tr ng-repeat = "commit in project.info.commits" layout-margin align = "center">
|
||||||
<td>
|
<td>
|
||||||
<span>
|
<span ng-repeat = "msg in commit">
|
||||||
<a target = "_blank"ng-href="{{commit.html_url}}"
|
<a target = "_blank"ng-href="{{commit.html_url}}"
|
||||||
style="text-decoration:none; color:black;">
|
style="text-decoration:none; color:black;">
|
||||||
{{commit.commit.message}}
|
{{msg.message}}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span >
|
<span ng-repeat = "date in commit.author">
|
||||||
{{commit.commit.committer.date}}
|
{{date.date}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td >
|
<td ng-repeat = "member in project.members">
|
||||||
<a ng-href="#/profile/{{member.id}}" style="text-decoration:none; color:black;">
|
<a ng-href="#/profile/{{member.id}}" style="text-decoration:none; color:black;">
|
||||||
{{commit.commit.committer.name}}
|
{{member.name}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -186,7 +180,7 @@
|
||||||
{{issue.milestone.title}}
|
{{issue.milestone.title}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span>
|
<span ng-repeat = "member in project.members">
|
||||||
<a ng-href = "{{getProfileRoute(issue.assignee.login)}}" style="text-decoration:none; color:black;">
|
<a ng-href = "{{getProfileRoute(issue.assignee.login)}}" style="text-decoration:none; color:black;">
|
||||||
{{issue.assignee.login}}
|
{{issue.assignee.login}}
|
||||||
</a>
|
</a>
|
||||||
|
@ -197,12 +191,12 @@
|
||||||
</table>
|
</table>
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<!-- <md-tab label="tasks">
|
<md-tab label="tasks">
|
||||||
<md-content class="md-padding">
|
<md-content class="md-padding">
|
||||||
<h1 class="md-display-2">tasks</h1>
|
<h1 class="md-display-2">tasks</h1>
|
||||||
<p>tasks..</p>
|
<p>tasks..</p>
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab> -->
|
</md-tab>
|
||||||
</md-tabs>
|
</md-tabs>
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
|
|
|
@ -101,14 +101,6 @@
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
</md-tabs>
|
</md-tabs>
|
||||||
<div style='position:fixed;bottom:15px;right:15px'>
|
|
||||||
<md-button class="md-fab md-primary" ng-click='createNewTask()'>
|
|
||||||
<md-tooltip md-direction='top' >
|
|
||||||
Create New Task
|
|
||||||
</md-tooltip>
|
|
||||||
<i class="fa fa-plus"></i>
|
|
||||||
</md-button>
|
|
||||||
</div>
|
|
||||||
</md-content>
|
</md-content>
|
||||||
</div>
|
</div>
|
||||||
</md-content>
|
</md-content>
|
Loading…
Reference in a new issue