示例#1
0
    def shouldSubmitForms(self):
        """Checks if the current user should submit the student forms
    """
        student_id_form = False
        consent_form = False

        if not self.data.student_info:
            return False, False, False

        query = queryAllTasksClosedByStudent(self.data.profile, keys_only=True)

        # If the current user is not a student or if he is a student and has
        # not completed even a single task successfully he/she need not submit
        # any forms.
        if query.count() < 1:
            return False, False, False

        has_completed_task = True

        if not self.data.student_info.student_id_form:
            student_id_form = True

        if not self.data.student_info.consent_form:
            consent_form = True

        return has_completed_task, student_id_form, consent_form
示例#2
0
 def _getQuery(self):
   return task_logic.queryAllTasksClosedByStudent(self.data.url_profile)
示例#3
0
 def _getQuery(self):
     return task_logic.queryAllTasksClosedByStudent(self.data.url_profile)