Changeset 2475


Ignore:
Timestamp:
29 Oct 2007, 18:46:43 (17 years ago)
Author:
Henrik Bettermann
Message:

moves current_verdict to cprevious_verdict after session change
fix06Verdict: moves current_verdict to cprevious_verdict for all students in session 06

Location:
WAeUP_SRP
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py

    r2454 r2475  
    8181next_level_id = next_info['next_level_id']
    8282next_transition = next_info['next_transition']
     83next_verdict = next_info['next_verdict']
    8384
    8485if  resp == '00':
     
    9192        except:
    9293            pass
     94        verdict = s_brain.verdict
    9395        study_course.getContent().edit(mapping= {'current_level': next_level_id,
    94                                                  'current_session': next_session_id,})
     96                                                 'current_session': next_session_id,
     97                                                 'previous_verdict': verdict,
     98                                                 })
    9599        if next_transition:
    96             wftool.doActionFor(student,next_transition)   
     100            wftool.doActionFor(student,next_transition)
    97101
    98102    logger.info('%s received valid callback' % student_id)
  • WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py

    r2459 r2475  
    4343next_level_id = next_info['next_level_id']
    4444next_transition = next_info['next_transition']
     45next_verdict = next_info['next_verdict']
    4546
    4647validate = request.has_key("cpsdocument_create_button")
     
    115116        wftool.doActionFor(study_course,'open')
    116117    except:
    117         pass   
     118        pass
     119    verdict = s_brain.verdict   
    118120    study_course.getContent().edit(mapping= {'current_level': next_level_id,
    119                                              'current_session': next_session_id,})
     121                                             'current_session': next_session_id,
     122                                             'current_verdict': next_verdict,
     123                                             'previous_verdict': verdict,
     124                                             })
    120125    if next_transition:
    121126        wftool.doActionFor(student,next_transition)
  • WAeUP_SRP/base/skins/waeup_student/getNextInfo.py

    r2473 r2475  
    3434info['next_session_id'] = next_session_id = session_id
    3535info['next_level_id'] = next_level_id = level_id
     36info['next_verdict'] = verdict
    3637verdicts_voc = context.portal_vocabularies.verdicts
    3738if review_state == 'cleared_and_validated':
    3839    info['next_transition'] = "pay_school_fee"
     40    info['next_verdict'] = ''
    3941elif review_state == 'returning' and has_verdict and has_level and has_session:
    4042    info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1)
    4143    if int(session_id) > int(context.getSessionId()[0]) -2:
    4244        info['next_transition'] = "pay_school_fee"
     45        info['next_verdict'] = ''
    4346        if verdict in ('A','B',):
    4447            info['next_level_id'] = "%s" % (int(level_id) + 100)
  • WAeUP_SRP/base/skins/waeup_student/getStudyCourseInfo.py

    r2456 r2475  
    8888except:
    8989    info['verdict'] = course.current_verdict
     90try:
     91    info['previous_verdict'] = context.portal_vocabularies.verdicts.get(info['doc'].previous_verdict).upper()
     92except:
     93    info['previous_verdict'] = course.previous_verdict
    9094
    9195return info
  • WAeUP_SRP/base/skins/waeup_student/study_course_view.pt

    r2138 r2475  
    4141        <td><span tal:content="info/verdict" /></td>
    4242      </tr>
     43      <tr>
     44        <td width="220px">Previous Verdict:</td>
     45        <td><span tal:content="info/previous_verdict" /></td>
     46      </tr>     
    4347      <tr>
    4448        <td width="220px">Certificate:</td>
  • WAeUP_SRP/fceokene/profiles/default/layouts/student_study_course.xml

    r1989 r2475  
    8787  <property name="vocabulary">verdicts</property>
    8888 </widget>
     89 <widget name="previous_verdict" meta_type="Select Widget">
     90  <property name="title">Previous Verdict</property>
     91  <property name="fields">
     92   <element value="previous_verdict"/>
     93  </property>
     94  <property name="is_required">False</property>
     95  <property name="label">Previous Verdict</property>
     96  <property name="label_edit">Previous Verdict</property>
     97  <property name="readonly_layout_modes"/>
     98  <property name="hidden_layout_modes"/>
     99  <property name="hidden_readonly_layout_modes"/>
     100  <property name="vocabulary">verdicts</property>
     101 </widget>
    89102 <table>
    90103  <row>
     
    101114  </row>
    102115  <row>
     116   <cell name="previous_verdict"/>
     117  </row> 
     118  <row>
    103119   <cell name="current_level"/>
    104120  </row>
  • WAeUP_SRP/fceokene/profiles/default/schemas/student_study_course.xml

    r1820 r2475  
    1212  <field name="current_level" meta_type="CPS String Field"/>
    1313  <field name="current_verdict" meta_type="CPS String Field"/>
     14  <field name="previous_verdict" meta_type="CPS String Field"/>
    1415</object>
Note: See TracChangeset for help on using the changeset viewer.