Ignore:
Timestamp:
24 Jun 2017, 07:11:54 (8 years ago)
Author:
Henrik Bettermann
Message:

Implement study_mode filter for lecturer pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r14661 r14700  
    218218
    219219    def test_for_instalment_payments(self):
    220 
    221220        configuration_1 = createObject('waeup.SessionConfiguration')
    222221        configuration_1.academic_session = 2015
     
    364363        # set value to change from
    365364        self.student['studycourse']['100']['COURSE1'].score = 55
     365        self.app['configuration']['2004'].score_editing_enabled = ['ug_ft']
    366366        self.browser.open(self.edit_scores_url)
    367367        upload_ctrl = self.browser.getControl(name='uploadfile:file')
     
    381381        self.browser.open(self.edit_prev_scores_url)
    382382        self.assertTrue('No student found' in self.browser.contents)
     383        configuration = createObject('waeup.SessionConfiguration')
     384        configuration.academic_session = 2003
     385        self.app['configuration'].addSessionConfiguration(configuration)
     386        self.app['configuration']['2003'].score_editing_enabled = ['ug_ft']
    383387        self.student['studycourse']['100'].level_session = 2003
    384388        notify(grok.ObjectModifiedEvent(self.student['studycourse']['100']['COURSE1']))
     
    407411        self.student['studycourse']['100']['COURSE1'].score = 55
    408412        self.student['studycourse']['100']['COURSE1'].ca = 11
     413        self.app['configuration']['2004'].score_editing_enabled = ['ug_ft']
    409414        pdf_url = '%s/coursetickets.pdf' % self.course_url
    410415        self.browser.open(pdf_url)
     
    415420        open(path, 'wb').write(self.browser.contents)
    416421        print "Sample PDF coursetickets.pdf written to %s" % path
     422
     423    def test_lecturers_do_only_see_selected_students(self):
     424        # A course ticket slip can be downloaded
     425        self.login_as_lecturer()
     426        self.student['studycourse']['100']['COURSE1'].score = 55
     427        self.student['studycourse']['100']['COURSE1'].ca = 11
     428        self.browser.open(self.edit_scores_url)
     429        self.assertTrue('No student found' in self.browser.contents)
     430        self.app['configuration']['2004'].score_editing_enabled = ['ug_ft']
     431        self.browser.open(self.edit_scores_url)
     432        self.assertFalse('No student found' in self.browser.contents)
     433        self.assertTrue('TESTER, Anna' in self.browser.contents)
    417434
    418435    def test_transcripts(self):
     
    11191136        self.app['faculties']['fac1']['dep1'].score_editing_disabled = False
    11201137        self.app['configuration'].current_academic_session = 2004
     1138        self.app['configuration']['2004'].score_editing_enabled = ['ug_ft']
    11211139        IWorkflowState(self.student).setState('courses validated')
    11221140        self.browser.open(
Note: See TracChangeset for help on using the changeset viewer.