Kaynağa Gözat

Merge branch '7.x-2.x' of git.drupal.org:sandbox/spficklin/1337878 into 7.x-2.x

Stephen Ficklin 11 yıl önce
ebeveyn
işleme
06cb136a5c
27 değiştirilmiş dosya ile 324 ekleme ve 133 silme
  1. 13 6
      tripal_analysis/api/tripal_analysis.api.inc
  2. 6 5
      tripal_analysis/includes/tripal_analysis.admin.inc
  3. 36 19
      tripal_analysis/includes/tripal_analysis.chado_node.inc
  4. 14 8
      tripal_analysis/includes/tripal_analysis_privacy.inc
  5. 28 6
      tripal_analysis/tripal_analysis.install
  6. 25 16
      tripal_analysis/tripal_analysis.module
  7. 15 1
      tripal_analysis/tripal_analysis.views_default.inc
  8. 7 0
      tripal_bulk_loader/api/tripal_bulk_loader.api.templates.inc
  9. 7 0
      tripal_bulk_loader/includes/tripal_bulk_loader.admin.inc
  10. 4 0
      tripal_bulk_loader/includes/tripal_bulk_loader.admin.templates.inc
  11. 15 10
      tripal_bulk_loader/includes/tripal_bulk_loader.chado_node.inc
  12. 3 1
      tripal_bulk_loader/includes/tripal_bulk_loader.constants.inc
  13. 14 2
      tripal_bulk_loader/includes/tripal_bulk_loader.loader.inc
  14. 17 3
      tripal_bulk_loader/tripal_bulk_loader.drush.inc
  15. 29 3
      tripal_bulk_loader/tripal_bulk_loader.install
  16. 31 12
      tripal_bulk_loader/tripal_bulk_loader.module
  17. 9 1
      tripal_bulk_loader/tripal_bulk_loader.views.inc
  18. 15 2
      tripal_bulk_loader/tripal_bulk_loader.views_default.inc
  19. 1 6
      tripal_contact/tripal_contact.module
  20. 2 2
      tripal_feature/tripal_feature.module
  21. 2 2
      tripal_featuremap/tripal_featuremap.module
  22. 6 6
      tripal_library/tripal_library.module
  23. 1 1
      tripal_organism/tripal_organism.module
  24. 1 1
      tripal_project/tripal_project.module
  25. 4 1
      tripal_pub/tripal_pub.module
  26. 8 8
      tripal_stock/tripal_stock.module
  27. 11 11
      tripal_views/tripal_views.views.inc

+ 13 - 6
tripal_analysis/api/tripal_analysis.api.inc

@@ -1,10 +1,16 @@
 <?php
+/**
+ * @file
+ * Provides functions for managing analysis'.
+ *
+ * @ingroup tripal_analysis
+ */
 
 /**
  * @defgroup tripal_analysis_api Analysis Module API
  * @ingroup tripal_api
  * @{
- * API functions relating to Analysis'
+ * Provides an interface for specialized analysis modules to extend the basic functionality.
  * @}
  */
 
@@ -38,6 +44,7 @@ function tripal_analysis_api_unregister_child($modulename) {
       db_query($sql, array(':modname' => $modulename));
   }
 }
+
 /**
  * Retrieve properties of a given type for a given analysis
  *
@@ -51,7 +58,7 @@ function tripal_analysis_api_unregister_child($modulename) {
  * @return
  *    An analysis chado variable with the specified properties expanded
  *
- * @ingroup tripal_analysis_api_api
+ * @ingroup tripal_analysis_api
  */
 function tripal_analysis_api_get_property($analysis_id, $property, $cvname = 'tripal') {
   return tripal_core_get_property('analysis', $analysis_id, $property, $cvname);
@@ -74,7 +81,7 @@ function tripal_analysis_api_get_property($analysis_id, $property, $cvname = 'tr
  * @return
  *   True of success, False otherwise
  *
- * @ingroup tripal_analysis_api_api
+ * @ingroup tripal_analysis_api
  */
 function tripal_analysis_api_insert_property($analysis_id, $property, $value, $update_if_present = 0, $cvname = 'tripal') {
     return tripal_core_insert_property('analysis', $analysis_id, $property, $cvname, $value, $update_if_present);
@@ -100,7 +107,7 @@ function tripal_analysis_api_insert_property($analysis_id, $property, $value, $u
  * @return
  *   True of success, False otherwise
  *
- * @ingroup tripal_analysis_api_api
+ * @ingroup tripal_analysis_api
  */
 function tripal_analysis_api_update_property($analysis_id, $property, $value, $insert_if_missing = 0, $cvname = 'tripal') {
   return tripal_core_update_property('analysis', $analysis_id, $property, $cvname, $value, $insert_if_missing);
@@ -122,7 +129,7 @@ function tripal_analysis_api_update_property($analysis_id, $property, $value, $i
  * @return
  *   True of success, False otherwise
  *
- * @ingroup tripal_analysis_api_api
+ * @ingroup tripal_analysis_api
  */
 function tripal_analysis_api_delete_property($analysis_id, $property, $cvname = 'tripal') {
   return tripal_core_delete_property('analysis', $analysis_id, $property, $cvname);
@@ -137,7 +144,7 @@ function tripal_analysis_api_delete_property($analysis_id, $property, $cvname =
  * @return
  *   node of analysis on success, null otherwise
  *
- * @ingroup tripal_analysis_api_api
+ * @ingroup tripal_analysis_api
  */
 function tripal_analysis_api_get_node($analysis_id) {
   $sql = "SELECT *

+ 6 - 5
tripal_analysis/includes/tripal_analysis.admin.inc

@@ -2,11 +2,15 @@
 
 /**
  * @file
- * Contains functions displaying administrative pages and forms
+ * Contains functions displaying administrative pages and forms.
+ *
+ * @ingroup tripal_analysis
  */
 
 /**
+ * Landing page for administration. Ensures Views are enabled & if not provides links to do so.
  *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_admin_analysis_view() {
   $output = '';
@@ -94,10 +98,6 @@ function tripal_analysis_admin() {
   return system_settings_form($form);
 }
 
-
-
-
-
 /**
  * Validate the administrative form
  * @todo Stephen: Why is validate used rather then submit?
@@ -149,3 +149,4 @@ function tripal_analysis_admin_validate($form, &$form_state) {
     }
   }
 }
+

+ 36 - 19
tripal_analysis/includes/tripal_analysis.chado_node.inc

@@ -1,5 +1,13 @@
 <?php
 /**
+ * @file
+ * Implements Drupal Node hooks to create the chado_analysis node content type.
+ *
+ * @ingroup tripal_analysis
+ */
+
+/**
+ * Implements hook_node_info().
  * Provide information to drupal about the node types that we're creating
  * in this module
  *
@@ -30,9 +38,11 @@ function tripal_analysis_node_info() {
   );
   return $nodes;
 }
+
 /**
- *  When editing or creating a new node of type 'chado_analysis' we need
- *  a form.  This function creates the form that will be used for this.
+ * Implements hook_form().
+ * When editing or creating a new node of type 'chado_analysis' we need
+ * a form.  This function creates the form that will be used for this.
  *
  * @ingroup tripal_analysis
  */
@@ -235,7 +245,9 @@ function chado_analysis_form($node, &$form_state) {
 
   return $form;
 }
+
 /**
+ * Implements hook_validate().
  * Validates the user input before creating an analysis node
  *
  * @ingroup tripal_analysis
@@ -346,9 +358,10 @@ function tripal_analysis_validate($node, $form, &$form_state) {
 }
 
 /**
- *  When a new chado_analysis node is created we also need to add information
- *  to our chado_analysis table.  This function is called on insert of a new
- *  node of type 'chado_analysis' and inserts the necessary information.
+ * Implements hook_insert().
+ * When a new chado_analysis node is created we also need to add information
+ * to our chado_analysis table.  This function is called on insert of a new
+ * node of type 'chado_analysis' and inserts the necessary information.
  *
  * @ingroup tripal_analysis
  */
@@ -427,10 +440,8 @@ function chado_analysis_insert($node) {
 }
 
 /**
- * Removes analysis from the chado database
- *
- * @param $node
- *   The node object specifying which chado record to delete
+ * Implements hook_delete().
+ * Removes analysis from the chado database.
  *
  * @ingroup tripal_analysis
  */
@@ -456,11 +467,9 @@ function chado_analysis_delete($node) {
 }
 
 /**
+ * Implements hook_update().
  * Update analyses
  *
- * @param $node
- *   The updated node object
- *
  * @ingroup tripal_analysis
  */
 function chado_analysis_update($node) {
@@ -514,9 +523,11 @@ function chado_analysis_update($node) {
   );
   chado_node_properties_form_update_properties($node, $details);
 }
+
 /**
- *  When a node is requested by the user this function is called to allow us
- *  to add auxiliary data to the node object.
+ * Implements hook_load().
+ * When a node is requested by the user this function is called to allow us
+ * to add auxiliary data to the node object.
  *
  * @ingroup tripal_analysis
  */
@@ -537,7 +548,7 @@ function chado_analysis_load($nodes) {
 }
 
 /**
- * Implement hook_access().
+ * Implements hook_access().
  *
  * This hook allows node modules to limit access to the node types they define.
  *
@@ -584,7 +595,10 @@ function chado_analysis_node_access($node, $op, $account) {
   }
   return NULL;
 }
+
 /**
+ * Implements hook_node_view().
+ * Called for all node types.
  *
  * @ingroup tripal_analysis
  */
@@ -613,21 +627,24 @@ function tripal_analysis_node_view($node, $view_mode, $langcode) {
       break;
   }
 }
+
 /**
+ * Implements hook_node_presave().
+ * Called for all node types.
  *
- * @param $node
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_node_presave($node) {
   $name = '';
   $program = '';
   $programversion = '';
   $sourcename = '';
-  
+
   // If this is an analysis of some type it will should have three required
   // fields for the Chado analysis table: program, programversion and sourcename.
   // So we will set the title for any node that has these three fields. Some extension
   // modules will use this module as a type of "inherited" class, so we don't know
-  // for sure when type of analysis we have.  If this is a sync then 
+  // for sure when type of analysis we have.  If this is a sync then
   if (property_exists($node, 'program') and
       property_exists($node, 'programversion') and
       property_exists($node, 'sourcename')) {
@@ -652,4 +669,4 @@ function tripal_analysis_node_presave($node) {
       $node->title = $name;
     }
   }
-}
+}

+ 14 - 8
tripal_analysis/includes/tripal_analysis_privacy.inc

@@ -1,7 +1,9 @@
 <?php
 /**
  * @file
- * Perform permission check (required node_privacy_byrole module)
+ * Perform permission check (required node_privacy_byrole module).
+ *
+ * @ingroup tripal_analysis
  */
 
 /**
@@ -9,6 +11,8 @@
  *
  * @param $analysis_id
  *   Which analysis to check if the user has permission to view
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_check_permission($analysis_id) {
   if (module_exists('node_privacy_byrole')) {
@@ -17,9 +21,9 @@ function tripal_analysis_check_permission($analysis_id) {
     $node_access = 0;
     foreach ($roles AS $rid => $role) {
       $p_sql = "
-        SELECT grant_view 
-        FROM {node_access} NA 
-          INNER JOIN {chado_analysis} CA ON NA.nid = CA.nid 
+        SELECT grant_view
+        FROM {node_access} NA
+          INNER JOIN {chado_analysis} CA ON NA.nid = CA.nid
         WHERE analysis_id = :analysis_id AND gid = :gid";
       $access = db_query($p_sql, array(':analysis_id' => $analysis_id, ':gid' => $rid))->fetchField();
       if ($access == 1) {
@@ -49,6 +53,8 @@ function tripal_analysis_check_permission($analysis_id) {
  *   Features associated with this analysis will have their permissions set
  * @param $nid
  *   The node ID of the analysis
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_set_feature_permission($analysis_id, $nid) {
 
@@ -89,10 +95,10 @@ function tripal_analysis_set_feature_permission($analysis_id, $nid) {
       $rsql = "SELECT * FROM {node_privacy_byrole} WHERE gid = :gid AND nid = :nid AND realm = 'node_privacy_byrole_role'";
       $ana_perm = db_query($rsql, array(':gid' => $rid, ':nid' => $ana_nid))->fetchObject();
       db_query("INSERT INTO {node_privacy_byrole} (nid, gid, realm, grant_view, grant_update, grant_delete)
-                VALUES (:nid, :gid, :realm, :grant_view, :grant_update, :grant_delete)", 
-                array(':nid' => $fnid, ':gid' => $rid, ':realm' => 'node_privacy_byrole_role', 
-                      ':grant_view' => $ana_perm->grant_view, 
-                      ':grant_update' => $ana_perm->grant_update, 
+                VALUES (:nid, :gid, :realm, :grant_view, :grant_update, :grant_delete)",
+                array(':nid' => $fnid, ':gid' => $rid, ':realm' => 'node_privacy_byrole_role',
+                      ':grant_view' => $ana_perm->grant_view,
+                      ':grant_update' => $ana_perm->grant_update,
                       ':grant_delete' => $ana_perm->grant_delete));
     }
     $node = node_load($fnid);

+ 28 - 6
tripal_analysis/tripal_analysis.install

@@ -1,11 +1,16 @@
 <?php
 /**
  * @file
- * Implements hooks from the Schema API
+ * Implements hooks from the Schema API.
+ *
+ * @ingroup tripal_analysis
  */
 
 /**
+ * Implements hook_disable().
  * Disable default views when module is disabled
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_disable() {
 
@@ -20,6 +25,8 @@ function tripal_analysis_disable() {
 
 /**
  * Implementation of hook_requirements().
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_requirements($phase) {
   $requirements = array();
@@ -38,6 +45,8 @@ function tripal_analysis_requirements($phase) {
 
 /**
  * Implementation of hook_install().
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_install() {
 
@@ -56,12 +65,18 @@ function tripal_analysis_install() {
 
 /**
  * Implementation of hook_uninstall().
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_uninstall() {
 
 }
+
 /**
- * 
+ * Create a legacy custom chado table (analysisfeatureprop) to store properties of
+ * analysisfeature links.
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_create_analysisfeatureprop() {
 
@@ -83,8 +98,11 @@ function tripal_analysis_create_analysisfeatureprop() {
     chado_query($sql);
   }
 }
-/*
+
+/**
+ * Adds controlled vocabulary terms needed by this module.
  *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_add_cvterms() {
 
@@ -113,13 +131,15 @@ function tripal_analysis_add_cvterms() {
 }
 
 /**
- * Implementation of hook_schema() creates two tables.
+ * Implementation of hook_schema().
  *
  * - chado_analysis table
  *     stores nodes that are also saved in the analysis table of chado database.
  * - tripal_analysis table
  *     stores the sub-module names, such as tripal_analysis_blast, that are registered
  *     with this module.
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_schema() {
 
@@ -173,9 +193,10 @@ function tripal_analysis_schema() {
   return $schema;
 }
 
-/*
+/**
+ * Creates a view showing hte link between an organism & it's analysis through associated features.
  *
- * @ingroup tripal_network
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_add_mview_analysis_organism() {
   $view_name = 'analysis_organism';
@@ -229,3 +250,4 @@ function tripal_analysis_add_mview_analysis_organism() {
   // add the view
   tripal_add_mview($view_name, 'tripal_analysis', $schema, $sql, $comment);
 }
+

+ 25 - 16
tripal_analysis/tripal_analysis.module

@@ -1,21 +1,29 @@
 <?php
 
 /**
- * @defgroup tripal_analysis Analysis Module
- * @ingroup tripal_modules
- * @{
- * Provides functions for managing chado analysis' including creating details pages for each one
- * @}
+ * @file
+ * Contains basic functionality for the analysis module.
+ *
+ * @ingroup tripal_analysis
  */
 
 require_once 'api/tripal_analysis.api.inc';
+require_once 'api/tripal_analysis.schema.api.inc';
+
 require_once 'includes/tripal_analysis_privacy.inc';
 require_once 'includes/tripal_analysis.admin.inc';
 require_once 'includes/tripal_analysis.chado_node.inc';
-require_once "api/tripal_analysis.schema.api.inc";
 
+/**
+ * @defgroup tripal_analysis Analysis Module
+ * @ingroup tripal_modules
+ * @{
+ * Integrates the Chado Analysis module with Drupal Nodes & Views
+ * @}
+ */
 
 /**
+ * Implements hook_init().
  * Add tripal javascript to page headers
  *
  * @ingroup tripal_analysis
@@ -76,8 +84,10 @@ function tripal_analysis_menu() {
 }
 
 /**
- * Implements hook_help()
+ * Implements hook_help().
  * Purpose: Adds a help page to the module list
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_help ($path, $arg) {
   if ($path == 'admin/help#tripal_analysis') {
@@ -86,6 +96,7 @@ function tripal_analysis_help ($path, $arg) {
 }
 
 /**
+ *  Implements hook_permission().
  *  Set the permission types that the chado module uses.  Essentially we
  *  want permissionis that protect creation, editing and deleting of chado
  *  data objects
@@ -167,7 +178,7 @@ function tripal_analysis_theme($existing, $type, $theme, $path) {
   return $items;
 }
 /**
- *
+ * Implements hook_block_info().
  *
  * @ingroup tripal_analysis
  */
@@ -182,7 +193,7 @@ function tripal_analysis_block_info() {
 }
 
 /**
- *
+ * Implements hook_block_view().
  *
  * @ingroup tripal_analysis
  */
@@ -211,8 +222,8 @@ function tripal_analysis_block_view($delta = '') {
 
 
 /**
- * Implements hook_views_api()
- * Purpose: Essentially this hook tells drupal that there is views support for
+ * Implements hook_views_api().
+ * Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_analysis.views.inc where all the
  *  views integration code is
  *
@@ -220,16 +231,14 @@ function tripal_analysis_block_view($delta = '') {
  */
 function tripal_analysis_views_api() {
   return array(
-    'api' => 2.0,
+    'api' => 3.0,
   );
 }
 
 /**
- * Implementation of hook_form_alter()
+ * Implementation of hook_form_alter().
  *
- * @param $form
- * @param $form_state
- * @param $form_id
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_form_alter(&$form, &$form_state, $form_id) {
   // turn of preview button for insert/updates

+ 15 - 1
tripal_analysis/tripal_analysis.views_default.inc

@@ -1,7 +1,16 @@
 <?php
 
+/**
+ * @file
+ * Contains the default views for the analysis module.
+ *
+ * @ingroup tripal_analysis
+ */
+
 /**
  * Implements hook_views_default_views().
+ *
+ * @ingroup tripal_analysis
  */
 function tripal_analysis_views_default_views() {
   $views = array();
@@ -12,6 +21,11 @@ function tripal_analysis_views_default_views() {
   return $views;
 }
 
+/**
+ * Defines the analysis admin default view.
+ *
+ * @ingroup tripal_analysis
+ */
 function tripal_analysis_defaultvalue_admin_analysis() {
 
   $view = new view();
@@ -190,4 +204,4 @@ function tripal_analysis_defaultvalue_admin_analysis() {
   $handler->display->display_options['tab_options']['weight'] = '0';
 
   return $view;
-}
+}

+ 7 - 0
tripal_bulk_loader/api/tripal_bulk_loader.api.templates.inc

@@ -1,4 +1,11 @@
 <?php
+/**
+ * @file
+ * Provides functions for hooking into bulk loader functionality.
+ *
+ * @ingroup tripal_bulk_loader
+ */
+
 /**
  * @defgroup tripal_bulk_loader_api Tripal Bulk Loader Module API
  * @ingroup tripal_api

+ 7 - 0
tripal_bulk_loader/includes/tripal_bulk_loader.admin.inc

@@ -3,8 +3,15 @@
 /**
  * @file
  * Bulk Loader Administration (Miscellaneous)
+ *
+ * @ingroup tripal_bulk_loader
  */
 
+/**
+ * Landing page for bulk loader admin. Ensures views are enabled and if not provides links to do so.
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_admin_jobs_listing() {
   $output = '';
 

+ 4 - 0
tripal_bulk_loader/includes/tripal_bulk_loader.admin.templates.inc

@@ -3,6 +3,8 @@
 /**
  * @file
  * All functions in this file pertain to administrative management of bulk loader templates
+ *
+ * @ingroup tripal_bulk_loader
  */
 
 /**
@@ -1389,6 +1391,8 @@ function tripal_bulk_loader_duplicate_template_record_form_submit($form, &$form_
 
 /**
  * Determine default values needed for add/edit field form
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_template_field_form_default_values($mode, &$form_state) {
   $v = array();

+ 15 - 10
tripal_bulk_loader/includes/tripal_bulk_loader.chado_node.inc

@@ -2,11 +2,13 @@
 
 /**
  * @file
- * Tripal Bulk Loader Node functionality (jobs)
+ * Tripal Bulk Loader Node functionality (jobs).
+ *
+ * @ingroup tripal_bulk_loader
  */
 
 /**
- * Implements hook_node_info
+ * Implements hook_node_info().
  *
  * @ingroup tripal_bulk_loader
  */
@@ -24,7 +26,7 @@ function tripal_bulk_loader_node_info() {
 }
 
 /**
- * Implements node_form
+ * Implements hook_form().
  * Used to gather the extra details stored with a Bulk Loading Job Node
  *
  * @ingroup tripal_bulk_loader
@@ -111,9 +113,10 @@ function tripal_bulk_loader_form($node, $form_state) {
 
 
 /**
- * Implements node_load
+ * Implements hook_load().
  *
  * D7 Changes: now loads all $nodes at once so need to add loops
+ *
  * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_load($nodes) {
@@ -212,7 +215,9 @@ function tripal_bulk_loader_load($nodes) {
 }
 
 /**
- * Implements hook_node_presave()
+ * Implements hook_node_presave().
+ * Acts on all node types.
+ *
  * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_node_presave($node) {
@@ -228,10 +233,11 @@ function tripal_bulk_loader_node_presave($node) {
 
 
 /**
- * Implements node_insert
+ * Implements hook_insert().
  * Insert the data from the node form on Create content
  *
  * D7 Changes: seems to need db_insert; not recommended to change $node
+ *
  * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_insert($node) {
@@ -250,7 +256,7 @@ function tripal_bulk_loader_insert($node) {
 }
 
 /**
- * Implements node_delete
+ * Implements hook_delete().
  * Deletes the data when the delete button on the node form is clicked
  *
  * @ingroup tripal_bulk_loader
@@ -268,10 +274,9 @@ function tripal_bulk_loader_delete($node) {
 }
 
 /**
- * Implements node_update
+ * Implements hook_update().
  * Updates the data submitted by the node form on edit
  *
- * D7 Changes: db_update is much easier
  * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_update($node) {
@@ -354,4 +359,4 @@ function tripal_bulk_loader_node_access($node, $op, $account) {
     return NODE_ACCESS_ALLOW;
   }
   return NODE_ACCESS_IGNORE;
-}
+}

+ 3 - 1
tripal_bulk_loader/includes/tripal_bulk_loader.constants.inc

@@ -1,7 +1,9 @@
 <?php
 /**
  * @file
- * @todo Add file header description
+ * Manages the constants form added to the tripal bulk loader node form
+ *
+ * @ingroup tripal_bulk_loader
  */
 
 /**

+ 14 - 2
tripal_bulk_loader/includes/tripal_bulk_loader.loader.inc

@@ -2,7 +2,9 @@
 
 /**
  * @file
- * @todo Add file header description
+ * Handles the actual loading of data.
+ *
+ * @ingroup tripal_bulk_loader
  */
 
 /**
@@ -1161,6 +1163,11 @@ function tripal_bulk_loader_progress_file_track_job($job_id, $record_added, $lin
   }
 }
 
+/**
+ * Used to throw a hopefully human-readable error.
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_throw_error($msg, $args, $severity) {
   $options = array('print' => TRUE);
   if ($severity == TRIPAL_NOTICE OR $severity == TRIPAL_INFO OR $severity == TRIPAL_DEBUG) {
@@ -1176,6 +1183,11 @@ function tripal_bulk_loader_throw_error($msg, $args, $severity) {
   );
 }
 
+/**
+ * Finishes the loading job by setting variables and exiting.
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_finish_loading($nid, $loaded_without_errors) {
 
   // set the status of the job (in the node not the tripal jobs)
@@ -1194,4 +1206,4 @@ function tripal_bulk_loader_finish_loading($nid, $loaded_without_errors) {
     drush_set_error('BULK_LOAD_FAILED', 'Execution aborted due to errors.');
     exit();
   }
-}
+}

+ 17 - 3
tripal_bulk_loader/tripal_bulk_loader.drush.inc

@@ -1,12 +1,16 @@
 <?php
 
 /**
- *  @file
- *  Implements drush integration for this module
+ * @file
+ * Implements drush integration for this module
+ *
+ * @ingroup tripal_bulk_loader
  */
 
 /**
  * Implements hook_drush_command().
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_drush_command() {
   $items = array();
@@ -65,6 +69,8 @@ function tripal_bulk_loader_drush_command() {
 /**
  * Code ran for the tripal-loader-progress drush command
  * Display the progress of any running tripal bulk loading job.
+ *
+ * @ingroup tripal_bulk_loader
  */
 function drush_tripal_bulk_loader_tripal_loader_progress() {
 
@@ -97,6 +103,8 @@ function drush_tripal_bulk_loader_tripal_loader_progress() {
  *
  * @param $nid
  *   The Node ID of the bulk Loading Job
+ *
+ * @ingroup tripal_bulk_loader
  */
 function drush_tripal_bulk_loader_tripal_loader_view ($nid) {
   $node = node_load($nid);
@@ -116,6 +124,8 @@ function drush_tripal_bulk_loader_tripal_loader_view ($nid) {
  *
  * @param $nid
  *   The Node ID of the bulk Loading Job
+ *
+ * @ingroup tripal_bulk_loader
  */
 function drush_tripal_bulk_loader_tripal_loader_cancel ($nid) {
   $node = node_load($nid);
@@ -128,6 +138,8 @@ function drush_tripal_bulk_loader_tripal_loader_cancel ($nid) {
  *
  * @param $nid
  *   The Node ID of the bulk Loading Job
+ *
+ * @ingroup tripal_bulk_loader
  */
 function drush_tripal_bulk_loader_tripal_loader_submit ($nid) {
   global $user;
@@ -164,6 +176,8 @@ function drush_tripal_bulk_loader_tripal_loader_submit ($nid) {
  *
  * @param $nid
  *   The Node ID of the bulk Loading Job
+ *
+ * @ingroup tripal_bulk_loader
  */
 function drush_tripal_bulk_loader_tripal_loader_revert ($nid) {
 
@@ -185,4 +199,4 @@ function drush_tripal_bulk_loader_tripal_loader_revert ($nid) {
   // reset status
   db_query("UPDATE {tripal_bulk_loader} SET job_status='%s' WHERE nid=%d", 'Reverted -Data Deleted', $nid);
 
-}
+}

+ 29 - 3
tripal_bulk_loader/tripal_bulk_loader.install

@@ -1,11 +1,16 @@
 <?php
 /**
  * @file
- * @todo Add file header description
+ * Install/Uninstalls, Enables/Disables this module.
+ *
+ * @ingroup tripal_bulk_loader
  */
 
 /**
+ * Implements hook_disable().
  * Disable default views when module is disabled
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_disable() {
 
@@ -19,12 +24,14 @@ function tripal_bulk_loader_disable() {
 }
 
 /**
- * Implements hook_schema
+ * Implements hook_schema().
  *
  * Creates the following tables in the Drupal database:
  *  - tripal_bulk_loader: Stores extra details for bulk loading jobs (nodes)
  *  - tripal_bulk_loader_template: Stores all loading templates
  *  - tripal_bulk_loader_inserted: Keeps track of all records inserted for a given bulk loading job
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_schema() {
   $schema = array();
@@ -170,8 +177,12 @@ function tripal_bulk_loader_schema() {
 }
 
 /**
+ * Implements hook_update_N().
+ *
  * Update schema for version 6.x-0.3.1b-1.5
  * - Add the tripal_bulk_loader_constants table
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_update_6150() {
 
@@ -184,9 +195,13 @@ function tripal_bulk_loader_update_6150() {
 }
 
 /**
+ * Implements hook_update_N().
+ *
  * Update schema for version 6.x-0.3.1b-1.5
  * - Add the tripal_bulk_loader_constants.group_id column
  *   to allow multiple sets of constants per job
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_update_6151() {
 
@@ -205,6 +220,11 @@ function tripal_bulk_loader_update_6151() {
   return 'Added support for multiple sets of loader-specific constants.';
 }
 
+/**
+ * Implements hook_update_N().
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tripal_bulk_loader_update_6152() {
 
   db_add_field(
@@ -222,8 +242,12 @@ function tripal_bulk_loader_update_6152() {
 }
 
 /**
+ * Implements hook_update_N().
+ *
  * Update to 7.x-2.0
  * -Cast tripal_bulk_loader.template_id to int field
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_update_7201() {
 
@@ -265,6 +289,8 @@ function tripal_bulk_loader_update_7201() {
 
 /**
  * Implementation of hook_requirements().
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_requirements($phase) {
   $requirements = array();
@@ -279,4 +305,4 @@ function tripal_bulk_loader_requirements($phase) {
     }
   }
   return $requirements;
-}
+}

+ 31 - 12
tripal_bulk_loader/tripal_bulk_loader.module

@@ -1,4 +1,10 @@
 <?php
+/**
+ * @file
+ * Provides general functions for the tripal bulk loader.
+ *
+ * @ingroup tripal_bulk_loader
+ */
 
 /**
  * @defgroup tripal_bulk_loader Tripal Bulk Loader Module
@@ -23,7 +29,7 @@ include('includes/tripal_bulk_loader.admin.templates.inc');
 include('api/tripal_bulk_loader.api.templates.inc');
 
 /**
- * Implements hook_init
+ * Implements hook_init().
  * Used to add stylesheets and javascript files to the header
  *
  * @ingroup tripal_bulk_loader
@@ -35,7 +41,7 @@ function tripal_bulk_loader_init() {
 }
 
 /**
- * Implements hook_menu
+ * Implements hook_menu().
  *
  * @ingroup tripal_bulk_loader
  */
@@ -226,16 +232,29 @@ function tripal_bulk_loader_menu() {
   return $items;
 }
 
+/**
+ * Implements hook_to_arg().
+ * Ensures the arguement for the bulk loader templates path is correct
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tblid_to_arg($arg, $map, $index) {
   if (preg_match('/^(\d+|O)$/', $arg)) {
     return $arg;
   }
 }
 
+/**
+ * Implements hook_load() for the menu system.
+ *
+ * Ensures that a number is passed to the form. We use the letter o in our path instead
+ * of the number 0 because the drupal menu system has a bug that doesn't allow 0 as
+ * the only character in the path.
+ *
+ * @ingroup tripal_bulk_loader
+ */
 function tblid_load($tblid_id) {
-  // We use the letter o in our path instead of the number 0
-  // because the drupal menu system has a bug that doesn't allow 0 as the only
-  // character in the path.
+
   if (preg_match('/O/',$tblid_id)) {
     // This ensures that the number 0 is sent to the form as the correct arg
     return 0;
@@ -246,13 +265,13 @@ function tblid_load($tblid_id) {
 }
 
 /**
- * Implements hook_views_api()
+ * Implements hook_views_api().
  *
- * Purpose: Essentially this hook tells drupal that there is views support for
- *  for this module which then includes tripal_views.views.inc where all the
- *  views integration code is
+ * Essentially this hook tells drupal that there is views support for
+ * for this module which then includes tripal_views.views.inc where all the
+ * views integration code is.
  *
- * @ingroup tripal_views
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_views_api() {
   return array(
@@ -261,7 +280,7 @@ function tripal_bulk_loader_views_api() {
 }
 
 /**
- * Implements hook_theme
+ * Implements hook_theme().
  *
  * @ingroup tripal_bulk_loader
  */
@@ -296,7 +315,7 @@ function tripal_bulk_loader_theme() {
 }
 
 /**
- * Implements hook_perm
+ * Implements hook_permission().
  *
  * @ingroup tripal_bulk_loader
  */

+ 9 - 1
tripal_bulk_loader/tripal_bulk_loader.views.inc

@@ -1,4 +1,10 @@
 <?php
+/**
+ * @file
+ * Provides Drupal views integration excluding default views.
+ *
+ * @ingroup tripal_bulk_loader
+ */
 
 /**
  * Generates a dynamic data array for Views
@@ -11,6 +17,8 @@
  * @return a data array formatted for the Views module
  *
  * D7 @todo: Add support for materialized views relationships using the new method
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_views_data() {
   $data = array();
@@ -377,4 +385,4 @@ function tripal_bulk_loader_views_data() {
   );
 
   return $data;
-}
+}

+ 15 - 2
tripal_bulk_loader/tripal_bulk_loader.views_default.inc

@@ -1,6 +1,15 @@
 <?php
+/**
+ * @file
+ * Defines the tripal bulk loader default views.
+ *
+ * @ingroup tripal_bulk_loader
+ */
+
 /**
  * Implements hook_views_default_views().
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_views_default_views() {
   $views = array();
@@ -17,7 +26,9 @@ function tripal_bulk_loader_views_default_views() {
 }
 
 /**
- * Default Admin Vire for job management
+ * Default Admin View for job management
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_defaultview_admin_job_listing() {
 
@@ -269,6 +280,8 @@ function tripal_bulk_loader_defaultview_admin_job_listing() {
 
 /**
  * Default Admin View for template management
+ *
+ * @ingroup tripal_bulk_loader
  */
 function tripal_bulk_loader_defaultview_admin_template_listing() {
 
@@ -421,4 +434,4 @@ function tripal_bulk_loader_defaultview_admin_template_listing() {
   $handler->display->display_options['menu']['context_only_inline'] = 0;
 
   return $view;
-}
+}

+ 1 - 6
tripal_contact/tripal_contact.module

@@ -4,12 +4,7 @@
  * @defgroup tripal_contact Contact Module
  * @ingroup tripal_modules
  * @{
- * Currently this module only provides support for integration with Drupal
- * views and some support for querying using the Tripal Core API.
- *
- * This module needs further development to support full management of
- * contact information within Chado, and full definitions for foreign
- * key relationships in Chado.
+ * Integrates the Chado Contact module with Drupal Nodes & Views
  * @}
  */
 

+ 2 - 2
tripal_feature/tripal_feature.module

@@ -4,7 +4,7 @@
  * @defgroup tripal_feature Feature Module
  * @ingroup tripal_modules
  * @{
- * Provides functions for managing chado features including creating details pages for each feature
+ * Integrates the Chado Sequence module with Drupal Nodes & Views
  * @}
  */
 
@@ -134,7 +134,7 @@ function tripal_feature_menu() {
     'access arguments' => array('access chado_feature content'),
     'type' => MENU_LOCAL_TASK,
   );
-  
+
   // the administative settings menu
   $items['admin/tripal/chado/tripal_feature'] = array(
     'title' => 'Features',

+ 2 - 2
tripal_featuremap/tripal_featuremap.module

@@ -4,7 +4,7 @@
  * @defgroup tripal_featuremap Feature Map Module
  * @ingroup tripal_modules
  * @{
- * Provides functions for managing chado maps including creating details pages for each map
+ * Integrates the Chado Map module with Drupal Nodes & Views
  * @}
  */
 
@@ -115,7 +115,7 @@ function tripal_featuremap_menu() {
     'type' => MENU_LOCAL_TASK,
     'weight' => 2
   );
-  
+
   $items['admin/tripal/chado/tripal_featuremap/sync'] = array(
     'title' => ' Sync',
     'description' => 'Sync featuremaps from Chado with Drupal',

+ 6 - 6
tripal_library/tripal_library.module

@@ -4,7 +4,7 @@
  * @defgroup tripal_library Library Module
  * @ingroup tripal_modules
  * @{
- * Provides functions for managing chado libraries including creating details pages for each library
+ * Integrates the Chado Library module with Drupal Nodes & Views
  * @}
  */
 
@@ -130,7 +130,7 @@ function tripal_library_views_api() {
  */
 function tripal_library_theme($existing, $type, $theme, $path) {
   $core_path = drupal_get_path('module', 'tripal_core');
-  
+
   $items = array(
     'node__chado_library' => array(
       'template' => 'node--chado-generic',
@@ -175,28 +175,28 @@ function tripal_library_theme($existing, $type, $theme, $path) {
       'variables' =>  array(NULL),
       'path' => "$path/theme",
     ),
-    
+
     // teaser
     'tripal_library_teaser' => array(
       'variables' => array('node' => NULL),
       'template' => 'tripal_library_teaser',
       'path' => "$path/theme/tripal_library",
     ),
-    
+
     // tripal_organism templates
     'tripal_organism_libraries' => array(
       'variables' => array('node' => NULL),
       'template' => 'tripal_organism_libraries',
       'path' => "$path/theme/tripal_organism",
     ),
-    
+
     // tripal_feature templates
     'tripal_feature_libraries' => array(
       'variables' => array('node' => NULL),
       'template' => 'tripal_feature_libraries',
       'path' => "$path/theme/tripal_feature",
     ),
-    
+
   );
   return $items;
 }

+ 1 - 1
tripal_organism/tripal_organism.module

@@ -8,7 +8,7 @@ require_once "includes/tripal_organism.chado_node.inc";
  * @defgroup tripal_organism Organism Module
  * @ingroup tripal_modules
  * @{
- * Provides functions for managing chado organisms including creating details pages for each one
+ * Integrates the Chado Organism module with Drupal Nodes & Views
  * @}
  */
 

+ 1 - 1
tripal_project/tripal_project.module

@@ -8,7 +8,7 @@ require('includes/tripal_project.chado_node.inc');
  * @defgroup tripal_project Project Module
  * @ingroup tripal_modules
  * @{
- * Provides functions for managing chado projects including creating details pages for each one
+ * Integrates the Chado Project tables with Drupal Nodes & Views
  * @}
  */
 

+ 4 - 1
tripal_pub/tripal_pub.module

@@ -14,7 +14,10 @@ require_once "includes/importers/tripal_pub.AGL.inc";
  * @defgroup tripal_pub Publication Module
  * @ingroup tripal_modules
  * @{
- * The Tripal Publication module allows you to search the PubMed databse for academic articles,
+ * Integrates the Chado Publication module with Drupal Nodes & Views, as well as, provides
+ * the ability to import publication from PubMed
+ *
+ * The Tripal Publication module allows you to search the PubMed database for academic articles,
  * that relate to user specified topic\s. As well, it allows management of publications so that
  * a user can enter specified details regarding a desired publication. This allows all of the important
  * information that is unique to a Academic Publication to be stored for access.

+ 8 - 8
tripal_stock/tripal_stock.module

@@ -9,7 +9,7 @@
  * @defgroup tripal_stock Stock Module
  * @ingroup tripal_modules
  * @{
- * Provides functions for managing chado stocks including creating details pages for each stock
+ * Integrates the Chado Stock module with Drupal Nodes & Views
  *
  * The Tripal Stock Module provides functionality for adding, editing, deleting and accessing chado
  * stocks. The stock module was designed to store information about stock collections in a
@@ -46,7 +46,7 @@ function tripal_stock_menu() {
     'access arguments' => array('access chado_stock content'),
     'type' => MENU_LOCAL_TASK,
   );
-  
+
   //Administrative settings menu-----------------
   $items['admin/tripal/chado/tripal_stock'] = array(
     'title' => 'Stocks',
@@ -229,7 +229,7 @@ function tripal_stock_views_api() {
  */
 function tripal_stock_theme($existing, $type, $theme, $path) {
   $core_path = drupal_get_path('module', 'tripal_core');
-  
+
   $items = array(
 
     // property edit forms function templates
@@ -245,7 +245,7 @@ function tripal_stock_theme($existing, $type, $theme, $path) {
       'variables' => array('form'),
       'function' => 'theme_tripal_stock_edit_ALL_relationships_form',
     ),
-    
+
     // tripal_stock templates
     'node__chado_stock' => array(
       'template' => 'node--chado-generic',
@@ -475,11 +475,11 @@ function tripal_stock_preprocess_tripal_stock_relationships(&$variables) {
     foreach ($orelationships as $relationship) {
       $rel = new stdClass();
       $rel->record = $relationship;
-       
+
       // get the relationship and child types
       $rel_type = t(preg_replace('/_/', " ", $relationship->type_id->name));
       $child_type = $relationship->subject_id->type_id->name;
-       
+
       // get the node id of the subject
       $sql = "SELECT nid FROM {chado_stock} WHERE stock_id = :stock_id";
       $n = db_query($sql, array(':stock_id' => $relationship->subject_id->stock_id))->fetchObject();
@@ -504,14 +504,14 @@ function tripal_stock_preprocess_tripal_stock_relationships(&$variables) {
       $rel->record = $relationship;
       $rel_type = t(preg_replace('/_/', " ", $relationship->type_id->name));
       $parent_type = $relationship->object_id->type_id->name;
-       
+
       // get the node id of the subject
       $sql = "SELECT nid FROM {chado_stock} WHERE stock_id = :stock_id";
       $n = db_query($sql, array(':stock_id' => $relationship->object_id->stock_id))->fetchObject();
       if ($n) {
         $rel->record->nid = $n->nid;
       }
-       
+
       if (!array_key_exists($rel_type, $relationships['subject'])) {
         $relationships['subject'][$rel_type] = array();
       }

+ 11 - 11
tripal_views/tripal_views.views.inc

@@ -6,37 +6,37 @@ include('views/handlers/tripal_views_handler_area_action_links.inc');
 /**
  * @file
  * Tripal Views Integration
- *
- * @defgroup views Views Integration
- * @{
- * Provide rules for formatting and composition of fields
- * @}
- *
+ */
+
+/**
  * @defgroup views_handlers Views Integration Handlers
  * @ingroup views
  * @{
  * Provide rules for formatting and composition of fields
  * @}
- *
+ */
+/**
  * @defgroup views_field_handlers Views Field Handlers
  * @ingroup views_handlers
  * @{
  * Provide rules for formatting and composition of fields
  * @}
- *
- *
+ */
+/**
  * @defgroup views_filter_handlers Views Filter Handlers
  * @ingroup views_handlers
  * @{
  * Provide the ability to filter based on specified data
  * @}
- *
+ */
+/**
  * @defgroup views_sort_handlers Views Sort Handlers
  * @ingroup views_handlers
  * @{
  * Provide methods describing how specific data should be sorted
  * @}
- *
+ */
+/**
  * @defgroup views_argument_handlers Views Arguement Handlers
  * @ingroup views_handlers
  * @{