Ignore:
Timestamp:
4 Dec 2012, 11:10:50 (12 years ago)
Author:
Henrik Bettermann
Message:

Also in Uniben students are allowed to remove required courses.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/studylevel.py

    r9691 r9765  
    6464    grok.provides(ICustomCourseTicket)
    6565
     66    @property
     67    def removable_by_student(self):
     68        return True
     69
    6670CustomCourseTicket = attrs_to_fields(CustomCourseTicket)
    6771
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r9731 r9765  
    364364        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    365365        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     366        # Even if course is mandatory, students can remove the course
     367        self.student['studycourse']['100']['COURSE1'].mandatory = True
     368        self.browser.open(self.student_path + '/studycourse/100')
     369        self.browser.getLink("Edit course list").click()
     370        ctrl = self.browser.getControl(name='val_id')
     371        ctrl.getControl(value='COURSE1').selected = True
     372        self.browser.getControl("Remove selected", index=0).click()
     373        self.assertTrue('Successfully removed' in self.browser.contents)
    366374
    367375    def test_get_returning_data(self):
Note: See TracChangeset for help on using the changeset viewer.