You are here: Home / Documentation / How To's / How to look up student IDs

How to look up student IDs

by nguyen — published Mar 14, 2014 02:47 PM, last modified Aug 16, 2016 10:50 AM
We don't store student IDs in our Plone sites, so here is how to look them up

With uwosh.pfg.d2c objects we create in our workflow applications sometimes we need to look up a student ID.  

We do not store those in Plone sites because of data security concerns.  

Here is how you can add a button on your D2C objects to look up a student's ID.  This is very easy to do on our Intranet Zope, ie. the Plone server that runs our campus Intranet and the workflow app sandboxes owned by campus units.

Here's what it looks like:

screenshot of the "Display Student ID" button



  • You are doing this on the UW Oshkosh Intranet Zope, ie. either the campus Intranet or one of the many workflow application sandboxes
  • Your form asks for and stores the student's official email address (by default, any PloneFormGen form you create is going to do this automatically)
  • The student's email address is stored in a string field with the ID "replyto" (again, by default, this is what all new PloneFormGen forms do)
  • Only those who have edit permission on the D2C object should see the "Display Student ID" button, to prevent unauthorized users from seeing student IDs

Add the Button

Go to the ZMI -> portal_actions -> object and add a CMFAction:

  • Title: Display Student ID
  • URL (Expression): python: 'display_emplid?email=' + context.getValue('replyto')
  • Condition (Expression): python:(object.meta_type == 'FormSaveData2ContentEntry')  and hasattr(object, 'replyto') and getattr(object, 'replyto', None)
  • Permissions: Modify portal content
  • Visible?: True

Add the External Method

Go to the ZMI -> portal_skins -> custom and add an External Method:

  • Id: display_emplid
  • Module Name: display_emplid
  • Function Name: display_emplid
This works only on our Intranet Zope.