[Xerte-dev] Peer review, feedback etc.

Tom Reijnders reijnders at tor.nl
Mon Mar 4 09:55:22 GMT 2013


I've solved some issues with the peer review module and the feedback module.

1. Sending email from the system depends on some items in site_details 
that are really explained, and then in the code not used properly.
2. If not all users are on the same email domain, peer review doesn't 
work, as the review will be sent to <user> @ 
<site_details->email_to_add_to_user>

1. Has to do with headers. You are supposed to add the email headers 
yourself in site_details. Each line seperated by a '*'.

There are three issues with that:
  - No user knows what to fill in there. Even I as a network specialist 
had to look at the code what was expected there. End even then, this 
field is often used inappropriately. Only in the case of peer reviews, 
the code assumed it was more than 1 header line separated with '*'
  - There is a field 'site_email_account',  but it's not used as the 
'From' Address.
  - You have to know that the email bodies  are HTML, so you have to 
know to add Content-Type: text/html header, otherwise the emails look 
really weird.

Fix:

Added function get_email_headers() to functions.php (don't know whether 
that's the best location), that tries to build a proper header stringe 
for the php mail function:
   1. It adds the site_email_account as the From: header, if there is no 
>From field in the site_details->headers field
   2. It adds a Content-Type  header is it is not in the 
site_details->headers field
   3. It replaces the '*' with '\n' in the site_details->headers field 
and adds the result.

2. This is annoying for example in the case of the sand pit or in case 
of Toll-Net.

Fix:

Added retouremail to the peerreview form. I decided NOT to change the 
Database schema, but encoded the retouremail address(es) in the 
additional_sharing->extra field.

Will commit later today,

Tom

-- 
--

Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196




More information about the Xerte-dev mailing list