Changeset 3774 for WAeUP_SRP/trunk


Ignore:
Timestamp:
19 Nov 2008, 08:06:27 (16 years ago)
Author:
Henrik Bettermann
Message:

resolve ticket #462

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

Legend:

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

    r2705 r3774  
    3838full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
    3939part_time =       (         'de_pt','ug_pt','pg_pt')
     40diploma   =       ('dp_ft','dp_pt')
    4041
    4142faculties = context.portal_catalog(portal_type="Faculty")
     
    5556res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time, review_state = new_states)
    5657dict['total_pt'] = len(res_pt)
     58
     59res_dp = context.students_catalog(entry_session = entry_sessions,  mode = diploma, review_state = new_states)
     60dict['total_dp'] = len(res_dp)
    5761
    5862for state in new_states:
     
    7680    else:
    7781        dict[statepercent] = 0
     82       
     83    # diploma
     84    res_dp = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = diploma)
     85    state_dp = state + '_dp'
     86    dict[state_dp] = len(res_dp)
     87    statepercent = state+'_dp_percent'
     88    if dict['total_dp'] > 0:
     89        dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp'])
     90    else:
     91        dict[statepercent] = 0       
    7892
    7993l.append(dict)
     
    88102    res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time)
    89103    dict['total_pt'] = len(res_pt)
     104    res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = diploma)
     105    dict['total_dp'] = len(res_dp)   
    90106    for state in new_states:
    91107        # full_time
     
    108124        else:
    109125            dict[statepercent] = 0
     126           
     127        # diploma
     128        res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = diploma)
     129        state_dp = state + '_dp'
     130        dict[state_dp] = len(res_dp)
     131        statepercent = state+'_dp_percent'
     132        if dict['total_dp'] > 0:
     133            dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp'])
     134        else:
     135            dict[statepercent] = 0           
    110136
    111137    l.append(dict)
  • WAeUP_SRP/trunk/skins/waeup_statistics/getRetStudentStatistics.py

    r2705 r3774  
    2020    return 'Not allowed'
    2121
    22 entry_sessions = ('','-1','94','95','96','97','98','99','00','01','02','03','04','05','06','0','1','2','3','4','5','6')
     22current_session = context.getSessionId()[0]
    2323
    24 current_session = context.getSessionId()[0]
     24
     25
     26range1 = range(94,100,1)
     27range2 = range(0,int(current_session),1)
     28missing_values = ['','-1']
     29entry_sessions = missing_values + [str(k) for k in range1+range2] + ['0'+str(k) for k in range2]
     30
     31#entry_sessions = ('','-1','94','95','96','97','98','99','00','01','02','03','04','05','06','07','0','1','2','3','4','5','6','7')
    2532
    2633ret_states =      ('returning',
     
    3138full_time =       ('ume_ft','de_ft','ug_ft','pg_ft')
    3239part_time =       (         'de_pt','ug_pt','pg_pt')
     40diploma   =       ('dp_ft','dp_pt')
    3341
    3442faculties = context.portal_catalog(portal_type="Faculty")
     
    4856res_pt = context.students_catalog(entry_session = entry_sessions,  mode = part_time, review_state = ret_states)
    4957dict['total_pt'] = len(res_pt)
     58
     59res_dp = context.students_catalog(entry_session = entry_sessions,  mode = diploma, review_state = ret_states)
     60dict['total_dp'] = len(res_dp)
    5061
    5162for state in ret_states:
     
    6980    else:
    7081        dict[statepercent] = 0
     82       
     83    # diploma
     84    res_dp = context.students_catalog(entry_session = entry_sessions, review_state = state,  mode = diploma, session = current_session)
     85    state_dp = state + '_dp'
     86    dict[state_dp] = len(res_dp)
     87    statepercent = state+'_dp_percent'
     88    if dict['total_dp'] > 0:
     89        dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp'])
     90    else:
     91        dict[statepercent] = 0       
    7192
    7293l.append(dict)
     
    81102    res_pt = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = part_time)
    82103    dict['total_pt'] = len(res_pt)
     104    res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, mode = diploma)
     105    dict['total_dp'] = len(res_dp)   
    83106    for state in ret_states:
    84107        # full_time
     
    101124        else:
    102125            dict[statepercent] = 0
     126           
     127        # diploma
     128        res_dp = context.students_catalog(entry_session = entry_sessions, faculty = f.getId, review_state = state, mode = diploma, session = current_session)
     129        state_dp = state + '_dp'
     130        dict[state_dp] = len(res_dp)
     131        statepercent = state+'_dp_percent'
     132        if dict['total_dp'] > 0:
     133            dict[statepercent] = "%.0f" % round(dict[state_dp]*100.0/dict['total_dp'])
     134        else:
     135            dict[statepercent] = 0
     136           
    103137
    104138    l.append(dict)
  • WAeUP_SRP/trunk/skins/waeup_statistics/statistics_new_view.pt

    r2705 r3774  
    140140        </table>
    141141
     142      <h3>Diploma Students (full-time and part-time)</h3>
     143      <br />     
     144
     145        <table>
     146          <tr class="odd ajaxtd">
     147            <th >Faculty</th>
     148            <th align="right">Total New</th>
     149            <th align="right">AD</th>
     150            <th align="right">OR</th>
     151            <th align="right">CPE</th>
     152            <th align="right">CR</th>
     153            <th align="right">VC</th>
     154            <th align="right">SFP</th>
     155            <th align="right">CLR</th>
     156            <th align="right">CLV</th>
     157
     158          </tr>
     159          <tr tal:repeat="d faculties"
     160              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
     161              <td width="80px"> <span tal:content="d/id" /> </td>
     162              <td width="80px" align="right">
     163                <span tal:content="d/total_dp" />
     164              </td>
     165              <td width="80px" align="right">
     166                <span tal:content="d/admitted_dp" />
     167                (<span tal:content="d/admitted_dp_percent" />%)
     168              </td>             
     169              <td width="80px" align="right">
     170                <span tal:content="d/objection_raised_dp" />
     171                (<span tal:content="d/objection_raised_dp_percent" />%)
     172              </td>
     173              <td width="80px" align="right">
     174                <span tal:content="d/clearance_pin_entered_dp" />
     175                (<span tal:content="d/clearance_pin_entered_dp_percent" />%)
     176              </td>
     177              <td width="80px" align="right">
     178                <span tal:content="d/clearance_requested_dp" />
     179                (<span tal:content="d/clearance_requested_dp_percent" />%)
     180              </td>
     181              <td width="80px" align="right">
     182                <span tal:content="d/cleared_and_validated_dp" />
     183                (<span tal:content="d/cleared_and_validated_dp_percent" />%)
     184              </td>
     185              <td width="80px" align="right">
     186                <span tal:content="d/school_fee_paid_dp" />
     187                (<span tal:content="d/school_fee_paid_dp_percent" />%)
     188              </td>
     189              <td width="80px" align="right">
     190                <span tal:content="d/courses_registered_dp" />
     191                (<span tal:content="d/courses_registered_dp_percent" />%)
     192              </td>
     193              <td width="80px" align="right">
     194                <span tal:content="d/courses_validated_dp" />
     195                (<span tal:content="d/courses_validated_dp_percent" />%)
     196              </td>                                         
     197
     198          </tr>
     199        </table>
    142200
    143201
  • WAeUP_SRP/trunk/skins/waeup_statistics/statistics_ret_view.pt

    r3171 r3774  
    101101          </tr>
    102102        </table>
     103       
     104      <h3>Diploma Students (full-time and part-time)</h3>
     105      <br />           
     106
     107        <table>
     108          <tr class="odd ajaxtd">
     109            <th >Faculty</th>
     110            <th align="right">Total</th>
     111
     112            <th align="right">SFP</th>
     113            <th align="right">CLR</th>
     114            <th align="right">CLV</th>
     115            <th align="right">RET</th>           
     116
     117          </tr>
     118          <tr tal:repeat="d faculties"
     119              tal:attributes="class python:test(repeat['d'].even(), 'even ajaxtd', 'odd ajaxtd')">
     120              <td width="80px"> <span tal:content="d/id" /> </td>
     121              <td width="80px" align="right">
     122                <span tal:content="d/total_dp" />
     123              </td>       
     124              <td width="80px" align="right">
     125                <span tal:content="d/school_fee_paid_dp" />
     126                (<span tal:content="d/school_fee_paid_dp_percent" />%)
     127              </td>
     128              <td width="80px" align="right">
     129                <span tal:content="d/courses_registered_dp" />
     130                (<span tal:content="d/courses_registered_dp_percent" />%)
     131              </td>
     132              <td width="80px" align="right">
     133                <span tal:content="d/courses_validated_dp" />
     134                (<span tal:content="d/courses_validated_dp_percent" />%)
     135              </td>
     136              <td width="80px" align="right">
     137                <span tal:content="d/returning_dp" />
     138                (<span tal:content="d/returning_dp_percent" />%)
     139              </td>                                                             
     140
     141          </tr>
     142        </table>       
    103143
    104144       
Note: See TracChangeset for help on using the changeset viewer.