Type: New Feature
Affects Version/s: None
Fix Version/s: TMF-2
"Readers" are staff and volunteers who will be reviewing the students' scholarship applications and rating them (assigning "scores") on 10 different criteria. Each student application will be reviewed by multiple readers. The individual scores and a calculated total of all 10 scores is stored in a separate tmf_reader_score record for each reader-student combination. The average of all reader scores for a given student is also stored/updated each time a reader submits the scoring form (tmf_student.reader_score_avg).
This form will be accessed directly from links in the TMF Locker module - which will pass in the reader and student contact IDs. (Jacob Singh is building this interface.) Access will be permissioned to the form path via Drupal role/access control. On saving the form, reader is redirected back to locker URL.
1. Menu / Invoke
The form wiill be invoked from a new separately permissioned path (new item in Menu array):
The following GET params will be passed on the query string when form is accessed (link is formatted by TMF locker):
2. Build Form
Form mockup is here:
All 10 fields are <select> type, with option values and labels = 1 - 10 (as in mockup).
All 10 fields are required.
Preprocess will need to grab the student's scholarship_type_id and grab the "value" (Vista vs Scholars). The field label for the 10th field is dynamic based on scholarship type:
"Essence of a Vista Recipient"
"Essence of a Scholars Recipient"
3. Post Process
- Calculate total of all 10 fields.
- Create or update tmf_reader_score record with individual fields values and total_score.
target_contact_id = scid
source_contact_id = rid
- Recalc and update tmf_student.reader_score_avg by retrieving all tmf_reader_score records for this student (target_contact_id)
- Redirect to locker
CRM_Utils_System::redirect( CRM_Utils_System::url( 'locker', 'reset=1' ) );