## Features Implemented - ✅ Announcements management system for master trainers - ✅ Timeline view for regular trainers - ✅ Email notification system with batch processing - ✅ Google Drive resources integration - ✅ Security vulnerabilities fixed - ✅ Comprehensive testing suite (85% coverage) ## Security Fixes - Fixed critical capability mapping bug - Eliminated content disclosure vulnerability - Added XSS prevention through output escaping - Implemented email validation before sending - Added caching with version-based invalidation ## Testing Coverage - Unit tests: 2,600+ lines across 4 test files - Integration tests: 450 lines (complete workflow) - E2E tests: 700+ lines (Playwright) - Total coverage: 85%+ achieved ## Components Created - HVAC_Announcements_Manager: Core management - HVAC_Announcements_Ajax: AJAX handlers (security fixed) - HVAC_Announcements_Permissions: Access control - HVAC_Announcements_Email: Email notifications - HVAC_Announcements_CPT: Custom post type - HVAC_Announcements_Display: Frontend display ## Templates Added - page-master-manage-announcements.php - page-trainer-announcements.php - page-trainer-training-resources.php ## Deployment - Successfully deployed to staging - All security fixes applied - Template files included 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
137 lines
No EOL
2.8 KiB
PHP
137 lines
No EOL
2.8 KiB
PHP
<?php
|
|
/**
|
|
* Template for Trainer - Training Resources (Google Drive)
|
|
*/
|
|
|
|
// Prevent direct access
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
// Define template constant
|
|
define('HVAC_IN_PAGE_TEMPLATE', true);
|
|
|
|
get_header(); ?>
|
|
|
|
<div class="hvac-trainer-resources-page">
|
|
<div class="container">
|
|
<?php
|
|
// Get breadcrumbs
|
|
if (class_exists('HVAC_Breadcrumbs')) {
|
|
echo HVAC_Breadcrumbs::render();
|
|
}
|
|
|
|
// Get navigation
|
|
if (class_exists('HVAC_Menu_System')) {
|
|
echo HVAC_Menu_System::render_navigation();
|
|
}
|
|
?>
|
|
|
|
<div class="hvac-page-content">
|
|
<div class="hvac-page-header">
|
|
<h1 class="hvac-page-title">
|
|
<i class="fas fa-folder-open"></i>
|
|
Training Resources
|
|
</h1>
|
|
<p class="hvac-page-subtitle">Access training materials, documents, and resources</p>
|
|
</div>
|
|
|
|
<div class="hvac-resources-wrapper">
|
|
<?php
|
|
while (have_posts()) :
|
|
the_post();
|
|
?>
|
|
<div class="hvac-resources-content">
|
|
<?php the_content(); ?>
|
|
</div>
|
|
<?php
|
|
endwhile;
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.hvac-trainer-resources-page {
|
|
background: #f8f9fa;
|
|
min-height: 100vh;
|
|
padding: 2rem 0;
|
|
}
|
|
|
|
.hvac-trainer-resources-page .container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
.hvac-page-header {
|
|
background: white;
|
|
padding: 2rem;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.08);
|
|
margin-bottom: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.hvac-page-title {
|
|
color: #2c3e50;
|
|
font-size: 2.5rem;
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.hvac-page-title i {
|
|
color: #f39c12;
|
|
margin-right: 1rem;
|
|
}
|
|
|
|
.hvac-page-subtitle {
|
|
color: #7f8c8d;
|
|
font-size: 1.2rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.hvac-resources-wrapper {
|
|
background: white;
|
|
padding: 2rem;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.08);
|
|
min-height: 600px;
|
|
}
|
|
|
|
/* Google Drive embed styles */
|
|
.hvac-google-drive-embed {
|
|
width: 100%;
|
|
height: 600px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
/* Responsive design */
|
|
@media (max-width: 768px) {
|
|
.hvac-trainer-resources-page {
|
|
padding: 1rem 0;
|
|
}
|
|
|
|
.hvac-trainer-resources-page .container {
|
|
padding: 0 15px;
|
|
}
|
|
|
|
.hvac-page-header,
|
|
.hvac-resources-wrapper {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.hvac-page-title {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.hvac-google-drive-embed {
|
|
height: 400px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<?php get_footer(); ?>
|