equal
deleted
inserted
replaced
35 from soc.logic.models import work |
35 from soc.logic.models import work |
36 from soc.models.program import Program |
36 from soc.models.program import Program |
37 from soc.models import student_project |
37 from soc.models import student_project |
38 from soc.models.survey import Survey |
38 from soc.models.survey import Survey |
39 from soc.models.grading_project_survey import GradingProjectSurvey |
39 from soc.models.grading_project_survey import GradingProjectSurvey |
|
40 from soc.models.grading_record import GradingRecord |
40 from soc.models.project_survey import ProjectSurvey |
41 from soc.models.project_survey import ProjectSurvey |
41 from soc.models.survey import SurveyContent |
42 from soc.models.survey import SurveyContent |
42 from soc.models.survey_record import SurveyRecord |
43 from soc.models.survey_record import SurveyRecord |
43 from soc.models.survey_record_group import SurveyRecordGroup |
|
44 from soc.models.work import Work |
44 from soc.models.work import Work |
45 |
45 |
46 #TODO(James): Ensure this facilitates variable # of surveys |
46 #TODO(James): Ensure this facilitates variable # of surveys |
47 GRADES = {'pass': True, 'fail': False} |
47 GRADES = {'pass': True, 'fail': False} |
48 PROJECT_STATUSES = { |
48 PROJECT_STATUSES = { |
198 return False |
198 return False |
199 |
199 |
200 program = survey.scope or Program.get_by_key_name(survey.scope_path) |
200 program = survey.scope or Program.get_by_key_name(survey.scope_path) |
201 |
201 |
202 for project in program.student_projects.fetch(1000): |
202 for project in program.student_projects.fetch(1000): |
203 this_record_group = SurveyRecordGroup.all().filter( |
203 this_record_group = GradingRecord.all().filter( |
204 "project = ", project).filter( |
204 "project = ", project).filter( |
205 "initial_status = ", project.status).get() |
205 "initial_status = ", project.status).get() |
206 |
206 |
207 if not this_record_group: |
207 if not this_record_group: |
208 logging.warning('neither mentor nor student has \ |
208 logging.warning('neither mentor nor student has \ |