Changeset 2067


Ignore:
Timestamp:
27 Jul 2007, 10:17:53 (17 years ago)
Author:
Henrik Bettermann
Message:

resolve ticket #315 number 1 and 2

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py

    r1788 r2067  
    3131                   'courses_validated',
    3232                   )
     33
     34full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
     35part_time =       (         'de_pt','ug_pt','pg_pt')
     36
    3337faculties = context.portal_catalog(portal_type="Faculty")
    3438
     
    4145dict['id'] = 'All Faculties'
    4246dict['title'] = 'All Faculties'
    43 res = context.students_catalog(entry_session = entry_sessions)
    44 dict['total'] = len(res)
     47
     48res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time)
     49dict['total_ft'] = len(res_ft)
     50
     51res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time)
     52dict['total_pt'] = len(res_pt)
     53
    4554for state in new_states:
    46     res = context.students_catalog(entry_session = entry_sessions, review_state = state)
    47     dict[state] = len(res)
    48     statepercent = state+'_percent'
    49     if dict['total'] > 0:
    50         dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total'])
     55    # full_time
     56    res_ft = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = full_time)
     57    state_ft = state + '_ft'
     58    dict[state_ft] = len(res_ft)
     59    statepercent = state+'_ft_percent'
     60    if dict['total_ft'] > 0:
     61        dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
    5162    else:
    5263        dict[statepercent] = 0
     64       
     65    # part_time
     66    res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = part_time)
     67    state_pt = state + '_pt'
     68    dict[state_pt] = len(res_pt)
     69    statepercent = state+'_pt_percent'
     70    if dict['total_pt'] > 0:
     71        dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
     72    else:
     73        dict[statepercent] = 0       
     74       
    5375l.append(dict)
     76
    5477
    5578for f in faculties:
     
    5780    dict['id'] = f.getId
    5881    dict['title'] = f.Title
    59     res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId)
    60     dict['total'] = len(res)
     82    res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = full_time)
     83    dict['total_ft'] = len(res_ft)
     84    res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time)
     85    dict['total_pt'] = len(res_pt)   
    6186    for state in new_states:
    62         res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state)
    63         dict[state] = len(res)
    64         statepercent = state+'_percent'
    65         if dict['total'] > 0:
    66             dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total'])
     87        # full_time
     88        res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = full_time)
     89        state_ft = state + '_ft'
     90        dict[state_ft] = len(res_ft)
     91        statepercent = state+'_ft_percent'
     92        if dict['total_ft'] > 0:
     93            dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
    6794        else:
    6895            dict[statepercent] = 0
     96           
     97        # part_time
     98        res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time)
     99        state_pt = state + '_pt'
     100        dict[state_pt] = len(res_pt)
     101        statepercent = state+'_pt_percent'
     102        if dict['total_pt'] > 0:
     103            dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
     104        else:
     105            dict[statepercent] = 0           
     106           
    69107    l.append(dict)
     108
     109
    70110
    71111return l
  • WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py

    r1788 r2067  
    2727                   'courses_validated',
    2828                   )
     29full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
     30part_time =       (         'de_pt','ug_pt','pg_pt')                   
     31                   
    2932faculties = context.portal_catalog(portal_type="Faculty")
    3033
     
    3740dict['id'] = 'All Faculties'
    3841dict['title'] = 'All Faculties'
    39 res = context.students_catalog(entry_session = entry_sessions)
    40 dict['total'] = len(res)
     42
     43res_ft = context.students_catalog(entry_session = entry_sessions,  mode = full_time)
     44dict['total_ft'] = len(res_ft)
     45
     46res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time)
     47dict['total_pt'] = len(res_pt)
     48
    4149for state in ret_states:
    42     res = context.students_catalog(entry_session = entry_sessions, review_state = state)
    43     dict[state] = len(res)
    44     statepercent = state+'_percent'
    45     if dict['total'] > 0:
    46         dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total'])
     50    # full_time
     51    res_ft = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = full_time)
     52    state_ft = state + '_ft'
     53    dict[state_ft] = len(res_ft)
     54    statepercent = state+'_ft_percent'
     55    if dict['total_ft'] > 0:
     56        dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
    4757    else:
    4858        dict[statepercent] = 0
     59       
     60    # part_time
     61    res_pt = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = part_time)
     62    state_pt = state + '_pt'
     63    dict[state_pt] = len(res_pt)
     64    statepercent = state+'_pt_percent'
     65    if dict['total_pt'] > 0:
     66        dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
     67    else:
     68        dict[statepercent] = 0       
     69       
    4970l.append(dict)
     71
    5072
    5173for f in faculties:
     
    5375    dict['id'] = f.getId
    5476    dict['title'] = f.Title
    55     res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId)
    56     dict['total'] = len(res)
     77    res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = full_time)
     78    dict['total_ft'] = len(res_ft)
     79    res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time)
     80    dict['total_pt'] = len(res_pt)   
    5781    for state in ret_states:
    58         res = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state)
    59         dict[state] = len(res)
    60         statepercent = state+'_percent'
    61         if dict['total'] > 0:
    62             dict[statepercent] = "%.0f" % round(dict[state]*100.0/dict['total'])
     82        # full_time
     83        res_ft = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = full_time)
     84        state_ft = state + '_ft'
     85        dict[state_ft] = len(res_ft)
     86        statepercent = state+'_ft_percent'
     87        if dict['total_ft'] > 0:
     88            dict[statepercent] = "%.0f" % round(dict[state_ft]*100.0/dict['total_ft'])
    6389        else:
    6490            dict[statepercent] = 0
     91           
     92        # part_time
     93        res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = part_time)
     94        state_pt = state + '_pt'
     95        dict[state_pt] = len(res_pt)
     96        statepercent = state+'_pt_percent'
     97        if dict['total_pt'] > 0:
     98            dict[statepercent] = "%.0f" % round(dict[state_pt]*100.0/dict['total_pt'])
     99        else:
     100            dict[statepercent] = 0           
     101           
    65102    l.append(dict)
    66103
  • WAeUP_SRP/trunk/skins/waeup_student/statistics_new_view.pt

    r1766 r2067  
    2020      <br />     
    2121      <span tal:condition="not:isAnon">
     22
     23      <h3>Full-Time Students (UME, DE, UG, PG)</h3>
     24      <br />     
     25     
    2226        <table>
    2327          <tr class="odd ajaxtd">
     
    3842              <td width="80px"> <span tal:content="d/id" /> </td>
    3943              <td width="80px" align="right">
    40                 <span tal:content="d/total" />
     44                <span tal:content="d/total_ft" />
    4145              </td>
    4246              <td width="80px" align="right">
    43                 <span tal:content="d/admitted" />
    44                 (<span tal:content="d/admitted_percent" />%)
     47                <span tal:content="d/admitted_ft" />
     48                (<span tal:content="d/admitted_ft_percent" />%)
    4549              </td>             
    4650              <td width="80px" align="right">
    47                 <span tal:content="d/objection_raised" />
    48                 (<span tal:content="d/objection_raised_percent" />%)
     51                <span tal:content="d/objection_raised_ft" />
     52                (<span tal:content="d/objection_raised_ft_percent" />%)
    4953              </td>
    5054              <td width="80px" align="right">
    51                 <span tal:content="d/clearance_pin_entered" />
    52                 (<span tal:content="d/clearance_pin_entered_percent" />%)
     55                <span tal:content="d/clearance_pin_entered_ft" />
     56                (<span tal:content="d/clearance_pin_entered_ft_percent" />%)
    5357              </td>
    5458              <td width="80px" align="right">
    55                 <span tal:content="d/clearance_requested" />
    56                 (<span tal:content="d/clearance_requested_percent" />%)
     59                <span tal:content="d/clearance_requested_ft" />
     60                (<span tal:content="d/clearance_requested_ft_percent" />%)
    5761              </td>
    5862              <td width="80px" align="right">
    59                 <span tal:content="d/cleared_and_validated" />
    60                 (<span tal:content="d/cleared_and_validated_percent" />%)
     63                <span tal:content="d/cleared_and_validated_ft" />
     64                (<span tal:content="d/cleared_and_validated_ft_percent" />%)
    6165              </td>
    6266              <td width="80px" align="right">
    63                 <span tal:content="d/school_fee_paid" />
    64                 (<span tal:content="d/school_fee_paid_percent" />%)
     67                <span tal:content="d/school_fee_paid_ft" />
     68                (<span tal:content="d/school_fee_paid_ft_percent" />%)
    6569              </td>
    6670              <td width="80px" align="right">
    67                 <span tal:content="d/courses_registered" />
    68                 (<span tal:content="d/courses_registered_percent" />%)
     71                <span tal:content="d/courses_registered_ft" />
     72                (<span tal:content="d/courses_registered_ft_percent" />%)
    6973              </td>
    7074              <td width="80px" align="right">
    71                 <span tal:content="d/courses_validated" />
    72                 (<span tal:content="d/courses_validated_percent" />%)
     75                <span tal:content="d/courses_validated_ft" />
     76                (<span tal:content="d/courses_validated_ft_percent" />%)
    7377              </td>                                         
    7478
    7579          </tr>
    7680        </table>
     81
     82      <h3>Part-Time Students (DE, UG, PG)</h3>
     83      <br />     
     84
     85        <table>
     86          <tr class="odd ajaxtd">
     87            <th >Faculty</th>
     88            <th align="right">Total New</th>
     89            <th align="right">AD</th>
     90            <th align="right">OR</th>
     91            <th align="right">CPE</th>
     92            <th align="right">CR</th>
     93            <th align="right">VC</th>
     94            <th align="right">SFP</th>
     95            <th align="right">CLR</th>
     96            <th align="right">CLV</th>
     97
     98          </tr>
     99          <tr tal:repeat="d faculties"
     100              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
     101              <td width="80px"> <span tal:content="d/id" /> </td>
     102              <td width="80px" align="right">
     103                <span tal:content="d/total_pt" />
     104              </td>
     105              <td width="80px" align="right">
     106                <span tal:content="d/admitted_pt" />
     107                (<span tal:content="d/admitted_pt_percent" />%)
     108              </td>             
     109              <td width="80px" align="right">
     110                <span tal:content="d/objection_raised_pt" />
     111                (<span tal:content="d/objection_raised_pt_percent" />%)
     112              </td>
     113              <td width="80px" align="right">
     114                <span tal:content="d/clearance_pin_entered_pt" />
     115                (<span tal:content="d/clearance_pin_entered_pt_percent" />%)
     116              </td>
     117              <td width="80px" align="right">
     118                <span tal:content="d/clearance_requested_pt" />
     119                (<span tal:content="d/clearance_requested_pt_percent" />%)
     120              </td>
     121              <td width="80px" align="right">
     122                <span tal:content="d/cleared_and_validated_pt" />
     123                (<span tal:content="d/cleared_and_validated_pt_percent" />%)
     124              </td>
     125              <td width="80px" align="right">
     126                <span tal:content="d/school_fee_paid_pt" />
     127                (<span tal:content="d/school_fee_paid_pt_percent" />%)
     128              </td>
     129              <td width="80px" align="right">
     130                <span tal:content="d/courses_registered_pt" />
     131                (<span tal:content="d/courses_registered_pt_percent" />%)
     132              </td>
     133              <td width="80px" align="right">
     134                <span tal:content="d/courses_validated_pt" />
     135                (<span tal:content="d/courses_validated_pt_percent" />%)
     136              </td>                                         
     137
     138          </tr>
     139        </table>
     140
     141
     142
    77143        <br />
    78144        <table>
  • WAeUP_SRP/trunk/skins/waeup_student/statistics_ret_view.pt

    r1767 r2067  
    2020      <br />     
    2121      <span tal:condition="not:isAnon">
     22
     23      <h3>Full-Time Students (UME, DE, UG, PG)</h3>
     24      <br />           
     25     
    2226        <table>
    2327          <tr class="odd ajaxtd">
     
    3438              <td width="80px"> <span tal:content="d/id" /> </td>
    3539              <td width="80px" align="right">
    36                 <span tal:content="d/total" />
     40                <span tal:content="d/total_ft" />
    3741              </td>
    3842              <td width="80px" align="right">
    39                 <span tal:content="d/returning" />
    40                 (<span tal:content="d/returning_percent" />%)
     43                <span tal:content="d/returning_ft" />
     44                (<span tal:content="d/returning_ft_percent" />%)
    4145              </td>             
    4246              <td width="80px" align="right">
    43                 <span tal:content="d/school_fee_paid" />
    44                 (<span tal:content="d/school_fee_paid_percent" />%)
     47                <span tal:content="d/school_fee_paid_ft" />
     48                (<span tal:content="d/school_fee_paid_ft_percent" />%)
    4549              </td>
    4650              <td width="80px" align="right">
    47                 <span tal:content="d/courses_registered" />
    48                 (<span tal:content="d/courses_registered_percent" />%)
     51                <span tal:content="d/courses_registered_ft" />
     52                (<span tal:content="d/courses_registered_ft_percent" />%)
    4953              </td>
    5054              <td width="80px" align="right">
    51                 <span tal:content="d/courses_validated" />
    52                 (<span tal:content="d/courses_validated_percent" />%)
     55                <span tal:content="d/courses_validated_ft" />
     56                (<span tal:content="d/courses_validated_ft_percent" />%)
    5357              </td>                                         
    5458
    5559          </tr>
    5660        </table>
     61
     62      <h3>Part-Time Students (DE, UG, PG)</h3>
     63      <br />           
     64
     65        <table>
     66          <tr class="odd ajaxtd">
     67            <th >Faculty</th>
     68            <th align="right">Total</th>
     69            <th align="right">RET</th>
     70            <th align="right">SFP</th>
     71            <th align="right">CLR</th>
     72            <th align="right">CLV</th>
     73
     74          </tr>
     75          <tr tal:repeat="d faculties"
     76              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
     77              <td width="80px"> <span tal:content="d/id" /> </td>
     78              <td width="80px" align="right">
     79                <span tal:content="d/total_pt" />
     80              </td>
     81              <td width="80px" align="right">
     82                <span tal:content="d/returning_pt" />
     83                (<span tal:content="d/returning_pt_percent" />%)
     84              </td>             
     85              <td width="80px" align="right">
     86                <span tal:content="d/school_fee_paid_pt" />
     87                (<span tal:content="d/school_fee_paid_pt_percent" />%)
     88              </td>
     89              <td width="80px" align="right">
     90                <span tal:content="d/courses_registered_pt" />
     91                (<span tal:content="d/courses_registered_pt_percent" />%)
     92              </td>
     93              <td width="80px" align="right">
     94                <span tal:content="d/courses_validated_pt" />
     95                (<span tal:content="d/courses_validated_pt_percent" />%)
     96              </td>                                         
     97
     98          </tr>
     99        </table>
     100
     101       
    57102        <br />
    58103        <table>
Note: See TracChangeset for help on using the changeset viewer.