Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
{source}
<?php
// Weight
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(‘terrapin_weight’);
$query->from($db->quoteName(‘ae_terrapin_data’));
$db->setQuery($query);
$all_weights = $db->loadColumn();
$array_count = count($all_weights);
$total_weight = 0;
for ($i=0; $i<=$array_count; $i++) {
$total_weight = $all_weights[$i] + $total_weight;
}
$group_average_weight = $total_weight / $array_count;
// Carapace Length
$query = $db->getQuery(true);
$query->select(‘carapace_length’);
$query->from($db->quoteName(‘ae_terrapin_data’));
$db->setQuery($query);
$all_carapace_lengths = $db->loadColumn();
$group_average_carapace_length = array_sum($all_carapace_lengths) / count($all_carapace_lengths);
// Carapace Width
$query = $db->getQuery(true);
$query->select(‘carapace_width’);
$query->from($db->quoteName(‘ae_terrapin_data’));
$db->setQuery($query);
$all_carapace_widths = $db->loadColumn();
$group_average_carapace_width = array_sum($all_carapace_widths) / count($all_carapace_widths);
// Plastron Length
$query = $db->getQuery(true);
$query->select(‘plastron_length’);
$query->from($db->quoteName(‘ae_terrapin_data’));
$db->setQuery($query);
$all_plastron_lengths = $db->loadColumn();
$group_average_plastron_length = array_sum($all_plastron_lengths) / count($all_plastron_lengths);
// Shell Height
$query = $db->getQuery(true);
$query->select(‘shell_height’);
$query->from($db->quoteName(‘ae_terrapin_data’));
$db->setQuery($query);
$all_shell_heights = $db->loadColumn();
$group_average_shell_height = array_sum($all_shell_heights) / count($all_shell_heights);
?>
{/source}
Total Number of Records | {source}<?php echo $array_count; ?>{/source} measurments |
Average Weight | {source}<?php echo round($group_average_weight,2); ?>{/source} grams |
Maximum Weight | {source}<?php echo round(max($all_weights),2); ?>{/source} grams |
Minimum Weight | {source}<?php echo round(min($all_weights),2); ?>{/source} grams |
Average Carpace Length | {source}<?php echo round($group_average_carapace_length,2); ?>{/source} cm |
Maximum Carapace Length | {source}<?php echo round(max($all_carapace_lengths),2); ?>{/source} cm |
Minimum Carapace Length | {source}<?php echo round(min($all_carapace_lengths),2); ?>{/source} cm |
Average Carapace Width | {source}<?php echo round($group_average_carapace_width,2); ?>{/source} cm |
Maximum Carapace Width | {source}<?php echo round(max($all_carapace_widths),2); ?>{/source} cm |
Minimum Carapace Width | {source}<?php echo round(min($all_carapace_widths),2); ?>{/source} cm |
Average Plastron Length | {source}<?php echo round($group_average_plastron_length,2); ?>{/source} cm |
Maximum Plastron Length | {source}<?php echo round(max($all_plastron_lengths),2); ?>{/source} cm |
Minimum Plastron Length | {source}<?php echo round(min($all_plastron_lengths),2); ?>{/source} cm |
Average Shell Height | {source}<?php echo round($group_average_shell_height,2); ?>{/source} cm |
Maximum Shell Height | {source}<?php echo round(max($all_shell_heights),2); ?>{/source} cm |
Minimum Shell Height | {source}<?php echo round(min($all_shell_heights),2); ?>{/source} cm |
T.E.R.P. (Terrapin Education and Research Partnership) is an authentic data-driven research project conducted in partnership with Dr. Willem Roosenburg of Ohio University and the Maryland Department of Natural Resources. Participating classrooms are required to collect weekly growth data on their classroom terrapins and submit their last weekly measurement as their “monthly” measurements. Growth data is extremely important, not only as an important scientific process for your students, but also helps us analyze growth trends and identify potential health issues. We are also required to submit growth data as a condition of our Maryland Department of Natural Resources Scientific Collection Permit.
T.E.R.P. Teachers can submit and access their data through the TERP Brightspace page.
{tab=1. Enter New Terrapin}
{module Enter New Terrapin}
{module Your Terrapins}
{tab=2. Enter Terrapin Data}
{module Enter Terrapin Data}
{tab=2. View Recorded Data}
{module Terrapin Data Entries}
{/tabs}