Changeset 13922 for main/waeup.kofa/branches/uli-scores-upload/src
- Timestamp:
- 13 Jun 2016, 00:44:56 (9 years ago)
- Location:
- main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students/browser.py
r13908 r13922 3130 3130 scores = form['scores'] 3131 3131 sids = form['sids'] 3132 if isinstance(scores, basestring):3133 scores = [scores]3134 if isinstance(sids, basestring):3135 sids = [sids]3136 3132 formvals = dict([(sids[i], scores[i]) for i in range(len(sids))]) 3137 3133 for ticket in editable_tickets: -
main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students/browser_templates/editscorespage.pt
r13920 r13922 24 24 25 25 <td tal:condition="ticket/editable_by_lecturer" style="width: 65px;"> 26 <input type="text" name="scores " class="form-control"26 <input type="text" name="scores:list" class="form-control" 27 27 tal:attributes="value ticket/score" /> 28 <input type="hidden" name="sids "28 <input type="hidden" name="sids:list" 29 29 tal:attributes="value ticket/student/student_id" /> 30 30 </td> -
main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students/tests/test_browser.py
r13921 r13922 3962 3962 IWorkflowState(self.student).setState(VALIDATED) 3963 3963 self.browser.open(self.edit_scores_url) 3964 self.assertTrue(self.browser.getControl(name="scores") is not None) 3964 self.assertTrue( 3965 self.browser.getControl(name="scores:list") is not None) 3965 3966 3966 3967 def test_score_editing_offers_only_current_scores(self): … … 3981 3982 self.app['configuration'].current_academic_session = 2004 3982 3983 self.browser.reload() 3983 self.assertTrue(self.browser.getControl(name="scores") is not None) 3984 self.assertTrue( 3985 self.browser.getControl(name="scores:list") is not None) 3984 3986 3985 3987 def test_score_editing_can_change_scores(self): … … 3989 3991 self.student['studycourse']['100']['COURSE1'].score, None) 3990 3992 self.browser.open(self.edit_scores_url) 3991 self.browser.getControl(name="scores ", index=0).value = '55'3993 self.browser.getControl(name="scores:list", index=0).value = '55' 3992 3994 self.browser.getControl("Update scores").click() 3993 3995 # the new value is stored in data … … 3996 3998 # the new value is displayed on page/prefilled in form 3997 3999 self.assertEqual( 3998 self.browser.getControl(name="scores ", index=0).value, '55')4000 self.browser.getControl(name="scores:list", index=0).value, '55') 3999 4001 # The change has been logged 4000 4002 with open(self.stud_log_path, 'r') as fd: … … 4007 4009 self.login_as_lecturer() 4008 4010 self.browser.open(self.edit_scores_url) 4009 self.browser.getControl(name="scores ", index=0).value = 'abc'4011 self.browser.getControl(name="scores:list", index=0).value = 'abc' 4010 4012 self.browser.getControl("Update scores").click() 4011 4013 self.assertTrue( … … 4019 4021 self.student['studycourse']['100']['COURSE1'].score = None 4020 4022 self.browser.open(self.edit_scores_url) 4021 self.browser.getControl(name="scores ", index=0).value = ''4023 self.browser.getControl(name="scores:list", index=0).value = '' 4022 4024 self.browser.getControl("Update scores").click() 4023 4025 logcontent = open(self.stud_log_path, 'r').read() … … 4025 4027 # now retry with some value set 4026 4028 self.student['studycourse']['100']['COURSE1'].score = 55 4027 self.browser.getControl(name="scores ", index=0).value = ''4029 self.browser.getControl(name="scores:list", index=0).value = '' 4028 4030 self.browser.getControl("Update scores").click() 4029 4031 logcontent = open(self.stud_log_path, 'r').read()
Note: See TracChangeset for help on using the changeset viewer.