Browse Source

Merged api_changes branch and fixed merged conflict with contact module

Stephen Ficklin 11 năm trước cách đây
mục cha
commit
af548f769f
30 tập tin đã thay đổi với 421 bổ sung219 xóa
  1. 9 2
      tripal_contact/api/tripal_contact.api.inc
  2. 14 5
      tripal_contact/includes/tripal_contact.admin.inc
  3. 36 25
      tripal_contact/includes/tripal_contact.chado_node.inc
  4. 29 7
      tripal_contact/tripal_contact.install
  5. 34 32
      tripal_contact/tripal_contact.module
  6. 11 1
      tripal_contact/tripal_contact.views_default.inc
  7. 40 37
      tripal_core/api/get_FKs.php
  8. 7 2
      tripal_core/api/tripal_core.chado_general.api.inc
  9. 7 24
      tripal_core/api/tripal_core.chado_nodes.api.inc
  10. 6 6
      tripal_core/api/tripal_core.chado_nodes.dbxrefs.api.inc
  11. 7 5
      tripal_core/api/tripal_core.chado_nodes.properties.api.inc
  12. 8 6
      tripal_core/api/tripal_core.chado_nodes.relationships.api.inc
  13. 6 1
      tripal_core/api/tripal_core.chado_query.api.inc
  14. 4 0
      tripal_core/api/tripal_core.chado_variables.api.inc
  15. 5 0
      tripal_core/api/tripal_core.custom_tables.api.inc
  16. 8 0
      tripal_core/api/tripal_core.files.api.inc
  17. 6 0
      tripal_core/api/tripal_core.jobs.api.inc
  18. 8 3
      tripal_core/api/tripal_core.mviews.api.inc
  19. 5 0
      tripal_core/api/tripal_core.schema_v1.11.api.inc
  20. 5 0
      tripal_core/api/tripal_core.schema_v1.2.api.inc
  21. 1 2
      tripal_core/includes/chado_install.inc
  22. 25 12
      tripal_core/includes/custom_tables.inc
  23. 22 12
      tripal_core/includes/form_elements.inc
  24. 19 7
      tripal_core/includes/jobs.inc
  25. 17 8
      tripal_core/includes/mviews.inc
  26. 30 3
      tripal_core/tripal_core.drush.inc
  27. 0 1
      tripal_core/tripal_core.install
  28. 16 15
      tripal_core/tripal_core.module
  29. 14 2
      tripal_core/tripal_core.views.inc
  30. 22 1
      tripal_core/tripal_core.views_default.inc

+ 9 - 2
tripal_contact/api/tripal_contact.api.inc

@@ -1,4 +1,11 @@
 <?php
+/**
+ * @file
+ * Functions to interact with contacts.
+ *
+ * @ingroup tripal_contact
+ */
+
 /**
  * @defgroup tripal_contact_api Contact Module API
  * @ingroup tripal_api
@@ -68,6 +75,7 @@ function tripal_contact_insert_property($contact_id, $property, $value, $update_
 function tripal_contact_update_property($contact_id, $property, $value, $insert_if_missing = 0) {
   return chado_update_property('contact', $contact_id, $property, 'tripal_contact', $value, $insert_if_missing);
 }
+
 /**
  * Delete a given property
  *
@@ -108,7 +116,6 @@ function tripal_contact_delete_property($contact_id, $property) {
  *   returned
  *
  * @ingroup tripal_contact_api
- *
  */
 function tripal_contact_add_contact($name, $description, $type, $properties) {
 
@@ -156,4 +163,4 @@ function tripal_contact_add_contact($name, $description, $type, $properties) {
     }
   }
   return $contact;
-}
+}

+ 14 - 5
tripal_contact/includes/tripal_contact.admin.inc

@@ -1,7 +1,16 @@
 <?php
+/**
+ * @file
+ * Handle administration of contacts.
+ *
+ * @ingroup tripal_contact
+ */
 
 /**
+ * Launchpage for contact administration. Makes sure views are enabled and if not provides
+ * links to enable them.
  *
+ * @ingroup tripal_contact
  */
 function tripal_contact_admin_contact_view() {
   $output = '';
@@ -33,7 +42,6 @@ function tripal_contact_admin_contact_view() {
   return $output;
 }
 
-
 /**
  * Administrative settings form
  *
@@ -51,19 +59,20 @@ function tripal_contact_admin() {
 
 
 /**
+ * Reindex nodes for drupal search
  *
  * @ingroup tripal_contact
  */
 function get_tripal_contact_admin_form_reindex_set(&$form) {
 
- 
+
 }
+
 /**
+ * Validate the contact settings form.
  *
  * @ingroup tripal_contact
  */
 function tripal_contact_admin_validate($form, &$form_state) {
-  global $user;  // we need access to the user info
-  $job_args = array();
-}
 
+}

+ 36 - 25
tripal_contact/includes/tripal_contact.chado_node.inc

@@ -1,9 +1,16 @@
 <?php
 /**
- * Implementation of hook_tripal_contact_node_info().
+ * @file
+ * Implements drupal node hooks.
  *
+ * @ingroup tripal_contact
+ */
+
+/**
+ * Implementation of hook_node_info().
  * This node_info, is a simple node that describes the functionallity of the module.
  *
+ * @ingroup tripal_contact
  */
 function tripal_contact_node_info() {
 
@@ -31,10 +38,9 @@ function tripal_contact_node_info() {
     ),
   );
 }
+
 /**
- * Implementation of tripal_contact_form().
- *
- *
+ * Implementation of hook_form().
  *
  *  @parm $node
  *    The node that is created when the database is initialized
@@ -46,6 +52,7 @@ function tripal_contact_node_info() {
  *  @return $form
  *    The information that was enterd allong with
  *
+ * @ingroup tripal_contact
  */
 function chado_contact_form(&$node, $form_state) {
   $form = array();
@@ -228,7 +235,8 @@ function chado_contact_form(&$node, $form_state) {
 }
 
 /**
- *  validates submission of form when adding or updating a contact node
+ * Implements hook_validate().
+ * Validates submission of form when adding or updating a contact node.
  *
  * @ingroup tripal_contact
  */
@@ -280,7 +288,7 @@ function chado_contact_validate($node, $form, &$form_state) {
 }
 
 /**
- * Implement hook_access().
+ * Implements hook_access().
  *
  * This hook allows node modules to limit access to the node types they define.
  *
@@ -300,6 +308,7 @@ function chado_contact_validate($node, $form, &$form_state) {
  *  access.  The only exception is when the $op == 'create'.  We will always
  *  return TRUE if the permission is set.
  *
+ * @ingroup tripal_contact
  */
 function chado_contact_node_access($node, $op, $account ) {
   if ($op == 'create') {
@@ -330,7 +339,7 @@ function chado_contact_node_access($node, $op, $account ) {
 
 
 /**
- * Implementation of tripal_contact_insert().
+ * Implements of hook_insert().
  *
  * This function inserts user entered information pertaining to the contact instance into the
  * 'contactauthor', 'contactprop', 'chado_contact', 'contact' talble of the database.
@@ -338,7 +347,7 @@ function chado_contact_node_access($node, $op, $account ) {
  *  @parm $node
  *    Then node which contains the information stored within the node-ID
  *
- *
+ * @ingroup tripal_contact
  */
 function chado_contact_insert($node) {
 
@@ -404,19 +413,18 @@ function chado_contact_insert($node) {
   return TRUE;
 }
 
-/*
+/**
+ * Implements hook_update
+ *
+ * The purpose of the function is to allow the module to take action when an edited node is being
+ * updated. It updates any name changes to the database tables that werec reated upon registering a contact.
+ * As well, the database will be changed, so the user changed information will be saved to the database.
+ *
+ * @param $node
+ *   The node being updated
  *
-* Implements hook_update
-*
-* The purpose of the function is to allow the module to take action when an edited node is being
-* updated. It updates any name changes to the database tables that werec reated upon registering a contact.
-* As well, the database will be changed, so the user changed information will be saved to the database.
-*
-* @param $node
-*   The node being updated
-*
-* @ingroup tripal_contact
-*/
+ * @ingroup tripal_contact
+ */
 function chado_contact_update($node) {
   // remove surrounding white-space on submitted values
   $node->contactname          = trim($node->contactname);
@@ -466,8 +474,7 @@ function chado_contact_update($node) {
 
 
 /**
- * Implementation of tripal_contact_load().
- *
+ * Implements hook_load().
  *
  * @param $node
  *   The node that is to be accessed from the database
@@ -475,6 +482,7 @@ function chado_contact_update($node) {
  * @return $node
  *   The node with the information to be loaded into the database
  *
+ * @ingroup tripal_contact
  */
 function chado_contact_load($nodes) {
 
@@ -510,7 +518,7 @@ function chado_contact_load($nodes) {
 }
 
 /**
- * Implementation of tripal_contact_delete().
+ * Implements hook_delete().
  *
  * This function takes a node and if the delete button has been chosen by the user, the contact
  * and it's details will be removed.Following,given the node-ID, the instance will be deleted from
@@ -519,6 +527,7 @@ function chado_contact_load($nodes) {
  *  @parm $node
  *    Then node which contains the information stored within the node-ID
  *
+ * @ingroup tripal_contact
  */
 function chado_contact_delete(&$node) {
 
@@ -546,8 +555,9 @@ function chado_contact_delete(&$node) {
 
 
 /**
+ * Implements hook_node_view().
  *
- * @ingroup tripal_feature
+ * @ingroup tripal_contact
  */
 function tripal_contact_node_view($node, $view_mode, $langcode) {
   switch ($node->type) {
@@ -586,8 +596,9 @@ function tripal_contact_node_view($node, $view_mode, $langcode) {
 }
 
 /**
+ * Implements hook_node_presave().
  *
- * @param $node
+ * @ingroup tripal_contact
  */
 function tripal_contact_node_presave($node) {
   switch ($node->type) {

+ 29 - 7
tripal_contact/tripal_contact.install

@@ -2,16 +2,16 @@
 
 /**
  * @file
- * This file contains all the functions which describe and implement drupal database tables
- * needed by this module. This module was developed by Chad N.A. Krilow and Lacey-Anne Sanderson,
- * University of Saskatchewan.
+ * Handles install, uninstall, disable and enable functionality including database tables.
  *
- * The contact manamgenet module allows you to sync data in a chado/Tripal instance with
- * multiple contact/mysql instances as well as manage and create such contact instances
+ * @ingroup tripal_contact
  */
 
 /**
+ * Implements hook_disable().
  * Disable default views when module is disabled
+ *
+ * @ingroup tripal_contact
  */
 function tripal_contact_disable() {
 
@@ -27,6 +27,7 @@ function tripal_contact_disable() {
 /**
  * Implementation of hook_requirements().
  *
+ * @ingroup tripal_contact
  */
 function tripal_contact_requirements($phase) {
   $requirements = array();
@@ -45,6 +46,8 @@ function tripal_contact_requirements($phase) {
 
 /**
  * Implementation of hook_install().
+ *
+ * @ingroup tripal_contact
  */
 function tripal_contact_install() {
 
@@ -78,6 +81,8 @@ function tripal_contact_install() {
 
 /**
  * Implementation of hook_uninstall().
+ *
+ * @ingroup tripal_contact
  */
 function tripal_contact_uninstall() {
   /*
@@ -89,6 +94,11 @@ function tripal_contact_uninstall() {
     */
 }
 
+/**
+ * Adds any cvs needed by this module.
+ *
+ * @ingroup tripal_contact
+ */
 function tripal_contact_add_cvs() {
 
   tripal_cv_add_cv(
@@ -98,12 +108,19 @@ function tripal_contact_add_cvs() {
 
 }
 
+/**
+ * Adds any cvterms needed by this module.
+ *
+ * @ingroup tripal_contact
+ */
 function tripal_contact_add_cvterms() {
 
 }
 
 /**
  * Implementation of hook_schema().
+ *
+ * @ingroup tripal_contact
  */
 function tripal_contact_schema() {
   $schema['chado_contact'] = array(
@@ -138,9 +155,11 @@ function tripal_contact_schema() {
   return $schema;
 }
 
-
-/*
+/**
+ * Add any custom tables needed by this module.
+ * - Contactprop: keep track of properties of contact
  *
+ * @ingroup tripal_contact
  */
 function tripal_contact_add_custom_tables(){
   $schema = array (
@@ -206,9 +225,12 @@ function tripal_contact_add_custom_tables(){
 
 /**
  * This is the required update for tripal_contact when upgrading from Drupal core API 6.x.
+ *
+ * @ingroup tripal_contact
  */
 function tripal_contact_update_7000() {
 
   tripal_contact_add_cvs();
   tripal_contact_add_cvterms();
+
 }

+ 34 - 32
tripal_contact/tripal_contact.module

@@ -1,4 +1,10 @@
 <?php
+/**
+ * @file
+ * Functions related to general module functionality.
+ *
+ * @ingroup tripal_contact
+ */
 
 /**
  * @defgroup tripal_contact Contact Module
@@ -8,44 +14,37 @@
  * @}
  */
 
-require('api/tripal_contact.api.inc');
-require('theme/tripal_contact.theme.inc');
-require('includes/tripal_contact.admin.inc');
-require('includes/tripal_contact.chado_node.inc');
+require 'api/tripal_contact.api.inc';
+
+require 'theme/tripal_contact.theme.inc';
+
+require 'includes/tripal_contact.admin.inc';
+require 'includes/tripal_contact.chado_node.inc';
 
 /**
- * Implements hook_views_api()
- * Purpose: Essentially this hook tells drupal that there is views support for
- *  for this module which then includes tripal_contact.views.inc where all the
- *  views integration code is
+ * Implements hook_views_api().
+ * Essentially this hook tells drupal that there is views support for
+ * for this module which then includes tripal_contact.views.inc where all the
+ * views integration code is.
  *
  * @ingroup tripal_contact
  */
 function tripal_contact_views_api() {
   return array(
-      'api' => 2.0,
+      'api' => 3.0,
   );
 }
 
 /**
- *
- * @ingroup tripal_contact
- */
-function tripal_contact_init() {
-
-}
-
-
-
-/**
- * Tripal-contact-Menu
- *
- * Implemets hook_menu(): Adds menu items for the tripal_contact module menu. This section
+ * Implemets hook_menu().
+ * Adds menu items for the tripal_contact module menu. This section
  * gives the outline for the main menu of the Tripal-contact module
  *
  * @return
  *   An array of menu items that is visible within the Drupal Menu, returned as soon
  *   as the program is ran
+ *
+ * @ingroup tripal_contact
  */
 function tripal_contact_menu() {
 
@@ -103,12 +102,13 @@ function tripal_contact_menu() {
 }
 
 /**
- * Implements hook_theme(): Register themeing functions for this module
- *
+ * Implements hook_theme().
+ * Register themeing functions for this module
  *
  * @return
  *   An array of themeing functions to register
  *
+ * @ingroup tripal_contact
  */
 function tripal_contact_theme($existing, $type, $theme, $path) {
   $core_path = drupal_get_path('module', 'tripal_core');
@@ -153,7 +153,10 @@ function tripal_contact_theme($existing, $type, $theme, $path) {
   );
   return $items;
 }
+
 /**
+ * Implements hook_block_info().
+ *
  * @ingroup tripal_contact
  */
 function tripal_contact_block_info() {
@@ -172,7 +175,9 @@ function tripal_contact_block_info() {
 
   return $blocks;
 }
+
 /**
+ * Implements hook_block_view().
  * @ingroup tripal_contact
  */
 function tripal_contact_block_view($delta = '') {
@@ -222,7 +227,9 @@ function tripal_contact_block_view($delta = '') {
 }
 
 /**
- * Implement hook_perm().
+ * Implement hook_permissions().
+ *
+ * @ingroup tripal_contact
  */
 function tripal_contact_permissions() {
   return array(
@@ -249,15 +256,10 @@ function tripal_contact_permissions() {
   );
 }
 
-
-
-
 /**
- * Implementation of hook_form_alter()
+ * Implementation of hook_form_alter().
  *
- * @param $form
- * @param $form_state
- * @param $form_id
+ * @ingroup tripal_contact
  */
 function tripal_contact_form_alter(&$form, &$form_state, $form_id) {
   // turn of preview button for insert/updates

+ 11 - 1
tripal_contact/tripal_contact.views_default.inc

@@ -1,7 +1,15 @@
 <?php
+/**
+ * @file
+ * Define default views for contacts.
+ *
+ * @ingroup tripal_contact
+ */
 
 /**
+ * Implements hook_views_default_views().
  *
+ * @ingroup tripal_contact
  */
 function tripal_contact_views_default_views() {
   $views = array();
@@ -13,7 +21,9 @@ function tripal_contact_views_default_views() {
 }
 
 /**
+ * Define the default view for contact administration.
  *
+ * @ingroup tripal_contact
  */
 function tripal_contact_defaultview_admin_contacts() {
 
@@ -204,4 +214,4 @@ function tripal_contact_defaultview_admin_contacts() {
   $handler->display->display_options['filters']['type_id']['expose']['max_length'] = 40;
   */
   return $view;
-}
+}

+ 40 - 37
tripal_core/api/get_FKs.php

@@ -1,22 +1,24 @@
 <?php
-// This script will add FK relatinsions to an existing schema API array for each 
-// Chado table.  It requires Chado is installed in a 'chado' schema of 
-// the drupal database.  It also requires existing schema hooks for 
-// version of Chado.  The goal is to use the output of this script to 
-// update the existing schema hooks.  Redirect the output of this script to 
-// a file and then replace the existing schema API include file (e.g. 
-// tripal_core.schema_v1.2.api.inc).  Be sure to check it before replacing
-
-// this script requires a single argument (-v) which is the Chado version
-//
-// example usage in drupal directory root:
-//
-// php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.11 > \
-//   ./sites/all/modules/tripal/tripal_core/apitripal_core.schema_v1.11.api.inc.new
-//
-// php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.2 > \
-//   ./sites/all/modules/tripal/tripal_core/api/tripal_core.schema_v1.2.api.inc.new
-
+/**
+ * @file
+ * This script will add FK relatinsions to an existing schema API array for each
+ * Chado table.  It requires Chado is installed in a 'chado' schema of
+ * the drupal database.  It also requires existing schema hooks for
+ * version of Chado.  The goal is to use the output of this script to
+ * update the existing schema hooks.  Redirect the output of this script to
+ * a file and then replace the existing schema API include file (e.g.
+ * tripal_core.schema_v1.2.api.inc).  Be sure to check it before replacing
+ *
+ * This script requires a single argument (-v) which is the Chado version.
+ *
+ * Example usage in drupal directory root:
+ *
+ * php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.11 > \
+ *   ./sites/all/modules/tripal/tripal_core/apitripal_core.schema_v1.11.api.inc.new
+ *
+ * php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.2 > \
+ *   ./sites/all/modules/tripal/tripal_core/api/tripal_core.schema_v1.2.api.inc.new
+ */
 
 $arguments = getopt("v:");
 
@@ -35,27 +37,28 @@ if (isset($arguments['v'])) {
 }
 
 /**
- *
+ * This function does the actual work of determining the foreign key relationships from
+ * the database and creating the schema file.
  */
 function get_chado_fk_relationships($version) {
 
   // convert the version to a form suitable for function names
   $v = $version;
   $v = preg_replace("/\./","_",$v);
- 
-  $tables = tripal_core_get_chado_tables(); 
+
+  $tables = tripal_core_get_chado_tables();
   $sql ="
     SELECT
-        tc.constraint_name, tc.table_name, kcu.column_name, 
+        tc.constraint_name, tc.table_name, kcu.column_name,
         ccu.table_name AS foreign_table_name,
-        ccu.column_name AS foreign_column_name 
-    FROM 
-        information_schema.table_constraints AS tc 
+        ccu.column_name AS foreign_column_name
+    FROM
+        information_schema.table_constraints AS tc
         JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name
         JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name
     WHERE constraint_type = 'FOREIGN KEY' AND tc.table_name=:table_name
   ";
-    
+
   // iterate through the tables and get the foreign keys
   print "<?php
 /* @file: This file contains default schema definitions for all chado v$version tables
@@ -73,7 +76,7 @@ function get_chado_fk_relationships($version) {
  * This API consists of a set of functions, one for each table in Chado.  Each
  * function simply returns a Drupal style array that defines the table.
  *
- * Because Drupal 6 does not handle foreign key (FK) relationships, however FK 
+ * Because Drupal 6 does not handle foreign key (FK) relationships, however FK
  * relationships are needed to for Tripal Views.  Therefore, FK relationships
  * have been added to the schema defintitions below.
  *
@@ -84,8 +87,8 @@ function get_chado_fk_relationships($version) {
  *   \$table_desc = tripal_core_get_chado_table_schema(\$table)
  *
  * where the variable \$table contains the name of the table you want to
- * retireve.  The tripal_core_get_chado_table_schema function determines the appropriate version of 
- * Chado and uses the Drupal hook infrastructure to call the appropriate 
+ * retireve.  The tripal_core_get_chado_table_schema function determines the appropriate version of
+ * Chado and uses the Drupal hook infrastructure to call the appropriate
  * hook function to retrieve the table schema.
  *
  * @}
@@ -98,15 +101,15 @@ function get_chado_fk_relationships($version) {
 
     // get the existing table array
     $table_arr = tripal_core_get_chado_table_schema($table);
-    
+
     if (empty($table_arr)) {
        print "ERROR: empty table definition $table\n";
        continue;
     }
-    
+
     // add the table name to the array
     $table_arr['table'] = $table;
-    
+
     // get the foreign keys and add them to the array
     $fks = db_query($sql, array(':table_name' => $table));
     foreach ($fks as $fk) {
@@ -116,23 +119,23 @@ function get_chado_fk_relationships($version) {
     }
     $tables_def[] = $table_arr;
   }
-  
+
   // now add in the referring tables and print
   foreach ($tables_def as $table_arr) {
     $table = $table_arr['table'];
-    
+
     // add in the referring tables
     $table_referring = array_unique($reffering[$table]);
     $table_arr['referring_tables'] = $table_referring;
-      
+
     // reformat the array to be more legible
     $arr = var_export($table_arr, 1);
     $arr = preg_replace("/\n\s+array/","array", $arr); // move array( to previous line
     $arr = preg_replace("/\n/","\n  ", $arr); // add indentation
     $arr = preg_replace("/true/","TRUE", $arr); // add indentation
     $arr = preg_replace("/false/","FALSE", $arr); // add indentation
-    $arr = preg_replace("/array \(/","array(", $arr); // add indentation      
-      
+    $arr = preg_replace("/array \(/","array(", $arr); // add indentation
+
       // print out the new Schema API function for this table
 print "/**
  * Implements hook_chado_schema_v".$v."_".$table."()

+ 7 - 2
tripal_core/api/tripal_core.chado_general.api.inc

@@ -1,13 +1,18 @@
 <?php
+/**
+ * @file
+ * Provides an application programming interface (API) to manage data withing the Chado database.
+ */
 
-require_once "tripal_core.schema_v1.2.api.inc";
-require_once "tripal_core.schema_v1.11.api.inc";
+require_once 'tripal_core.schema_v1.2.api.inc';
+require_once 'tripal_core.schema_v1.11.api.inc';
 
 /**
  * @defgroup tripal_chado_api Chado API
  * @ingroup tripal_core_api
  * @{
  * Provides an application programming interface (API) to manage data withing the Chado database.
+ *
  * This includes functions for selecting, inserting, updating and deleting records
  * in Chado tables.  The functions will ensure proper integrity contraints are met
  * for inserts and updates.

+ 7 - 24
tripal_core/api/tripal_core.chado_nodes.api.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * API to handle much of the common functionality implemented when creating a drupal node type.
+ */
 
 /**
  * @defgroup tripal_chado_node_api Chado Node API
@@ -21,35 +25,14 @@
  * The functions of interest are as follows:
  *   - chado_add_node_form_properties() and chado_update_node_form_properties()
  *     to provide an interface for adding/removing properties
- *   - tripal_core_additional_dbxrefs_form() and tripal_core_additional_dbxrefs_form_update_dbxrefs()
+ *   - chado_add_node_form_dbxrefs() and chado_update_node_form_dbxrefs()
  *     to provide an interface for adding/removing additional database references
- *   - tripal_core_relationships_form() and tripal_core_relationships_form_update_relationships()
+ *   - chado_add_node_form_relationships() and chado_update_node_form_relationships()
  *     to provide an interface for adding/removing relationships between chado records
  *     from your base table
  * @}
  */
 
-/**
- * Determine whether a given chado table is directly linked to a node
- *
- * @param $chado_table
- *   The name of a chado table to check (ie: feature)
- * @return
- *   TRUE if it is linked to a node and FALSE otherwise
- *
- * @ingroup tripal_chado_node_api
- *
-function tripal_core_is_tripal_node_type($chado_table) {
-  $linking_table = 'chado_' . $chado_table;
-  if (db_table_exists($linking_table)) {
-    return TRUE;
-  }
-  else {
-    return FALSE;
-  }
-}
-*/
-
 /**
  * Sync'ing chado records with Drupal by creating nodes
  *
@@ -352,7 +335,7 @@ function chado_node_sync_form($form, &$form_state) {
 /**
  * Generic Sync Form Submit
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_node_sync_form_submit($form, $form_state) {
 

+ 6 - 6
tripal_core/api/tripal_core.chado_nodes.dbxrefs.api.inc

@@ -356,7 +356,7 @@ function chado_add_node_form_dbxrefs(&$form, &$form_state, $details) {
  * Validate the user input for creating a new dbxref
  * Called by the add button in chado_add_node_form_dbxrefs
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_dbxrefs_add_button_validate($form, &$form_state) {
 
@@ -385,7 +385,7 @@ function chado_add_node_form_dbxrefs_add_button_validate($form, &$form_state) {
  * Create an array of additional dbxrefs in the form state. This array will then be
  * used to rebuild the form in subsequent builds
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_dbxrefs_add_button_submit(&$form, &$form_state) {
 
@@ -416,7 +416,7 @@ function chado_add_node_form_dbxrefs_add_button_submit(&$form, &$form_state) {
  *
  * Called by the many remove buttons in chado_add_node_form_dbxrefs
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_dbxrefs_remove_button_validate($form, $form_state) {
   // No Validation needed for remove
@@ -426,7 +426,7 @@ function chado_add_node_form_dbxrefs_remove_button_validate($form, $form_state)
  * Remove the correct dbxref from the form
  * Called by the many remove buttons in chado_add_node_form_dbxrefs
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_dbxrefs_remove_button_submit(&$form, &$form_state) {
 
@@ -450,7 +450,7 @@ function chado_add_node_form_dbxrefs_remove_button_submit(&$form, &$form_state)
 /**
  * Ajax function which returns the section of the form to be re-rendered
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_dbxrefs_ajax_update($form, $form_state) {
   return $form['addtl_dbxrefs']['dbxref_table'];
@@ -472,7 +472,7 @@ function chado_add_node_form_dbxrefs_ajax_update($form, $form_state) {
  *   ),
  * );
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_dbxrefs_create_dbxref_formstate_array($form, &$form_state) {
 

+ 7 - 5
tripal_core/api/tripal_core.chado_nodes.properties.api.inc

@@ -723,7 +723,7 @@ function chado_add_node_form_properties(&$form, &$form_state, $details) {
  * Validate the user input for creating a new property
  * Called by the add button in chado_add_node_form_properties
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_update_node_form_properties_add_button_validate($form, &$form_state) {
 
@@ -752,7 +752,7 @@ function chado_update_node_form_properties_add_button_validate($form, &$form_sta
  * Create an array of properties in the form state. This array will then be
  * used to rebuild the form in subsequent builds
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_properties_add_button_submit(&$form, &$form_state) {
 
@@ -795,7 +795,7 @@ function chado_add_node_form_properties_add_button_submit(&$form, &$form_state)
  *
  * Called by the many remove buttons in chado_add_node_form_properties
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_properties_remove_button_validate($form, $form_state) {
   // No Validation needed for remove
@@ -805,7 +805,7 @@ function chado_add_node_form_properties_remove_button_validate($form, $form_stat
  * Remove the correct property from the form
  * Called by the many remove buttons in chado_add_node_form_properties
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_properties_remove_button_submit(&$form, &$form_state) {
 
@@ -828,6 +828,8 @@ function chado_add_node_form_properties_remove_button_submit(&$form, &$form_stat
 
 /**
  * Ajax function which returns the section of the form to be re-rendered
+ *
+ * @ingroup tripal_core
  */
 function chado_add_node_form_properties_ajax_update($form, $form_state) {
   return $form['properties']['property_table'];
@@ -849,7 +851,7 @@ function chado_add_node_form_properties_ajax_update($form, $form_state) {
  *   ),
  * );
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_properties_create_property_formstate_array($form, &$form_state) {
 

+ 8 - 6
tripal_core/api/tripal_core.chado_nodes.relationships.api.inc

@@ -419,7 +419,7 @@ function chado_add_node_form_relationships(&$form, &$form_state, $details) {
  * Validate the user input for creating a new relationship
  * Called by the add button in chado_add_node_form_relationships
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_relationships_add_button_validate($form, &$form_state) {
 
@@ -524,7 +524,7 @@ function chado_add_node_form_relationships_add_button_validate($form, &$form_sta
  * Create an array of additional relationships in the form state. This array will then be
  * used to rebuild the form in subsequent builds
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_relationships_add_button_submit(&$form, &$form_state) {
 
@@ -575,7 +575,7 @@ function chado_add_node_form_relationships_add_button_submit(&$form, &$form_stat
  *
  * Called by the many remove buttons in chado_add_node_form_relationships
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_relationships_form_remove_button_validate($form, $form_state) {
   // No Validation needed for remove
@@ -585,7 +585,7 @@ function chado_add_node_form_relationships_form_remove_button_validate($form, $f
  * Remove the correct relationship from the form
  * Called by the many remove buttons in chado_add_node_form_relationships
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_relationships_remove_button_submit(&$form, &$form_state) {
 
@@ -609,7 +609,7 @@ function chado_add_node_form_relationships_remove_button_submit(&$form, &$form_s
 /**
  * Ajax function which returns the section of the form to be re-rendered
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_relationships_ajax_update($form, $form_state) {
   return $form['relationships']['relationship_table'];
@@ -631,7 +631,7 @@ function chado_add_node_form_relationships_ajax_update($form, $form_state) {
  *   ),
  * );
  *
- * @ingroup tripal_chado_node_api
+ * @ingroup tripal_core
  */
 function chado_add_node_form_relationships_create_relationship_formstate_array($form, &$form_state) {
 
@@ -838,6 +838,8 @@ function chado_update_node_form_relationships($node, $details, $retrieved_relati
  *
  * @param $string
  *    The part of the string already typed in the textfield
+ *
+ * @ingroup tripal_core
  */
 function chado_add_node_form_relationships_name_to_id_callback($base_table, $name_field, $string) {
   $matches = array();

+ 6 - 1
tripal_core/api/tripal_core.chado_query.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Provides an API for querying of chado including inserting, updating, deleting and
+ * selecting from chado.
+ */
 
 /**
  * @defgroup tripal_chado_query_api Chado Query API
@@ -1395,7 +1400,7 @@ function chado_pager_query($query, $args, $limit, $element, $count_query = '') {
  * species.  The cvterm is also specified using its foreign key and the cv_id
  * for the cvterm is nested as well.
  *
- * @ingroup tripal_chado_query_api
+ * @ingroup tripal_core
  */
 function chado_schema_get_foreign_key($table_desc, $field, $values, $options = NULL) {
 

+ 4 - 0
tripal_core/api/tripal_core.chado_variables.api.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * This API generates objects containing the full details of a record(s) in chado.
+ */
 
 /**
  * @defgroup tripal_chado_variables_api Chado Variables API

+ 5 - 0
tripal_core/api/tripal_core.custom_tables.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Provides an API to manage custom tables in Chado.
+ */
+
 /**
  * @defgroup tripal_custom_tables_api Custom Tables API
  * @ingroup tripal_core_api

+ 8 - 0
tripal_core/api/tripal_core.files.api.inc

@@ -1,4 +1,10 @@
 <?php
+/**
+ * @file
+ * Provides an application programming interface (API) for managing files within
+ * the Tripal data directory structure.
+ */
+
 /**
  * @defgroup tripal_files_api Files API
  * @ingroup tripal_core_api
@@ -19,6 +25,8 @@
  *   the name of the module being installed
  * @param $path
  *   Optional sub-path to create
+ *
+ * @ingroup tripal_files_api
  */
 function tripal_create_files_dir($module_name, $path = FALSE) {
 

+ 6 - 0
tripal_core/api/tripal_core.jobs.api.inc

@@ -1,4 +1,10 @@
 <?php
+/**
+ * @file
+ * Tripal offers a job management subsystem for managing tasks that may require an extended period of time for
+ * completion.
+ */
+
 /**
  * @defgroup tripal_jobs_api Jobs API
  * @ingroup tripal_core_api

+ 8 - 3
tripal_core/api/tripal_core.mviews.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Provides an application programming interface (API) to manage materialized views in Chado.
+ */
+
 /**
  * @defgroup tripal_mviews_api Materalized Views API
  * @ingroup tripal_core_api
@@ -314,7 +319,7 @@ function tripal_mviews_get_mview_id($view_name) {
  * @param $redirect
  *   TRUE/FALSE depending on whether you want to redirect the user to admin/tripal/mviews
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews_api
  */
 function tripal_add_populate_mview($mview_id, $redirect = FALSE) {
   global $user;
@@ -349,7 +354,7 @@ function tripal_add_populate_mview($mview_id, $redirect = FALSE) {
  * @param $redirect
  *   TRUE/FALSE depending on whether you want to redirect the user to admin/tripal/mviews
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews_api
  */
 function tripal_delete_mview($mview_id, $redirect = FALSE) {
   global $user;
@@ -436,4 +441,4 @@ function tripal_populate_mview($mview_id) {
     print "Done.\n";
     return TRUE;
   }
-}
+}

+ 5 - 0
tripal_core/api/tripal_core.schema_v1.11.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Describes the chado tables in version 1.11
+ */
+
 /**
  * @defgroup tripal_schema_v1_11_api Chado v1.11 Schema API
  * @ingroup tripal_chado_schema_api

+ 5 - 0
tripal_core/api/tripal_core.schema_v1.2.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Describes the chado tables in version 1.2
+ */
+
 /**
  * @defgroup tripal_schema_v1_2_api Chado v1.2 Schema API
  * @ingroup tripal_chado_schema_api

+ 1 - 2
tripal_core/includes/chado_install.inc

@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Functions to install chado schema through Drupal
@@ -59,7 +58,7 @@ function tripal_core_chado_load_form() {
 }
 
 /**
- * Submit Load Chado Schema 1.11 Form
+ * Submit Load Chado Schema Form
  *
  * @ingroup tripal_core
  */

+ 25 - 12
tripal_core/includes/custom_tables.inc

@@ -1,15 +1,25 @@
 <?php
-
 /**
  * @file
  * Contains functions for creating, editing and deleting custom tables
  * on the Tripal website.
  *
+ * @ingroup tripal_custom_tables
+ */
+
+/**
+ * @defgroup tripal_custom_tables Custom Chado Tables
  * @ingroup tripal_core
+ * @{
+ * Contains functions for creating, editing and deleting custom tables
+ * on the Tripal website.
+ * @}
  */
 
 /**
- * Provides a landing page for tripal jobs admin
+ * Provides a landing page for administrating custom tables.
+ *
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_table_admin_view() {
   $output = '';
@@ -42,20 +52,22 @@ function tripal_custom_table_admin_view() {
 }
 
 /**
+ * Renders the tripal_custom_tables_form.
  *
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_table_new_page() {
   $output = drupal_render(drupal_get_form('tripal_custom_tables_form'));
   return $output;
-
 }
+
 /**
  * A template function which returns markup to display details for the custom table
  *
  * @param $table_id
  *  The unique ID of the custom table
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_table_view($table_id) {
 
@@ -101,7 +113,7 @@ function tripal_custom_table_view($table_id) {
 /**
  * A template function to render a listing of all Custom tables
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_list() {
   $header = array('', 'Table Name', 'Description');
@@ -140,7 +152,7 @@ function tripal_custom_tables_list() {
 }
 
 /**
- * A Form to Create/Edit a Custom table
+ * A Form to Create/Edit a Custom table.
  *
  * @param $form_state
  *   The current state of the form (Form API)
@@ -150,7 +162,7 @@ function tripal_custom_tables_list() {
  * @return
  *   A form array (Form API)
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_form($form, &$form_state = NULL, $table_id = NULL) {
 
@@ -287,10 +299,10 @@ array (
 }
 
 /**
- * Validate the Create/Edit custom table form
- * Implements hook_form_validate().
+ * Implements hook_validate().
+ * Validate the Create/Edit custom table form.
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_form_validate($form, &$form_state) {
   $action = $form_state['values']['action'];
@@ -344,7 +356,7 @@ function tripal_custom_tables_form_validate($form, &$form_state) {
  * Submit the Create/Edit Custom table form
  * Implements hook_form_submit().
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_form_submit($form, &$form_state) {
 
@@ -376,6 +388,7 @@ function tripal_custom_tables_form_submit($form, &$form_state) {
 
   return '';
 }
+
 /**
  * Does the specified action for the specified custom table
  *
@@ -386,7 +399,7 @@ function tripal_custom_tables_form_submit($form, &$form_state) {
  * @param $redirect
  *   TRUE/FALSE depending on whether you want to redirect the user to admin/tripal/custom_tables
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_action($op, $table_id, $redirect = FALSE) {
   global $user;

+ 22 - 12
tripal_core/includes/form_elements.inc

@@ -1,12 +1,13 @@
 <?php
-
 /**
  * @file
- * Form elements used for tripal views
+ * Form elements used Various places in Tripal
  */
 
 /**
- * Register form elements
+ * Register form elements.
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_element_info() {
   $elements = array();
@@ -32,8 +33,9 @@ function tripal_core_element_info() {
 }
 
 /**
- * Upload File and keep track of previously uploaded files
- * Form element description
+ * Upload File and keep track of previously uploaded files.
+ *
+ * @ingroup tripal_core
  */
 function expand_file_upload_combo($element, $form_state, $complete_form) {
 
@@ -76,9 +78,10 @@ function expand_file_upload_combo($element, $form_state, $complete_form) {
   return $element;
 }
 
-
 /**
- * Theme the file upload combo form element
+ * Theme the file upload combo form element.
+ *
+ * @ingroup tripal_core
  */
 function theme_file_upload_combo($variables) {
   $element = $variables['element'];
@@ -93,9 +96,10 @@ function theme_file_upload_combo($variables) {
   return $output;
 }
 
-
 /**
- * Validate all content passed into the file upload combo form element
+ * Validate all content passed into the file upload combo form element.
+ *
+ * @ingroup tripal_core
  */
 function file_upload_combo_value_callback($element, $input = FALSE, &$form_state) {
   $values = array();
@@ -151,7 +155,9 @@ function file_upload_combo_value_callback($element, $input = FALSE, &$form_state
 }
 
 /**
- * Form element description
+ * Retrieve Sequence bases form element.
+ *
+ * @ingroup tripal_core
  */
 function expand_sequence_combo($element, $form_state, $complete_form) {
 
@@ -189,7 +195,9 @@ function expand_sequence_combo($element, $form_state, $complete_form) {
 
 /**
  * Validate all content passed into the sequence combo form element
- * D7 @todo: test/fix this callback
+ * D7 @todo: test/fix this callback.
+ *
+ * @ingroup tripal_core
  */
 function sequence_combo_value_callback($element, $input = FALSE, &$form_state) {
   $upstream = $form['values'][$element['#name']]['upstream'];
@@ -212,7 +220,9 @@ function sequence_combo_value_callback($element, $input = FALSE, &$form_state) {
 }
 
 /**
- * Theme the file sequence form element
+ * Theme the file sequence form element.
+ *
+ * @ingroup tripal_core
  */
 function theme_sequence_combo($variables) {
   $element = $variables['element'];

+ 19 - 7
tripal_core/includes/jobs.inc

@@ -1,13 +1,21 @@
 <?php
-
 /**
  * @file
  * Contains functions related to the display of Tripal jobs in a Tripal website.
- *
+ */
+
+/**
+ * @defgroup tripal_jobs Jobs
+ * @ingroup tripal_core
+ * @{
+ * Contains functions related to the display of Tripal jobs in a Tripal website.
+ * @}
  */
 
 /**
  * Provides a landing page for tripal jobs admin
+ *
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_admin_view() {
   $output = '';
@@ -40,7 +48,8 @@ function tripal_jobs_admin_view() {
 
 /**
  * NO LONGER USED: REPLACED BY VIEW
- * @ingroup tripal_core
+ *
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_report_form($form, &$form_state = NULL) {
   $form = array();
@@ -87,9 +96,11 @@ function tripal_jobs_report_form($form, &$form_state = NULL) {
   );
   return $form;
 }
+
 /**
+ * NO LONGER USED: REPLACED BY VIEW
  *
- * @ingroup tripal_core
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_report_form_submit($form, &$form_state = NULL) {
 
@@ -105,7 +116,7 @@ function tripal_jobs_report_form_submit($form, &$form_state = NULL) {
  * @return
  *   The HTML to be rendered which describes the job report
  *
- * @ingroup tripal_core
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_report() {
 
@@ -213,6 +224,7 @@ function tripal_jobs_report() {
   $output .= theme('pager');
   return $output;
 }
+
 /**
  * Returns the HTML code to display a given job
  *
@@ -222,6 +234,8 @@ function tripal_jobs_report() {
  * @return
  *   The HTML describing the indicated job
  * @ingroup tripal_core
+ *
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_view($job_id) {
   // get the job record
@@ -305,5 +319,3 @@ function tripal_jobs_view($job_id) {
   $output .= theme_table($table);
   return $output;
 }
-
-

+ 17 - 8
tripal_core/includes/mviews.inc

@@ -1,13 +1,23 @@
 <?php
-
 /**
  * @file
  * Contains functions for viewing and editing of Materialized Views
  * on a Tripal website.
  */
 
+/**
+ * @defgroup tripal_mviews Tripal Materialized Views
+ * @ingroup tripal_core
+ * @{
+ * Contains functions for viewing and editing of Materialized Views
+ * on a Tripal website.
+ * @}
+ */
+
 /**
  * Provides a landing page for tripal jobs admin
+ *
+ * @ingroup tripal_mviews
  */
 function tripal_mview_admin_view() {
   $output = '';
@@ -39,14 +49,13 @@ function tripal_mview_admin_view() {
   return $output;
 }
 
-
 /**
  * A template function which returns markup to display details for the current materialized view
  *
  * @param $mview_id
  *  The unique ID of the materialized view to render
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mview_report($mview_id) {
 
@@ -120,7 +129,7 @@ function tripal_mview_report($mview_id) {
 /**
  * A template function to render a listing of all Materialized Views
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_report() {
   $header = array('', 'MView Name', 'Last Update', 'Status', 'Description', '');
@@ -190,7 +199,7 @@ function tripal_mviews_report() {
  * @return
  *   A form array (Form API)
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_form($form, &$form_state = NULL, $mview_id = NULL) {
   if (!$mview_id) {
@@ -434,7 +443,7 @@ function tripal_mviews_form($form, &$form_state = NULL, $mview_id = NULL) {
  * Validate the Create/Edit Materialized View Form
  * Implements hook_form_validate().
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_form_validate($form, &$form_state) {
   $action = $form_state['values']['action'];
@@ -494,7 +503,7 @@ function tripal_mviews_form_validate($form, &$form_state) {
  * Submit the Create/Edit Materialized View Form
  * Implements hook_form_submit().
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_form_submit($form, &$form_state) {
 
@@ -536,4 +545,4 @@ function tripal_mviews_form_submit($form, &$form_state) {
   }
 
   return '';
-}
+}

+ 30 - 3
tripal_core/tripal_core.drush.inc

@@ -1,15 +1,23 @@
 <?php
-
 /**
  * @file
  * Contains function relating to drush-integration of this module.
  */
 
+/**
+ * @defgroup tripal_drush Tripal Drush Integration
+ * @{
+ * Contains function relating to drush-integration of various tripal modules.
+ * @}
+ */
+
 /**
  * Describes each drush command implemented by the module
  *
  * @return
  *   The first line of description when executing the help for a given command
+ *
+ * @ingroup tripal_drush
  */
 function tripal_core_drush_help($command) {
   switch ($command) {
@@ -39,6 +47,8 @@ function tripal_core_drush_help($command) {
  *
  * @return
  *   And array of command descriptions
+ *
+ * @ingroup tripal_drush
  */
 function tripal_core_drush_command() {
   $items = array();
@@ -169,8 +179,9 @@ function tripal_core_drush_command() {
 }
 
 /**
+ * Set the user to run a drush job.
  *
- * @param $username
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_set_user($username) {
   if ($username) {
@@ -195,6 +206,8 @@ function drush_tripal_core_set_user($username) {
  * Executes jobs in the Tripal Jobs Queue
  *
  * NOTE: The following code is executed when drush 'trpjob-run' or 'drush tripal-launch-jobs' is called
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_jobs_launch($username) {
   $parallel = drush_get_option('parallel');
@@ -220,6 +233,8 @@ function drush_tripal_core_tripal_jobs_launch($username) {
  * Executes jobs in the Tripal Jobs Queue
  *
  * NOTE: The following code is executed when drush 'trpjob-run' or 'drush tripal-launch-jobs' is called
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_jobs_rerun($username, $job_id) {
 
@@ -233,6 +248,8 @@ function drush_tripal_core_tripal_jobs_rerun($username, $job_id) {
  * Prints details about the current running job
  *
  * NOTE: The following code is executed when 'drush trpjob-curr' or 'drush tripal-current-job' is called
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_jobs_current() {
   $sql =  "
@@ -269,6 +286,8 @@ function drush_tripal_core_tripal_jobs_current() {
  *   The name of the table storing the materialized view (tripal_mview.mv_table)
  *
  * Note: Either $mview_id OR $table_name is required
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_update_mview() {
   $mview_id = drush_get_option('mview_id');
@@ -303,6 +322,8 @@ function drush_tripal_core_tripal_update_mview() {
 
 /**
  * Returns the current version of chado
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_chado_version() {
   $version = $GLOBALS["exact_chado_version"];
@@ -314,6 +335,8 @@ function drush_tripal_core_tripal_chado_version() {
  *
  * @param $table_name
  *  The name of the table to return the description of
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_chadotable_desc($table_name) {
   $section = drush_get_option('section');
@@ -334,6 +357,8 @@ function drush_tripal_core_tripal_chadotable_desc($table_name) {
  *
  * @param $module
  *  The name of a module with nodes associated with it. For example, feature
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_node_sync($module) {
   switch ($module) {
@@ -366,7 +391,9 @@ function drush_tripal_core_tripal_node_sync($module) {
  *
  * @param $module
  *  The name of a module with nodes associated with it. For example, feature
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_node_clean($module) {
   chado_cleanup_orphaned_nodes($module, 0);
-}
+}

+ 0 - 1
tripal_core/tripal_core.install

@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Contains functions used to install/uninstall tripal_core.

+ 16 - 15
tripal_core/tripal_core.module

@@ -45,36 +45,37 @@
 
 // APPLICATION PROGRAMMER INTERFACE -------------
 // Chado API
-require_once "api/tripal_core.chado_general.api.inc";
+require_once 'api/tripal_core.chado_general.api.inc';
 require_once 'api/tripal_core.chado_query.api.inc';
 require_once 'api/tripal_core.chado_variables.api.inc';
 require_once 'api/tripal_core.chado_schema.api.inc';
-require_once "api/tripal_core.chado_nodes.api.inc";
-require_once "api/tripal_core.chado_nodes.properties.api.inc";
-require_once "api/tripal_core.chado_nodes.dbxrefs.api.inc";
-require_once "api/tripal_core.chado_nodes.relationships.api.inc";
+require_once 'api/tripal_core.chado_nodes.api.inc';
+require_once 'api/tripal_core.chado_nodes.properties.api.inc';
+require_once 'api/tripal_core.chado_nodes.dbxrefs.api.inc';
+require_once 'api/tripal_core.chado_nodes.relationships.api.inc';
 
 // Table API
-require_once "api/tripal_core.custom_tables.api.inc";
-require_once "api/tripal_core.mviews.api.inc";
+require_once 'api/tripal_core.custom_tables.api.inc';
+require_once 'api/tripal_core.mviews.api.inc';
 
 // Miscellaneous API
-require_once "api/tripal_core.files.api.inc";
-require_once "api/tripal_core.jobs.api.inc";
+require_once 'api/tripal_core.files.api.inc';
+require_once 'api/tripal_core.jobs.api.inc';
 
 require_once 'api/tripal_core.DEPRECATED.inc';
 
 // INCLUDES -------------------------------------
-require_once "includes/jobs.inc";
-require_once "includes/mviews.inc";
-require_once "includes/custom_tables.inc";
-require_once "includes/chado_install.inc";
-require_once "includes/form_elements.inc";
+require_once 'includes/jobs.inc';
+require_once 'includes/mviews.inc';
+require_once 'includes/custom_tables.inc';
+require_once 'includes/chado_install.inc';
+require_once 'includes/form_elements.inc';
 
 tripal_core_set_globals();
 /**
  * This function is used to set the global Chado variables
- * @ingroup tripal_chado_api
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_set_globals() {
   // these global variables are meant to be accessed by all Tripal

+ 14 - 2
tripal_core/tripal_core.views.inc

@@ -1,8 +1,14 @@
 <?php
+/**
+ * @file
+ * Integrates many of the core database tables with drupal views
+ */
 
 /**
  * Describe various Tripal Core systems to Views
- *   for the creation of administrative views
+ *   for the creation of administrative views.
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data() {
   $data = array();
@@ -26,6 +32,8 @@ function tripal_core_views_data() {
  *   Previously generated tripal_core views data array
  * return
  *   $data array with job management system described
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data_jobs($data) {
 
@@ -287,6 +295,8 @@ function tripal_core_views_data_jobs($data) {
  *   Previously generated tripal_core views data array
  * return
  *   $data array with custom tables management described
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data_custom_tables($data) {
 
@@ -362,6 +372,8 @@ function tripal_core_views_data_custom_tables($data) {
  *   Previously generated tripal_core views data array
  * return
  *   $data array with custom tables management described
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data_mviews($data) {
 
@@ -604,4 +616,4 @@ function tripal_core_views_data_mviews($data) {
   );
 
   return $data;
-}
+}

+ 22 - 1
tripal_core/tripal_core.views_default.inc

@@ -1,7 +1,13 @@
 <?php
+/**
+ * @file
+ * Describes core default views
+ */
 
 /**
+ * Describes core default views
  *
+ * @ingroup tripal_core
  */
 function tripal_core_views_default_views() {
   $views = array();
@@ -18,6 +24,11 @@ function tripal_core_views_default_views() {
   return $views;
 }
 
+/**
+ * Describes the jobs administration view.
+ *
+ * @ingroup tripal_core
+ */
 function tripal_core_admin_defaultview_jobs() {
 
   $view = new view();
@@ -290,6 +301,11 @@ function tripal_core_admin_defaultview_jobs() {
   return $view;
 }
 
+/**
+ * Describes the custom tables administration view.
+ *
+ * @ingroup tripal_core
+ */
 function tripal_core_admin_defaultview_custom_tables() {
 
   $view = new view();
@@ -407,6 +423,11 @@ function tripal_core_admin_defaultview_custom_tables() {
   return $view;
 }
 
+/**
+ * Describes the materialized views administration view.
+ *
+ * @ingroup tripal_core
+ */
 function tripal_core_admin_defaultview_mviews() {
 
   $view = new view();
@@ -667,4 +688,4 @@ function tripal_core_admin_defaultview_mviews() {
   $handler->display->display_options['tab_options']['weight'] = '0';
 
   return $view;
-}
+}