Changeset 15226


Ignore:
Timestamp:
9 Nov 2018, 13:35:24 (6 years ago)
Author:
Henrik Bettermann
Message:

Add imported_ts (total score) field and override total_score if imported.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
5 edited

Legend:

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

    r15207 r15226  
    7878            'mandatory', 'score', 'ca', 'carry_over', 'automatic',
    7979            'level_session', 'outstanding', 'course_category',
    80             'title', 'credits', 'passmark', 'semester', 'ticket_session'
     80            'title', 'credits', 'passmark', 'semester', 'ticket_session',
     81            'imported_ts'
    8182            ] + self.additional_fields
    8283        return sorted(fields)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r15205 r15226  
    867867    form_fields['carry_over'].for_display = True
    868868    form_fields['ticket_session'].for_display = True
     869    form_fields['imported_ts'].for_display = True
    869870
    870871class CustomEditScoresPage(EditScoresPage):
  • main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py

    r14318 r15226  
    592592        )
    593593
     594    imported_ts = schema.Int(
     595        title = _(u'Imported Total Score'),
     596        default = None,
     597        required = False,
     598        missing_value = None,
     599        max = 100,
     600        )
     601
    594602class ICustomCourseTicketImport(ICustomCourseTicket):
    595603    """An interface for importing course results and nothing more.
  • main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py

    r15178 r15226  
    408408        """Returns ca + score.
    409409        """
     410        # Override total_score if value has been imported
     411        if getattr(self, 'imported_ts', None):
     412            return self.imported_ts
    410413        if self.score == -1:
    411414            return 0
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py

    r15205 r15226  
    192192        self.assertEqual(
    193193            result,
    194             'automatic,ca,carry_over,code,course_category,credits,dcode,fcode,level,level_session,'
     194            'automatic,ca,carry_over,code,course_category,credits,dcode,fcode,imported_ts,level,level_session,'
    195195            'mandatory,outstanding,passmark,score,semester,ticket_session,title,student_id,certcode,'
    196196            'display_fullname,matric_number\r\n'
    197             '1,,1,CRS1,,100,DEP1,FAC1,100,2012,0,0,100,,2,,Course 1,A111111,CERT1,'
     197            '1,,1,CRS1,,100,DEP1,FAC1,,100,2012,0,0,100,,2,,Course 1,A111111,CERT1,'
    198198            '"TESTER, Anna M.",234\r\n'
    199199            )
Note: See TracChangeset for help on using the changeset viewer.