163 |
163 |
164 def getRecords(self): |
164 def getRecords(self): |
165 """Returns all SurveyRecords belonging to this survey. |
165 """Returns all SurveyRecords belonging to this survey. |
166 """ |
166 """ |
167 return self.survey_records |
167 return self.survey_records |
168 |
|
169 |
|
170 class ProjectSurvey(Survey): |
|
171 """Survey for Students that have a StudentProject. |
|
172 """ |
|
173 |
|
174 def __init__(self, *args, **kwargs): |
|
175 super(ProjectSurvey, self).__init__(*args, **kwargs) |
|
176 self.prefix = 'program' |
|
177 self.taking_access = 'student' |
|
178 self.scope = Program.get_by_key_name(self.scope_path) |
|
179 |
|
180 def getRecords(self): |
|
181 """Returns all ProjectSurveyRecords belonging to this survey. |
|
182 """ |
|
183 return self.project_survey_records |
|
184 |
|
185 |
|
186 class GradingProjectSurvey(ProjectSurvey): |
|
187 """Survey for Mentors that have a StudentProject. |
|
188 """ |
|
189 |
|
190 def __init__(self, *args, **kwargs): |
|
191 super(GradingProjectSurvey, self).__init__(*args, **kwargs) |
|
192 self.taking_access = 'mentor' |
|
193 |
|
194 def getRecords(self): |
|
195 """Returns all GradingProjectSurveyRecords belonging to this survey. |
|
196 """ |
|
197 return self.grading_survey_records |
|