Skip to content
This repository has been archived by the owner on Sep 29, 2019. It is now read-only.

Issue #6 rawphenotypes hook alter() implementations #7

Merged

Conversation

laceysanderson
Copy link
Member

This pull request should have been created when the changes were submitted for review. See Issue #6

- Allow raw phenotypes module to alter values.
- Replaced the hard-coded email address with a system variable. This
can be set by calling a Drupal API
variable_set('kp_rawpheno_support_email’, ‘support email’).
- Allow admin to set custom support email address using terminal
- Set the default support email to Drupal Admin with id # 0 or Drupal
site wide email address provided during Drupal installation/setup.
Copy link
Member Author

@laceysanderson laceysanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functional code looks good; however, function header doc blocks need to be improved

kp_nodes.module Outdated
* otherwise, the module will load email from either the Drupal user 0
* or the Drupal site wide mail.
*/
function kp_nodes_rawpheno_support_email_alter(&$support_email) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function should only provide @reynoldtan's email. As mentioned in the related pull request the default email should be provided via rawphenotypes.

kp_nodes.module Outdated
*/

// When searching for new columns.
// in rawpheno.upload.form.inc : rawpheno_upload_form_stage_review().
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be more descriptive in your docblocks. Also there should not be any code between the docblock and the function header. The kp_nodes_rawpheno_support_email_alter() docblock was perfect :-) so just keep with that format for All Alter functions while substituting in the correct info (e.g. columns, etc.).

kp_nodes.module Outdated
// When saving and validating data.
// in rawpheno.upload.form.inc : rawpheno_validate_excel_file().
// rawpheno_load_spreadsheet().
function kp_nodes_rawpheno_ignorecols_valsave_alter(&$skip, &$project_name) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need Docblock

kp_nodes.module Outdated
}
}

// Check existence of column(s) in columns array.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need docblock

kp_nodes.module Outdated
return $cols_i;
}

// Define a set columns to ignore.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need docblock

@laceysanderson laceysanderson merged commit 91c1ed3 into 7.x-1.x Apr 6, 2018
@laceysanderson
Copy link
Member Author

🎉

@laceysanderson laceysanderson deleted the Issue-#6---Rawphenotypes-hook_alter()-implementations branch April 23, 2018 17:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants