Ignore:
Timestamp:
7 Aug 2013, 11:18:43 (11 years ago)
Author:
Henrik Bettermann
Message:

Let transcript officers find their students via the students container page.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/permissions.py

    r10346 r10465  
    271271                     'waeup.viewAcademics',
    272272                     'waeup.exportBursaryData')
    273 
    274 class TranscriptOfficer(grok.Role):
    275     grok.name('waeup.TranscriptOfficer')
    276     grok.title(u'Transcript Officer')
    277     grok.permissions('waeup.showStudents',
    278                      'waeup.viewAcademics',
    279                      'waeup.viewTranscript',
    280                      'waeup.viewStudent')
    281273
    282274class UsersManager(grok.Role):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r10464 r10465  
    270270            self.searchtype = form['searchtype']
    271271            self.searchterm = None
     272        if form.get('searchtype', None) == 'transcript':
     273            self.searchtype = form['searchtype']
     274            self.searchterm = None
    272275        elif 'searchterm' in form and form['searchterm']:
    273276            self.searchterm = form['searchterm']
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containerpage.pt

    r9795 r10465  
    1515    <option i18n:translate="" value="suspended">
    1616      with deactivated account (search term omitted)
     17    </option>
     18    <option i18n:translate="" value="transcript">
     19      who requested transcript (search term omitted)
    1720    </option>
    1821  </select>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/catalog.py

    r9925 r10465  
    8888                hitlist.append(StudentQueryResultItem(student, view=view))
    8989        return hitlist
     90    elif searchtype == 'transcript':
     91        cat = queryUtility(ICatalog, name='students_catalog')
     92        results = cat.searchResults(
     93            state=('transcript requested', 'transcript requested'))
    9094    else:
    9195        # Temporary solution to display all students added
  • main/waeup.kofa/trunk/src/waeup/kofa/students/permissions.py

    r9939 r10465  
    9494                     'waeup.viewStudentsTab', 'waeup.handleAccommodation')
    9595
     96class TranscriptOfficer(grok.Role):
     97    grok.name('waeup.TranscriptOfficer')
     98    grok.title(u'Transcript Officer')
     99    grok.permissions('waeup.viewAcademics',
     100                     'waeup.viewTranscript',
     101                     'waeup.viewStudent',
     102                     'waeup.viewStudents',
     103                     'waeup.viewStudentsTab',
     104                     'waeup.viewStudentsContainer',
     105                     )
     106
    96107class StudentsClearanceOfficer(grok.Role):
    97108    grok.name('waeup.StudentsClearanceOfficer')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r10464 r10465  
    19261926    def test_process_transcript_request(self):
    19271927        IWorkflowState(self.student).setState('transcript requested')
     1928        notify(grok.ObjectModifiedEvent(self.student))
    19281929        self.student.transcript_comment = (
    19291930            u'On 07/08/2013 08:59:54 UTC K1000000 wrote:\n\nComment line 1 \n'
     
    19471948            '...<div>Transcript Officer</div>...',
    19481949            self.browser.contents)
    1949         self.browser.open(self.student_path)
     1950        # Officer can search for students in state 'transcripr requested'
     1951        self.browser.open(self.container_path)
     1952        self.browser.getControl(name="searchtype").value = ['transcript']
     1953        self.browser.getControl("Search").click()
     1954        self.assertTrue('Anna Tester' in self.browser.contents)
     1955        self.browser.getLink("K1000000").click()
    19501956        self.browser.getLink("Manage transcript request").click()
    19511957        self.assertTrue(' UTC K1000000 wrote:<br><br>Comment line 1 <br>'
Note: See TracChangeset for help on using the changeset viewer.