tincanny_reporting_tin_can_before_end
Fires before the Tin Can reporting output ends, allowing for custom actions or modifications.
add_action( 'tincanny_reporting_tin_can_before_end', $callback, 10, 1 );
Description
Fires before the Tin Can reporting section concludes within the WordPress admin area. Developers can use this action hook to add custom content, modify existing elements, or perform actions related to Tin Can reporting just before its output is finalized.
Usage
add_action( 'tincanny_reporting_tin_can_before_end', 'your_function_name', 10, 1 );
Examples
/**
* Example function to add custom content before the Tin Can reporting section ends.
* This could be used to add a summary, a quick link, or a specific warning.
*
* @param array $report_data An array potentially containing report data (though not used in this specific example).
*/
add_action( 'tincanny_reporting_tin_can_before_end', function( $report_data = [] ) {
// This is a placeholder action. In a real scenario, you might:
// 1. Fetch some specific data related to Tin Can reporting.
// 2. Display a small summary of recent activity or a quick link to a detailed report.
// 3. Add a disclaimer or important note for the admin.
// For demonstration, let's just add a small note.
echo '<div class="uo-reporting-note">';
echo '<strong>Note:</strong> Ensure all Tin Can statements are correctly configured for accurate reporting.';
echo '</div>';
// If the hook was a filter, you would need to return a value:
// return $modified_data;
}, 10, 1 ); // Priority 10, accepts 1 argument.
Placement
This code should be placed in the functions.php file of your active theme, a custom plugin, or using a code snippets plugin.
Source Code
src/shortcode-tincanny/shortcode-tincanny.php:828
src/shortcode-tincanny/shortcode-tincanny.php:893
src/shortcode-tincanny/shortcode-tincanny.php:919
public static function admin_reporting_content() {
?>
<div class="uo-admin-reporting-tab-single" id="tin-can"
style="display: <?php echo self::$is_tincan_report ? 'block' : 'none'; ?>">
<?php
// Add Tin Can tab content.
if ( self::$is_tincan_report ) {
do_action( 'tincanny_reporting_tin_can_after_begin' );
include dirname( UO_REPORTING_FILE ) . '/src/reporting/tin-can/templates/tc-tincan-filter.php';
do_action( 'tincanny_reporting_tin_can_before_end' );
}
?>
</div>
<div class="uo-admin-reporting-tab-single" id="xapi-tincan"
style="display: <?php echo self::$is_xapi_report ? 'block' : 'none'; ?>">
<?php
// Add xAPI tab content.
if ( self::$is_xapi_report ) {
do_action( 'tincanny_reporting_xtin_quiz_after_begin' );
self::show_tincan_list_table( 'xapi-tincan' );
do_action( 'tincanny_reporting_xtin_quiz_before_end' );
}
?>
</div>
<?php
}