import streamlit as st import json import time import random from datetime import datetime, timedelta # Set page config st.set_page_config( page_title="Training Content Health Check", page_icon="🔍", layout="wide", initial_sidebar_state="collapsed" ) # Custom CSS st.markdown(""" """, unsafe_allow_html=True) # Title and description st.markdown("""

Training Content Health Check 🔍

Assess whether your training content is still effective and relevant. Get personalized recommendations to keep your content fresh and engaging!

""", unsafe_allow_html=True) # Initialize session state if "assessment_complete" not in st.session_state: st.session_state["assessment_complete"] = False if "current_question" not in st.session_state: st.session_state["current_question"] = 0 if "answers" not in st.session_state: st.session_state["answers"] = {} if "assessment_results" not in st.session_state: st.session_state["assessment_results"] = None # Assessment questions ASSESSMENT_QUESTIONS = [ { "id": "content_age", "question": "When was your training content last updated?", "type": "single_choice", "options": [ ("Within the last 6 months", 5), ("6 months to 1 year ago", 4), ("1-2 years ago", 3), ("2-3 years ago", 2), ("More than 3 years ago", 1) ], "help": "Newer content is generally more relevant and effective" }, { "id": "industry_changes", "question": "Have there been significant changes in your industry since the content was created?", "type": "single_choice", "options": [ ("No significant changes", 5), ("Minor changes that don't affect the content", 4), ("Some changes that might impact relevance", 3), ("Significant changes that likely impact content", 2), ("Major industry transformation", 1) ], "help": "Industry evolution can quickly make training content obsolete" }, { "id": "technology_updates", "question": "If your training involves technology or software, how current are the versions covered?", "type": "single_choice", "options": [ ("Current/latest versions", 5), ("One version behind", 4), ("2-3 versions behind", 3), ("Significantly outdated versions", 2), ("Legacy/deprecated technology", 1), ("Not applicable - no technology involved", 5) ], "help": "Technology training needs frequent updates to remain useful" }, { "id": "learner_feedback", "question": "What kind of feedback do you receive from learners about the content?", "type": "single_choice", "options": [ ("Consistently positive and engaged", 5), ("Mostly positive with minor suggestions", 4), ("Mixed feedback - some find it helpful", 3), ("Frequent complaints about relevance", 2), ("Learners find it outdated or unhelpful", 1) ], "help": "Learner feedback is a key indicator of content effectiveness" }, { "id": "completion_rates", "question": "How are your training completion rates?", "type": "single_choice", "options": [ ("80%+ completion rate", 5), ("60-79% completion rate", 4), ("40-59% completion rate", 3), ("20-39% completion rate", 2), ("Below 20% completion rate", 1), ("Don't track completion rates", 2) ], "help": "Low completion rates often indicate content problems" }, { "id": "performance_impact", "question": "Can you measure improved job performance after training?", "type": "single_choice", "options": [ ("Clear performance improvements measured", 5), ("Some improvements observed", 4), ("Minimal or unclear impact", 3), ("No measurable improvement", 2), ("Performance may have declined", 1) ], "help": "Effective training should lead to measurable performance gains" }, { "id": "content_format", "question": "How well does your content format match current learner preferences?", "type": "single_choice", "options": [ ("Perfect match - modern, engaging format", 5), ("Good match with minor format updates needed", 4), ("Adequate but could be more engaging", 3), ("Format feels somewhat outdated", 2), ("Very outdated format (old videos, static PDFs)", 1) ], "help": "Learning preferences evolve - mobile, interactive, bite-sized content is preferred" }, { "id": "compliance_requirements", "question": "Are there new compliance or regulatory requirements affecting your training?", "type": "single_choice", "options": [ ("No new requirements", 5), ("Minor updates needed for compliance", 4), ("Some new requirements to incorporate", 3), ("Significant compliance changes needed", 2), ("Major regulatory overhaul required", 1), ("Not applicable - no compliance requirements", 5) ], "help": "Regulatory changes can make training content non-compliant" }, { "id": "accessibility", "question": "Does your content meet current accessibility standards?", "type": "single_choice", "options": [ ("Fully accessible and compliant", 5), ("Mostly accessible with minor gaps", 4), ("Some accessibility features missing", 3), ("Limited accessibility support", 2), ("Not designed with accessibility in mind", 1) ], "help": "Accessibility standards have evolved significantly in recent years" }, { "id": "competitive_benchmark", "question": "How does your training content compare to industry standards or competitors?", "type": "single_choice", "options": [ ("Industry-leading quality and innovation", 5), ("Above average compared to competitors", 4), ("On par with industry standards", 3), ("Below average - competitors have better content", 2), ("Significantly behind industry standards", 1) ], "help": "Staying competitive requires keeping up with industry training standards" } ] def calculate_assessment_score(answers): """Calculate the overall assessment score and determine status""" total_score = sum(answers.values()) max_possible = len(answers) * 5 percentage = (total_score / max_possible) * 100 # Determine status based on percentage if percentage >= 85: status = "Still Sharp" status_class = "status-excellent" status_emoji = "🌟" status_color = "#28a745" elif percentage >= 70: status = "Minor Tune-Up" status_class = "status-good" status_emoji = "✅" status_color = "#ffc107" elif percentage >= 50: status = "Needs Refresh" status_class = "status-needs-attention" status_emoji = "⚠️" status_color = "#fd7e14" else: status = "Critical Update" status_class = "status-critical" status_emoji = "🚨" status_color = "#dc3545" return { "score": total_score, "percentage": percentage, "status": status, "status_class": status_class, "status_emoji": status_emoji, "status_color": status_color, "max_possible": max_possible } def generate_recommendations(answers, results): """Generate personalized recommendations based on assessment results""" recommendations = [] # Analyze specific areas that need attention problem_areas = [] # Check content age if answers.get("content_age", 5) <= 2: problem_areas.append("content_age") recommendations.append({ "title": "Update Content Immediately", "description": "Your content is significantly outdated. Plan a comprehensive content refresh within the next 2-3 months.", "priority": "high", "action_items": [ "Audit all training materials for accuracy", "Research current industry best practices", "Create a content update timeline", "Consider outsourcing content development if needed" ] }) # Check technology relevance if answers.get("technology_updates", 5) <= 2: problem_areas.append("technology") recommendations.append({ "title": "Technology Update Required", "description": "Your technology training is using outdated versions that may confuse learners.", "priority": "high", "action_items": [ "Update all software versions in training", "Create version-specific training modules", "Establish regular technology review schedule" ] }) # Check learner engagement if answers.get("learner_feedback", 5) <= 3 or answers.get("completion_rates", 5) <= 3: problem_areas.append("engagement") recommendations.append({ "title": "Improve Learner Engagement", "description": "Low engagement suggests content format or relevance issues.", "priority": "medium", "action_items": [ "Survey learners for specific feedback", "Consider interactive content formats", "Break content into smaller, digestible modules", "Add gamification elements" ] }) # Check format modernization if answers.get("content_format", 5) <= 3: problem_areas.append("format") recommendations.append({ "title": "Modernize Content Format", "description": "Update your content format to match current learner preferences.", "priority": "medium", "action_items": [ "Convert static content to interactive formats", "Optimize for mobile devices", "Add video and multimedia elements", "Create bite-sized learning modules" ] }) # Check compliance if answers.get("compliance_requirements", 5) <= 3: problem_areas.append("compliance") recommendations.append({ "title": "Address Compliance Gaps", "description": "New regulatory requirements need to be incorporated into your training.", "priority": "high", "action_items": [ "Review current compliance requirements", "Update content to meet new standards", "Document compliance coverage", "Schedule regular compliance reviews" ] }) # Check accessibility if answers.get("accessibility", 5) <= 3: problem_areas.append("accessibility") recommendations.append({ "title": "Enhance Accessibility", "description": "Improve accessibility to ensure all learners can effectively use your content.", "priority": "medium", "action_items": [ "Conduct accessibility audit", "Add captions to videos", "Ensure screen reader compatibility", "Provide alternative formats" ] }) # Performance tracking if answers.get("performance_impact", 5) <= 3: recommendations.append({ "title": "Implement Performance Tracking", "description": "Establish metrics to measure training effectiveness and ROI.", "priority": "low", "action_items": [ "Define success metrics", "Implement tracking systems", "Conduct pre/post assessments", "Regular performance reviews" ] }) # If no major issues, provide maintenance recommendations if results["percentage"] >= 70: recommendations.append({ "title": "Maintain Content Excellence", "description": "Your content is in good shape! Focus on continuous improvement.", "priority": "low", "action_items": [ "Schedule quarterly content reviews", "Stay updated with industry trends", "Gather regular learner feedback", "Plan incremental improvements" ] }) return recommendations, problem_areas # Main content if not st.session_state["assessment_complete"]: # Assessment questionnaire col1, col2 = st.columns([2, 1]) with col1: # Progress bar progress = (st.session_state["current_question"]) / len(ASSESSMENT_QUESTIONS) st.markdown(f"""

Question {st.session_state["current_question"] + 1} of {len(ASSESSMENT_QUESTIONS)}

""", unsafe_allow_html=True) # Current question if st.session_state["current_question"] < len(ASSESSMENT_QUESTIONS): current_q = ASSESSMENT_QUESTIONS[st.session_state["current_question"]] st.markdown(f'
', unsafe_allow_html=True) st.markdown(f"""
{st.session_state["current_question"] + 1}

{current_q["question"]}

""", unsafe_allow_html=True) # Question options if current_q["type"] == "single_choice": answer = st.radio( "Select your answer:", options=[option[0] for option in current_q["options"]], key=f"question_{current_q['id']}", help=current_q.get("help", "") ) # Find the score for the selected answer selected_score = None for option_text, score in current_q["options"]: if option_text == answer: selected_score = score break if selected_score is not None: st.session_state["answers"][current_q["id"]] = selected_score st.markdown('
', unsafe_allow_html=True) # Navigation buttons col_prev, col_next = st.columns([1, 1]) with col_prev: if st.session_state["current_question"] > 0: if st.button("⬅️ Previous", use_container_width=True): st.session_state["current_question"] -= 1 st.rerun() with col_next: if st.session_state["current_question"] < len(ASSESSMENT_QUESTIONS) - 1: if st.button("Next ➡️", use_container_width=True): st.session_state["current_question"] += 1 st.rerun() else: if st.button("📊 Get My Results", use_container_width=True): st.session_state["assessment_complete"] = True st.session_state["assessment_results"] = calculate_assessment_score(st.session_state["answers"]) st.rerun() with col2: st.markdown('
Assessment Overview
', unsafe_allow_html=True) # Show progress stats answered = len(st.session_state["answers"]) st.markdown(f"""
{answered}
Answered
{len(ASSESSMENT_QUESTIONS) - answered}
Remaining
""", unsafe_allow_html=True) # Assessment categories st.markdown("**Assessment Categories:**") categories = [ "📅 Content Age & Relevance", "🏭 Industry & Technology Changes", "👥 Learner Engagement & Feedback", "📈 Performance & Compliance", "♿ Accessibility & Format" ] for category in categories: st.markdown(f"• {category}") # Tips with st.expander("💡 Assessment Tips"): st.markdown(""" **For Best Results:** - Answer honestly based on your current situation - Consider gathering learner feedback before assessment - Think about recent industry or regulatory changes - Review your training analytics if available - Consider both technical and content aspects """) else: # Results display results = st.session_state["assessment_results"] recommendations, problem_areas = generate_recommendations(st.session_state["answers"], results) # Status card st.markdown(f"""
{results['status_emoji']} {results['percentage']:.0f}%
{results['status']}
You scored {results['score']} out of {results['max_possible']} points
""", unsafe_allow_html=True) # Status-specific messages status_messages = { "Still Sharp": "Excellent! Your training content is current and effective. Focus on maintenance and continuous improvement.", "Minor Tune-Up": "Good foundation! Your content is mostly current but could benefit from some updates to stay competitive.", "Needs Refresh": "Time for updates! Your content has some outdated elements that are impacting effectiveness.", "Critical Update": "Immediate action needed! Your content requires significant updates to remain valuable and relevant." } st.success(status_messages[results['status']]) # Detailed recommendations col1, col2 = st.columns([1, 1]) with col1: st.markdown('
📋 Your Action Plan
', unsafe_allow_html=True) # Priority recommendations first high_priority = [r for r in recommendations if r["priority"] == "high"] medium_priority = [r for r in recommendations if r["priority"] == "medium"] low_priority = [r for r in recommendations if r["priority"] == "low"] for priority_group, title in [(high_priority, "🚨 High Priority"), (medium_priority, "⚠️ Medium Priority"), (low_priority, "💡 Low Priority")]: if priority_group: st.markdown(f"**{title}**") for rec in priority_group: st.markdown(f'
', unsafe_allow_html=True) st.markdown(f'
{rec["title"]}
', unsafe_allow_html=True) st.markdown(f'

{rec["description"]}

', unsafe_allow_html=True) if rec["action_items"]: st.markdown("**Action Items:**") for item in rec["action_items"]: st.markdown(f"• {item}") st.markdown('
', unsafe_allow_html=True) with col2: st.markdown('
📊 Detailed Breakdown
', unsafe_allow_html=True) # Score breakdown by category category_scores = {} for q in ASSESSMENT_QUESTIONS: score = st.session_state["answers"].get(q["id"], 0) category_scores[q["question"]] = (score, 5) # Show problem areas if problem_areas: st.markdown("**Areas Needing Attention:**") area_labels = { "content_age": "📅 Content Age", "technology": "💻 Technology Currency", "engagement": "👥 Learner Engagement", "format": "🎨 Content Format", "compliance": "📋 Compliance", "accessibility": "♿ Accessibility" } for area in problem_areas: if area in area_labels: st.markdown(f"• {area_labels[area]}") # Timeline estimate st.markdown("**Estimated Timeline:**") if results['percentage'] >= 85: timeline = "1-2 months for maintenance" elif results['percentage'] >= 70: timeline = "2-4 months for updates" elif results['percentage'] >= 50: timeline = "3-6 months for refresh" else: timeline = "6+ months for overhaul" st.info(f"⏱️ {timeline}") # Export options st.markdown("**Export Results:**") # Generate report data report_data = { "assessment_date": datetime.now().strftime("%Y-%m-%d %H:%M:%S"), "overall_score": results, "answers": st.session_state["answers"], "recommendations": recommendations, "problem_areas": problem_areas } report_json = json.dumps(report_data, indent=2) st.download_button( label="📊 Download Full Report", data=report_json, file_name=f"training_assessment_{int(time.time())}.json", mime="application/json", use_container_width=True ) # Action buttons st.markdown("---") col_b1, col_b2, col_b3 = st.columns([1, 1, 1]) with col_b1: if st.button("🔄 Take Assessment Again", use_container_width=True): # Reset session state st.session_state["assessment_complete"] = False st.session_state["current_question"] = 0 st.session_state["answers"] = {} st.session_state["assessment_results"] = None st.rerun() with col_b2: if st.button("📝 View Question Summary", use_container_width=True): with st.expander("Question & Answer Summary", expanded=True): for i, q in enumerate(ASSESSMENT_QUESTIONS): answer_score = st.session_state["answers"].get(q["id"], 0) # Find the answer text answer_text = "Not answered" for option_text, score in q["options"]: if score == answer_score: answer_text = option_text break st.markdown(f"**Q{i+1}: {q['question']}**") st.markdown(f"*Answer: {answer_text}* (Score: {answer_score}/5)") st.markdown("---") with col_b3: # Placeholder for future feature st.button("💬 Get Expert Consultation", disabled=True, use_container_width=True, help="Coming soon - connect with training experts") # Footer st.markdown("""

Disclaimer: This assessment provides general guidance based on common training best practices. Results may vary based on your specific context, industry, and organizational needs. Consider consulting with training professionals for detailed content strategy.

Pro Tip: Save your results and retake this assessment quarterly to track your training content health over time!

""", unsafe_allow_html=True)