Finish settings refactor

This commit is contained in:
Vik Paruchuri
2013-02-11 17:36:33 -05:00
parent aca5e2300b
commit 0f71f5b92e
4 changed files with 4 additions and 1 deletions

View File

@@ -23,7 +23,6 @@ class GradingService(object):
self.username = config['username']
self.password = config['password']
self.url = config['url']
self.login_url = self.url + '/login/'
self.session = requests.session()
self.system = config['system']

View File

@@ -29,6 +29,7 @@ class PeerGradingService(GradingService):
config['system'] = system
super(PeerGradingService, self).__init__(config)
self.url = config['url'] + config['peer_grading']
self.login_url = self.url + '/login/'
self.get_next_submission_url = self.url + '/get_next_submission/'
self.save_grade_url = self.url + '/save_grade/'
self.is_student_calibrated_url = self.url + '/is_student_calibrated/'

View File

@@ -21,6 +21,7 @@ class ControllerQueryService(GradingService):
config['system'] = ModuleSystem(None, None, None, render_to_string, None)
super(ControllerQueryService, self).__init__(config)
self.url = config['url'] + config['grading_controller']
self.login_url = self.url + '/login/'
self.check_eta_url = self.url + '/get_submission_eta/'
self.is_unique_url = self.url + '/is_name_unique/'
self.combined_notifications_url = self.url + '/combined_notifications/'

View File

@@ -64,6 +64,8 @@ class StaffGradingService(GradingService):
def __init__(self, config):
config['system'] = ModuleSystem(None, None, None, render_to_string, None)
super(StaffGradingService, self).__init__(config)
self.url = config['url'] + config['staff_grading']
self.login_url = self.url + '/login/'
self.get_next_url = self.url + '/get_next_submission/'
self.save_grade_url = self.url + '/save_grade/'
self.get_problem_list_url = self.url + '/get_problem_list/'