Spaces:
Running
Running
Download assessment.html from RISEFinalYear/RISE: direct link, hf CLI and curl.
- Browser
- Download file 9.86 kB
-
https://huggingface.co/spaces/RISEFinalYear/RISE/resolve/main/assessment.html
- Command line
-
hf download hf://spaces/RISEFinalYear/RISE/assessment.html
-
curl -L -o assessment.html https://huggingface.co/spaces/RISEFinalYear/RISE/resolve/main/assessment.html
9.86 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| ``` | |
| <title>Initial Assessment - RISE</title> | |
| <link rel="stylesheet" href="style.css"> | |
| ``` | |
| </head> | |
| <body> | |
| ``` | |
| <div class="signup-container"> | |
| <div class="signup-box"> | |
| <div class="logo"> | |
| RISE | |
| </div> | |
| <h1>Let's get to know you</h1> | |
| <p class="signup-subtitle"> | |
| Complete this short assessment so RISE can personalize | |
| your communication journey. | |
| </p> | |
| <form onsubmit="calculateAssessment(event)"> | |
| <!-- Question 1 --> | |
| <label> | |
| 1. How comfortable are you speaking with someone you don't know? | |
| </label> | |
| <select name="q1" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">I find it very difficult</option> | |
| <option value="2">I feel somewhat comfortable</option> | |
| <option value="3">I am comfortable</option> | |
| <option value="4">I am very comfortable</option> | |
| </select> | |
| <!-- Question 2 --> | |
| <label> | |
| 2. How well can you introduce yourself? | |
| </label> | |
| <select name="q2" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">I struggle to introduce myself</option> | |
| <option value="2">I can say a few basic things</option> | |
| <option value="3">I can introduce myself clearly</option> | |
| <option value="4">I can introduce myself confidently</option> | |
| </select> | |
| <!-- Question 3 --> | |
| <label> | |
| 3. How comfortable are you speaking in complete sentences? | |
| </label> | |
| <select name="q3" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">Very difficult</option> | |
| <option value="2">Somewhat difficult</option> | |
| <option value="3">Usually comfortable</option> | |
| <option value="4">Very comfortable</option> | |
| </select> | |
| <!-- Question 4 --> | |
| <label> | |
| 4. How well can you express your thoughts during a conversation? | |
| </label> | |
| <select name="q4" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">I struggle to express them</option> | |
| <option value="2">I can express simple thoughts</option> | |
| <option value="3">I can explain my thoughts clearly</option> | |
| <option value="4">I can explain detailed thoughts naturally</option> | |
| </select> | |
| <!-- Question 5 --> | |
| <label> | |
| 5. Someone asks, "How was your day?" What would you most likely do? | |
| </label> | |
| <select name="q5" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">Give a very short answer or avoid answering</option> | |
| <option value="2">Give a simple answer</option> | |
| <option value="3">Give an answer with some details</option> | |
| <option value="4">Give a detailed answer and continue the conversation</option> | |
| </select> | |
| <!-- Question 6 --> | |
| <label> | |
| 6. If you don't understand what someone said, what would you do? | |
| </label> | |
| <select name="q6" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">Stay silent</option> | |
| <option value="2">Try to guess what they meant</option> | |
| <option value="3">Ask them to repeat</option> | |
| <option value="4">Politely ask them to explain or rephrase</option> | |
| </select> | |
| <!-- Question 7 --> | |
| <label> | |
| 7. How comfortable are you continuing a conversation after the other person answers you? | |
| </label> | |
| <select name="q7" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">I usually don't know what to say</option> | |
| <option value="2">I can continue with difficulty</option> | |
| <option value="3">I can usually continue</option> | |
| <option value="4">I can naturally keep the conversation going</option> | |
| </select> | |
| <!-- Question 8 --> | |
| <label> | |
| 8. How well can you understand someone's emotion from their facial expression or tone? | |
| </label> | |
| <select name="q8" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">I find it very difficult</option> | |
| <option value="2">I sometimes understand</option> | |
| <option value="3">I usually understand</option> | |
| <option value="4">I understand emotions quite well</option> | |
| </select> | |
| <!-- Question 9 --> | |
| <label> | |
| 9. How comfortable are you reading a short paragraph aloud? | |
| </label> | |
| <select name="q9" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">Very uncomfortable</option> | |
| <option value="2">Somewhat uncomfortable</option> | |
| <option value="3">Comfortable</option> | |
| <option value="4">Very comfortable</option> | |
| </select> | |
| <!-- Question 10 --> | |
| <label> | |
| 10. How confident are you about improving your communication skills? | |
| </label> | |
| <select name="q10" required> | |
| <option value="">Select an answer</option> | |
| <option value="1">I am not confident yet</option> | |
| <option value="2">I am slightly confident</option> | |
| <option value="3">I am confident</option> | |
| <option value="4">I am very confident and ready to practice</option> | |
| </select> | |
| <button type="submit" class="primary-btn"> | |
| Complete Assessment | |
| </button> | |
| </form> | |
| </div> | |
| </div> | |
| <script> | |
| function calculateAssessment(event) { | |
| event.preventDefault(); | |
| const form = event.target; | |
| // Get all answers | |
| const scores = []; | |
| for (let i = 1; i <= 10; i++) { | |
| scores.push( | |
| Number(form.querySelector(`[name="q${i}"]`).value) | |
| ); | |
| } | |
| // Calculate total score | |
| const totalScore = | |
| scores.reduce((total, score) => total + score, 0); | |
| // Determine starting level | |
| let level; | |
| if (totalScore <= 15) { | |
| level = 1; | |
| } | |
| else if (totalScore <= 23) { | |
| level = 2; | |
| } | |
| else if (totalScore <= 29) { | |
| level = 3; | |
| } | |
| else if (totalScore <= 35) { | |
| level = 4; | |
| } | |
| else { | |
| level = 5; | |
| } | |
| // Calculate communication area scores | |
| // Speaking: Q1-Q4 | |
| const speakingScore = | |
| scores[0] + | |
| scores[1] + | |
| scores[2] + | |
| scores[3]; | |
| // Conversation: Q5-Q7 | |
| const conversationScore = | |
| scores[4] + | |
| scores[5] + | |
| scores[6]; | |
| // Emotion Awareness: Q8 | |
| const emotionScore = | |
| scores[7]; | |
| // Reading & Fluency: Q9 | |
| const readingScore = | |
| scores[8]; | |
| // Confidence: Q10 | |
| const confidenceScore = | |
| scores[9]; | |
| // Save assessment information | |
| localStorage.setItem( | |
| "assessmentScore", | |
| totalScore | |
| ); | |
| localStorage.setItem( | |
| "startingLevel", | |
| level | |
| ); | |
| localStorage.setItem( | |
| "speakingScore", | |
| speakingScore | |
| ); | |
| localStorage.setItem( | |
| "conversationScore", | |
| conversationScore | |
| ); | |
| localStorage.setItem( | |
| "emotionScore", | |
| emotionScore | |
| ); | |
| localStorage.setItem( | |
| "readingScore", | |
| readingScore | |
| ); | |
| localStorage.setItem( | |
| "confidenceScore", | |
| confidenceScore | |
| ); | |
| // Persist this assessment in the signed-in browser profile. | |
| const activeEmail = (localStorage.getItem("riseActiveUserEmail") || "").trim().toLowerCase(); | |
| if (activeEmail) { | |
| const profileKey = "riseUser:" + activeEmail; | |
| const profile = JSON.parse(localStorage.getItem(profileKey) || "{}"); | |
| const assessedLevel = Math.min(5, Math.max(1, Number(level) || 1)); | |
| profile.email = activeEmail; | |
| profile.startingLevel = assessedLevel; | |
| profile.unlockedLevel = Math.max(Number(profile.unlockedLevel) || assessedLevel, assessedLevel); | |
| profile.assessmentScore = Number(totalScore) || 0; | |
| profile.speakingScore = speakingScore; | |
| profile.conversationScore = conversationScore; | |
| profile.emotionScore = emotionScore; | |
| profile.readingScore = readingScore; | |
| profile.confidenceScore = confidenceScore; | |
| profile.attempts = Array.isArray(profile.attempts) ? profile.attempts : []; | |
| profile.sessionsCompleted = Number(profile.sessionsCompleted) || 0; | |
| localStorage.setItem(profileKey, JSON.stringify(profile)); | |
| } | |
| // Go to dashboard | |
| window.location.href = "dashboard.html"; | |
| } | |
| </script> | |
| ``` | |
| </body> | |
| </html> | |