fix: hide difficulty from scenario ui in exam mode
Signed-off-by: Abhinav Sinha <[email protected]>
This commit is contained in:
@@ -201,9 +201,11 @@ export default function ScenarioPanel({ scenario, onProgressUpdate, onScenarioSt
|
|||||||
<div className={styles.scenarioHeader}>
|
<div className={styles.scenarioHeader}>
|
||||||
<div className={styles.scenarioMeta}>
|
<div className={styles.scenarioMeta}>
|
||||||
<span className={styles.category}>{scenario.category}</span>
|
<span className={styles.category}>{scenario.category}</span>
|
||||||
<span className={`${styles.diff} ${styles[scenario.difficulty?.toLowerCase()]}`}>
|
{!isExamMode && (
|
||||||
{scenario.difficulty}
|
<span className={`${styles.diff} ${styles[scenario.difficulty?.toLowerCase()]}`}>
|
||||||
</span>
|
{scenario.difficulty}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
<span className={styles.typeTag}>{scenario.type === 'mcq' ? 'Multiple Choice' : 'Hands-on Task'}</span>
|
<span className={styles.typeTag}>{scenario.type === 'mcq' ? 'Multiple Choice' : 'Hands-on Task'}</span>
|
||||||
{!isExamMode && <span className={styles.weight}>{scenario.weight} pts</span>}
|
{!isExamMode && <span className={styles.weight}>{scenario.weight} pts</span>}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -109,16 +109,18 @@ export default function Sidebar({
|
|||||||
{/* Filter bar */}
|
{/* Filter bar */}
|
||||||
{!collapsed && (
|
{!collapsed && (
|
||||||
<div className={styles.filterBar}>
|
<div className={styles.filterBar}>
|
||||||
<select
|
{!isExamMode && (
|
||||||
value={filterDiff}
|
<select
|
||||||
onChange={e => setFilterDiff(e.target.value)}
|
value={filterDiff}
|
||||||
className={`${styles.selectFilter} ${filterDiff !== 'All' ? styles[DIFF_COLOR[filterDiff]] : ''}`}
|
onChange={e => setFilterDiff(e.target.value)}
|
||||||
>
|
className={`${styles.selectFilter} ${filterDiff !== 'All' ? styles[DIFF_COLOR[filterDiff]] : ''}`}
|
||||||
<option value="All">All Difficulties</option>
|
>
|
||||||
<option value="Easy">Easy</option>
|
<option value="All">All Difficulties</option>
|
||||||
<option value="Medium">Medium</option>
|
<option value="Easy">Easy</option>
|
||||||
<option value="Hard">Hard</option>
|
<option value="Medium">Medium</option>
|
||||||
</select>
|
<option value="Hard">Hard</option>
|
||||||
|
</select>
|
||||||
|
)}
|
||||||
<select
|
<select
|
||||||
value={filterType}
|
value={filterType}
|
||||||
onChange={e => setFilterType(e.target.value)}
|
onChange={e => setFilterType(e.target.value)}
|
||||||
@@ -210,9 +212,11 @@ export default function Sidebar({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.itemMeta}>
|
<div className={styles.itemMeta}>
|
||||||
<span className={`${styles.diff} ${styles[DIFF_COLOR[s.difficulty]]}`}>
|
{!isExamMode && (
|
||||||
{s.difficulty}
|
<span className={`${styles.diff} ${styles[DIFF_COLOR[s.difficulty]]}`}>
|
||||||
</span>
|
{s.difficulty}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
<span className={`${styles.type} ${styles[s.type]}`}>{s.type.toUpperCase()}</span>
|
<span className={`${styles.type} ${styles[s.type]}`}>{s.type.toUpperCase()}</span>
|
||||||
{!isExamMode && <span className={styles.weight}>{s.weight}pt</span>}
|
{!isExamMode && <span className={styles.weight}>{s.weight}pt</span>}
|
||||||
{isExamMode && examDone && (
|
{isExamMode && examDone && (
|
||||||
|
|||||||
Reference in New Issue
Block a user