Changeset 3036 for WAeUP_SRP


Ignore:
Timestamp:
23 Jan 2008, 10:02:33 (17 years ago)
Author:
joachim
Message:

fix mass_edit_verdict, add wf-transition

Location:
WAeUP_SRP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r3033 r3036  
    19361936            if matric_no and student_record.matric_no and\
    19371937              matric_no != student_record.matric_no:
    1938                 logger.info("%s, old matric_no %s overwritten with %s" % (student_record.id,student_record.matric_no,matric_no))
     1938                return '', 'student %s matric_no %s does not match %s' % (student_record.id,
     1939                                                                          student_record.matric_no,
     1940                                                                          matric_no)
    19391941        elif matric_no:
    19401942            res = self.students_catalog(matric_no = matric_no)
     
    19461948        student_id = student_record.id
    19471949        student_review_state =  student_record.review_state
    1948         if student_review_state not in ('courses_validated',):
     1950        if student_review_state not in ('courses_validated','returning'):
    19491951            return '',"student %s in wrong review_state %s" % (student_id, student_review_state)
    19501952        student_obj = getattr(students_folder,student_id)
     
    19651967                                                                                    current_level,
    19661968                                                                                    student_record.level)
    1967         sub_obj = getattr(student_obj,'study_course',None)
    1968         if sub_obj is None:
     1969        study_course_obj = getattr(student_obj,'study_course',None)
     1970        if study_course_obj is None:
    19691971            return '','student_id %s: no study_course-object' % student_id
    1970         level_obj = getattr(sub_obj,current_level,None)
     1972        level_obj = getattr(study_course_obj,current_level,None)
    19711973        if  level_obj is None:
    19721974            return '','student_id %s: no study_level-object for level %s' % (student_id,
    19731975                                                                             current_level)
    1974         verdict = d['verdict'] = mapping.get('current_verdict','')
     1976        verdict = d['verdict'] = d['current_verdict'] = mapping.get('current_verdict','')
    19751977        if verdict == student_record.verdict:
    19761978            return '','student_id %s: verdict already set to %s' % (student_id,
     
    19821984                                                                 current_level)
    19831985       
     1986        study_course_obj.getContent().edit(mapping = d)
    19841987        level_obj.getContent().edit(mapping = d)
     1988        if student_review_state != "returning":
     1989            wftool.doActionFor(student_obj,'return')
    19851990        try:
    19861991            wftool.doActionFor(level_obj,'close')
  • WAeUP_SRP/uniben/profiles/default/workflows/waeup_student_wf/definition.xml

    r2961 r3036  
    102102  <exit-transition transition_id="deactivate"/>
    103103  <exit-transition transition_id="create_content"/>
     104  <exit-transition transition_id="return"/>
    104105  <permission-map name="Delete objects" acquired="False">
    105106   <permission-role>Manager</permission-role>
Note: See TracChangeset for help on using the changeset viewer.