Changeset 13002 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 26 May 2015, 15:34:36 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r12999 r13002 427 427 """Representation of student study course data. 428 428 """ 429 student = Attribute('Student object') 430 next_session_allowed = Attribute('True if the student can proceed to next session') 431 is_postgrad = Attribute('True if student is postgraduate student') 432 is_current = Attribute('True if the study course is the current course of studies') 433 is_previous = Attribute('True if the study course is the previous course of studies') 434 429 435 certificate = schema.Choice( 430 436 title = _(u'Certificate'), … … 476 482 ) 477 483 484 def writeLogMessage(view, message): 485 """Write formatted log message into students.log. 486 """ 487 488 def addStudentStudyLevel(cert, studylevel): 489 """Add a study level object. 490 """ 491 492 def getTranscriptData(): 493 """Get a sorted list of dicts with level and course ticket data. 494 This method is used for transcripts. 495 """ 496 478 497 class IStudentStudyCourseTransfer(IStudentStudyCourse): 479 498 """An interface used for student transfers. … … 558 577 """A representation of student study level data. 559 578 """ 579 student = Attribute('Student object') 580 581 certcode = Attribute('The certificate code of the study course') 582 is_current_level = Attribute('True if level is current level of the student') 583 level_title = Attribute('Level title from source') 584 getSessionString = Attribute('Session title from source') 560 585 number_of_tickets = Attribute('Number of tickets contained in this level') 561 certcode = Attribute('The certificate code of the study course')562 is_current_level = Attribute('Is this level the current level of the student?')563 586 passed_params = Attribute('Information about passed and failed courses') 587 gpa_params_rectified = Attribute('Corrected sessional GPA parameters') 588 gpa_params = Attribute('GPA parameters for this level.') 589 cumulative_params = Attribute('Cumulative GPA and other cumulative parameters for this level') 564 590 565 591 level = schema.Choice( … … 606 632 readonly = True, 607 633 ) 634 635 def writeLogMessage(view, message): 636 """Write formatted log message into students.log. 637 """ 608 638 609 639 def addCourseTicket(ticket, course): -
main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py
r10479 r13002 71 71 @property 72 72 def is_current(self): 73 if '_' in self.__name__:73 if self.__name__ and '_' in self.__name__: 74 74 return False 75 75 return True -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r12882 r13002 101 101 @property 102 102 def gpa_params_rectified(self): 103 """Calculate corrected corrected level (sesional) gpa parameters. 104 103 """Calculate corrected level (sessional) gpa parameters. 105 104 The corrected gpa is displayed on transcripts only. 106 105 """ … … 166 165 """Calculate the cumulative gpa and other cumulative parameters 167 166 for this level. 168 169 167 All levels below this level are taken under consideration 170 168 (including repeating levels). This method is used for level reports. … … 175 173 total_credits_weighted = 0 176 174 cgpa = 0.0 177 for level in self.__parent__.values(): 178 if level.level > self.level: 179 continue 180 credits_passed += level.passed_params[2] 181 total_credits += level.total_credits 182 gpa_params = level.gpa_params 183 total_credits_counted += gpa_params[1] 184 total_credits_weighted += gpa_params[2] 185 if total_credits_counted: 186 cgpa = round(total_credits_weighted / total_credits_counted, 3) 175 if self.__parent__: 176 for level in self.__parent__.values(): 177 if level.level > self.level: 178 continue 179 credits_passed += level.passed_params[2] 180 total_credits += level.total_credits 181 gpa_params = level.gpa_params 182 total_credits_counted += gpa_params[1] 183 total_credits_weighted += gpa_params[2] 184 if total_credits_counted: 185 cgpa = round(total_credits_weighted / total_credits_counted, 3) 187 186 return (cgpa, total_credits_counted, total_credits_weighted, 188 187 total_credits, credits_passed) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py
r12971 r13002 78 78 self.studycourse = StudentStudyCourse() 79 79 self.studylevel = StudentStudyLevel() 80 self.studylevel.level_session = 2015 80 81 self.courseticket = CourseTicket() 81 82 self.payments = StudentPaymentsContainer()
Note: See TracChangeset for help on using the changeset viewer.