Changeset 3841


Ignore:
Timestamp:
8 Jan 2009, 15:07:41 (16 years ago)
Author:
Henrik Bettermann
Message:
  • further improvements for student data archiving by importCSV
  • first customizations for AAUE payment
  • minor changes
Location:
WAeUP_SRP/trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPImport.py

    r3823 r3841  
    910910                line.append(format % d)
    911911                open(export_file,"a").write('\n'.join(line) +'\n')
     912                self.course_results.getExportRemoveAllCourses(student_id = student_id, export = True, remove = True)
    912913                # end export
    913914                students_folder.manage_delObjects((student_id),)         
  • WAeUP_SRP/trunk/WAeUPTables.py

    r3781 r3841  
    16671667        return courses
    16681668    ###)
     1669   
     1670    def getExportRemoveAllCourses(self,student_id,export=False,remove=False): ###(
     1671        ""
     1672        query = Eq('student_id',student_id)
     1673        cr_catalog = self.course_results
     1674        course_results = cr_catalog.evalAdvancedQuery(query)
     1675        courses = []
     1676        fields = self.schema()
     1677        format = '"%(' + ')s","%('.join(fields) + ')s"'
     1678        for brain in course_results:
     1679            d = {}
     1680            for field in fields:
     1681                d[field] = getattr(brain,field,'')
     1682            courses.append(format % d)
     1683               
     1684        if export:
     1685            export_file = "%s/export/course_results_removed.csv" % (i_home)
     1686            file_handler = open(export_file,"a")
     1687            headline = ','.join(fields)
     1688            file_handler.write(headline +'\n')
     1689            for line in courses:
     1690                file_handler.write(line +'\n')
     1691
     1692        if remove:
     1693            for brain in course_results:
     1694                key = getattr(brain,'key','')
     1695                cr_catalog.deleteRecord(key)
     1696       
     1697        return courses
     1698    ###)   
    16691699
    16701700InitializeClass(CourseResults)
  • WAeUP_SRP/trunk/skins/waeup_ois/academic_report_slip.pt

    r3811 r3841  
    2626                    <tr tal:condition="python:info[sem[1]]">
    2727                        <th />
    28                         <th align='center'>ATL</th> 
     28                        <th align='center'>Attitude To <br />Learning</th> 
    2929                        <th align='center'>CA 1 <br />Marks</th>
    3030                        <th align='center'>CA 2 <br />Marks</th>   
  • WAeUP_SRP/trunk/skins/waeup_ois/academic_report_view.pt

    r3811 r3841  
    8585        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')"
    8686            tal:content="python:sem[1]" />
    87         <th align='center'>ATL</th>   
     87        <th align='center'>Attitude To Learning</th>   
    8888        <th align='center'>CA 1 <br />Marks</th>
    8989        <th align='center'>CA 2 <br />Marks</th>   
Note: See TracChangeset for help on using the changeset viewer.