fix: hide difficulty from scenario ui in exam mode

Signed-off-by: Abhinav Sinha <[email protected]>
This commit is contained in:
Abhinav Sinha
2026-06-17 16:33:14 +05:30
parent 935ab38f28
commit 7e75c8ae02
2 changed files with 22 additions and 16 deletions
@@ -201,9 +201,11 @@ export default function ScenarioPanel({ scenario, onProgressUpdate, onScenarioSt
<div className={styles.scenarioHeader}>
<div className={styles.scenarioMeta}>
<span className={styles.category}>{scenario.category}</span>
{!isExamMode && (
<span className={`${styles.diff} ${styles[scenario.difficulty?.toLowerCase()]}`}>
{scenario.difficulty}
</span>
)}
<span className={styles.typeTag}>{scenario.type === 'mcq' ? 'Multiple Choice' : 'Hands-on Task'}</span>
{!isExamMode && <span className={styles.weight}>{scenario.weight} pts</span>}
</div>
+4
View File
@@ -109,6 +109,7 @@ export default function Sidebar({
{/* Filter bar */}
{!collapsed && (
<div className={styles.filterBar}>
{!isExamMode && (
<select
value={filterDiff}
onChange={e => setFilterDiff(e.target.value)}
@@ -119,6 +120,7 @@ export default function Sidebar({
<option value="Medium">Medium</option>
<option value="Hard">Hard</option>
</select>
)}
<select
value={filterType}
onChange={e => setFilterType(e.target.value)}
@@ -210,9 +212,11 @@ export default function Sidebar({
)}
</div>
<div className={styles.itemMeta}>
{!isExamMode && (
<span className={`${styles.diff} ${styles[DIFF_COLOR[s.difficulty]]}`}>
{s.difficulty}
</span>
)}
<span className={`${styles.type} ${styles[s.type]}`}>{s.type.toUpperCase()}</span>
{!isExamMode && <span className={styles.weight}>{s.weight}pt</span>}
{isExamMode && examDone && (