Changeset 15143


Ignore:
Timestamp:
18 Sep 2018, 10:20:39 (6 years ago)
Author:
Henrik Bettermann
Message:

Add fields for transcript signatures.
Adjust search function.

Location:
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/browser/tests/test_browser.py

    r15060 r15143  
    439439            'nationality,officer_comment,perm_address,personal_updated,'
    440440            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    441             'transcript_comment,'
     441            'transcript_comment,transcript_signees,'
    442442            'password,state,history,certcode,is_postgrad,current_level,'
    443443            'current_session\r\n')
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser.py

    r15140 r15143  
    264264        form = self.request.form
    265265        self.hitlist = []
    266         if form.get('searchtype', None) == 'suspended':
    267             self.searchtype = form['searchtype']
    268             self.searchterm = None
    269         elif form.get('searchtype', None) == 'transcript':
     266        if form.get('searchtype', None) in ('suspended', TRANSREQ, TRANSVAL):
    270267            self.searchtype = form['searchtype']
    271268            self.searchterm = None
     
    309306        form = self.request.form
    310307        self.hitlist = []
    311         if form.get('searchtype', None) == 'suspended':
     308        if form.get('searchtype', None) in ('suspended', TRANSREQ, TRANSVAL):
    312309            self.searchtype = form['searchtype']
    313310            self.searchterm = None
     
    11531150    grok.name('validate_transcript')
    11541151    grok.require('waeup.processTranscript')
    1155     form_fields = grok.AutoFields(IStudentTranscript)
    11561152
    11571153    def update(self, SUBMIT=None):
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser_templates/containermanagepage.pt

    r13347 r15143  
    1717        with deactivated account (search term omitted)
    1818      </option>
    19       <option i18n:translate="" value="transcript">
    20         who requested transcript (search term omitted)
     19      <option i18n:translate="" value="transcript requested">
     20        in state 'transcript requested' (search term omitted)
     21      </option>
     22      <option i18n:translate="" value="transcript validated">
     23        in state 'transcript validated' (search term omitted)
    2124      </option>
    2225    </select>
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser_templates/containerpage.pt

    r11254 r15143  
    1717        with deactivated account (search term omitted)
    1818      </option>
    19       <option i18n:translate="" value="transcript">
    20         who requested transcript (search term omitted)
     19      <option i18n:translate="" value="transcript requested">
     20        in state 'transcript requested' (search term omitted)
     21      </option>
     22      <option i18n:translate="" value="transcript validated">
     23        in state 'transcript validated' (search term omitted)
    2124      </option>
    2225    </select>
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser_templates/transcriptrelease.pt

    r15128 r15143  
    1212      </a>
    1313    </li>
     14    <li>
     15      <a href="#tab3" data-toggle="tab">
     16        <span i18n:translate="">View signatures</span>
     17      </a>
     18    </li>
    1419  </ul>
    1520
     
    2025        <tbody>
    2126          <tr>
    22             <td i18n:translate="">
     27            <td class="fieldname" i18n:translate="">
    2328            Comment:
    2429            </td>
     
    4146      <p tal:content="structure view/correspondence"></p>
    4247    </div>
     48
     49    <div id="tab3" class="tab-pane">
     50      <p tal:content="structure context/transcript_signees"></p>
     51    </div>
    4352  </div>
    4453
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/catalog.py

    r10465 r15143  
    2929from waeup.kofa.students.interfaces import IStudent, ICourseTicket
    3030from waeup.kofa.university.vocabularies import course_levels
     31from waeup.kofa.students.workflow import (TRANSREQ, TRANSVAL)
    3132
    3233class StudentsCatalog(grok.Indexes):
     
    8889                hitlist.append(StudentQueryResultItem(student, view=view))
    8990        return hitlist
    90     elif searchtype == 'transcript':
     91    elif searchtype in (TRANSREQ, TRANSVAL):
    9192        cat = queryUtility(ICatalog, name='students_catalog')
    92         results = cat.searchResults(
    93             state=('transcript requested', 'transcript requested'))
     93        results = cat.searchResults(state=(searchtype, searchtype))
    9494    else:
    9595        # Temporary solution to display all students added
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/interfaces.py

    r14702 r15143  
    219219    transcript_enabled = Attribute('True if transcript processing is enabled')
    220220    clearance_locked = Attribute('True if clearance form is locked')
     221    studycourse_locked = Attribute(
     222        'True if nobody is allowed to change studycourse, studylecel or '
     223        'course ticket data, neither through the UI nor via import')
    221224
    222225    password = Attribute('Encrypted password')
     
    376379    transcript_comment = schema.Text(
    377380        title = _(u'Comment'),
     381        required = False,
     382        )
     383
     384    transcript_signees = schema.Text(
     385        title = _(u'Signees'),
    378386        required = False,
    379387        )
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_browser.py

    r15141 r15143  
    21462146        # Officer can search for students in state 'transcript requested'
    21472147        self.browser.open(self.container_path)
    2148         self.browser.getControl(name="searchtype").value = ['transcript']
     2148        self.browser.getControl(name="searchtype").value = ['transcript requested']
    21492149        self.browser.getControl("Find student(s)").click()
    21502150        self.assertTrue('Anna Tester' in self.browser.contents)
     
    36283628            'officer_comment,perm_address,personal_updated,phone,reg_number,'
    36293629            'sex,student_id,suspended,suspended_comment,transcript_comment,'
    3630             'password,state,history,certcode,is_postgrad,current_level,'
    3631             'current_session\r\n'
     3630            'transcript_signees,password,state,history,certcode,is_postgrad,'
     3631            'current_level,current_session\r\n'
    36323632            ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,'
    3633             '1234#,123,m,K1000000,0,,,{SSHA}' in self.browser.contents)
     3633            '1234#,123,m,K1000000,0,,,,{SSHA}' in self.browser.contents)
    36343634
    36353635    def test_payment_dates(self):
     
    37343734            'officer_comment,perm_address,personal_updated,phone,reg_number,'
    37353735            'sex,student_id,suspended,suspended_comment,transcript_comment,'
    3736             'password,state,history,certcode,is_postgrad,current_level,'
    3737             'current_session\r\n'
     3736            'transcript_signees,password,state,history,certcode,is_postgrad,'
     3737            'current_level,current_session\r\n'
    37383738            ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,'
    3739             '1234#,123,m,K1000000,0,,,{SSHA}' in self.browser.contents)
     3739            '1234#,123,m,K1000000,0,,,,{SSHA}' in self.browser.contents)
    37403740        self.assertEqual(len(self.app['datacenter'].running_exports), 1)
    37413741        job_id = self.app['datacenter'].running_exports[0][0]
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_export.py

    r15060 r15143  
    127127        'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    128128        'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    129         '+234-123-12345#,123,f,A111111,0,,,,created'
     129        '+234-123-12345#,123,f,A111111,0,,,,,created'
    130130        )
    131131
     
    160160            'nationality,officer_comment,perm_address,personal_updated,'
    161161            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    162             'transcript_comment,password,state,history,certcode,is_postgrad,'
    163             'current_level,current_session\r\n'
     162            'transcript_comment,transcript_signees,password,state,history,'
     163            'certcode,is_postgrad,current_level,current_session\r\n'
    164164            'my adm code,my clr code,'
    165165            '1981-02-04#,anna@sample.com,,Anna,,Tester,234,M.,NG,,'
    166166            '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,f,'
    167             'A111111,0,,,,created'
     167            'A111111,0,,,,,created'
    168168            in result
    169169            )
     
    182182            'nationality,officer_comment,perm_address,personal_updated,'
    183183            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    184             'transcript_comment,password,state,history,certcode,'
     184            'transcript_comment,transcript_signees,password,state,history,certcode,'
    185185            'is_postgrad,current_level,current_session\r\n'
    186186            'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    187187            'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
    188             ',,+234-123-12345#,123,f,A111111,0,,,,created'
     188            ',,+234-123-12345#,123,f,A111111,0,,,,,created'
    189189            in result
    190190            )
     
    202202            'nationality,officer_comment,perm_address,personal_updated,'
    203203            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    204             'transcript_comment,password,state,history,certcode,'
     204            'transcript_comment,transcript_signees,password,state,history,certcode,'
    205205            'is_postgrad,current_level,current_session\r\n'
    206206            'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    207207            'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
    208             ',,+234-123-12345#,123,f,A111111,0,,,,created'
     208            ',,+234-123-12345#,123,f,A111111,0,,,,,created'
    209209            in result
    210210            )
Note: See TracChangeset for help on using the changeset viewer.