remove quiz label
This commit is contained in:
+22
-22
@@ -1698,7 +1698,7 @@ export function ColossiansStudySectionPage({ content }: Props) {
|
|||||||
))}
|
))}
|
||||||
</ol>
|
</ol>
|
||||||
<div style={{ marginTop: '1rem', display: 'flex', gap: '0.75rem', flexWrap: 'wrap' }}>
|
<div style={{ marginTop: '1rem', display: 'flex', gap: '0.75rem', flexWrap: 'wrap' }}>
|
||||||
<Link to={`/study/${study.slug}/${section.id}/quiz`} className="btn-secondary">Take the Quiz</Link>
|
<Link to={`/study/${study.slug}/${section.id}/quiz`} className="btn-secondary">Discussion Questions</Link>
|
||||||
<Link to={`/study/${study.slug}/community?sectionId=${encodeURIComponent(section.id)}`} className="btn-primary">Go to Community</Link>
|
<Link to={`/study/${study.slug}/community?sectionId=${encodeURIComponent(section.id)}`} className="btn-primary">Go to Community</Link>
|
||||||
<Link to={`/contact?source=community&study=${encodeURIComponent(study.title)}`} className="btn-secondary">Ask Nate</Link>
|
<Link to={`/contact?source=community&study=${encodeURIComponent(study.title)}`} className="btn-secondary">Ask Nate</Link>
|
||||||
</div>
|
</div>
|
||||||
@@ -2964,7 +2964,7 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
setAnswers(Array.isArray(data.answers) ? data.answers : [])
|
setAnswers(Array.isArray(data.answers) ? data.answers : [])
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (cancelled) return
|
if (cancelled) return
|
||||||
setError(err instanceof Error ? err.message : 'Unable to load quiz answers.')
|
setError(err instanceof Error ? err.message : 'Unable to load answers.')
|
||||||
} finally {
|
} finally {
|
||||||
if (cancelled) return
|
if (cancelled) return
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
@@ -2986,9 +2986,9 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ answers }),
|
body: JSON.stringify({ answers }),
|
||||||
})
|
})
|
||||||
setMessage('Quiz answers saved.')
|
setMessage('Answers saved.')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err instanceof Error ? err.message : 'Unable to save quiz answers.')
|
setError(err instanceof Error ? err.message : 'Unable to save answers.')
|
||||||
} finally {
|
} finally {
|
||||||
setSaving(false)
|
setSaving(false)
|
||||||
}
|
}
|
||||||
@@ -2996,11 +2996,11 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
|
|
||||||
if (!study || !section) {
|
if (!study || !section) {
|
||||||
return (
|
return (
|
||||||
<main className="thanks-page" aria-label="Quiz not found">
|
<main className="thanks-page" aria-label="Discussion questions not found">
|
||||||
<div className="thanks-card">
|
<div className="thanks-card">
|
||||||
<p className="eyebrow">Study Quiz</p>
|
<p className="eyebrow">Discussion Questions</p>
|
||||||
<h1>Quiz not found</h1>
|
<h1>Discussion questions not found</h1>
|
||||||
<p>The lesson quiz you requested is not available.</p>
|
<p>The discussion questions you requested are not available.</p>
|
||||||
<Link to="/study" className="btn-primary">Back to Studies</Link>
|
<Link to="/study" className="btn-primary">Back to Studies</Link>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@@ -3013,8 +3013,8 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
|
|
||||||
if (!auth.checked) {
|
if (!auth.checked) {
|
||||||
return (
|
return (
|
||||||
<main className="thanks-page" aria-label="Loading quiz">
|
<main className="thanks-page" aria-label="Loading discussion questions">
|
||||||
<div className="thanks-card"><p>Loading quiz...</p></div>
|
<div className="thanks-card"><p>Loading discussion questions...</p></div>
|
||||||
</main>
|
</main>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -3023,9 +3023,9 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
return (
|
return (
|
||||||
<main className="thanks-page" aria-label="Sign in required">
|
<main className="thanks-page" aria-label="Sign in required">
|
||||||
<div className="thanks-card">
|
<div className="thanks-card">
|
||||||
<p className="eyebrow">Study Quiz</p>
|
<p className="eyebrow">Discussion Questions</p>
|
||||||
<h1>Sign In Required</h1>
|
<h1>Sign In Required</h1>
|
||||||
<p>You need to sign in before you can view and save quiz answers.</p>
|
<p>You need to sign in before you can view and save your discussion answers.</p>
|
||||||
<Link to="/study/signup" className="btn-primary">Sign In</Link>
|
<Link to="/study/signup" className="btn-primary">Sign In</Link>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@@ -3036,9 +3036,9 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
return (
|
return (
|
||||||
<main className="thanks-page" aria-label="Enrollment required">
|
<main className="thanks-page" aria-label="Enrollment required">
|
||||||
<div className="thanks-card">
|
<div className="thanks-card">
|
||||||
<p className="eyebrow">Study Quiz</p>
|
<p className="eyebrow">Discussion Questions</p>
|
||||||
<h1>Enroll to Access the Quiz</h1>
|
<h1>Enroll to Access Discussion Questions</h1>
|
||||||
<p>Please enroll in {study.title} to open the quiz for this lesson.</p>
|
<p>Please enroll in {study.title} to open the discussion questions for this lesson.</p>
|
||||||
<Link to={`/study/${study.slug}`} className="btn-primary">Go to Study</Link>
|
<Link to={`/study/${study.slug}`} className="btn-primary">Go to Study</Link>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@@ -3046,12 +3046,12 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="study-index-page" aria-label="Study quiz">
|
<main className="study-index-page" aria-label="Discussion questions">
|
||||||
<section className="section-study-course-hero">
|
<section className="section-study-course-hero">
|
||||||
<div className="section-inner study-course-hero-inner">
|
<div className="section-inner study-course-hero-inner">
|
||||||
<p className="eyebrow">Quiz</p>
|
<p className="eyebrow">Discussion Questions</p>
|
||||||
<h1>{section.title}</h1>
|
<h1>{section.title}</h1>
|
||||||
<p className="study-course-hero-copy">Answer the lesson questions below and save your responses for later review.</p>
|
<p className="study-course-hero-copy">Work through the discussion questions below and save your responses for later review.</p>
|
||||||
<div className="study-course-hero-actions">
|
<div className="study-course-hero-actions">
|
||||||
<Link to={`/study/${study.slug}/${section.id}`} className="btn-secondary">Back to Lesson</Link>
|
<Link to={`/study/${study.slug}/${section.id}`} className="btn-secondary">Back to Lesson</Link>
|
||||||
</div>
|
</div>
|
||||||
@@ -3061,13 +3061,13 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
<section className="section-study-module" style={{ paddingTop: '2rem' }}>
|
<section className="section-study-module" style={{ paddingTop: '2rem' }}>
|
||||||
<div className="section-inner">
|
<div className="section-inner">
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<p>Loading quiz...</p>
|
<p>Loading discussion questions...</p>
|
||||||
) : error ? (
|
) : error ? (
|
||||||
<p className="study-note-status">{error}</p>
|
<p className="study-note-status">{error}</p>
|
||||||
) : !canSubmit ? (
|
) : !canSubmit ? (
|
||||||
<article className="study-class-block">
|
<article className="study-class-block">
|
||||||
<h2>No Quiz Questions</h2>
|
<h2>No Discussion Questions</h2>
|
||||||
<p className="study-detail-copy">This lesson does not have quiz questions configured yet.</p>
|
<p className="study-detail-copy">This lesson does not have discussion questions configured yet.</p>
|
||||||
</article>
|
</article>
|
||||||
) : (
|
) : (
|
||||||
<form onSubmit={e => { e.preventDefault(); saveQuiz() }}>
|
<form onSubmit={e => { e.preventDefault(); saveQuiz() }}>
|
||||||
@@ -3088,7 +3088,7 @@ export function StudyQuizPage({ content }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<div style={{ display: 'flex', gap: '0.75rem', flexWrap: 'wrap' }}>
|
<div style={{ display: 'flex', gap: '0.75rem', flexWrap: 'wrap' }}>
|
||||||
<button type="submit" className="btn-primary" disabled={saving}>{saving ? 'Saving...' : 'Save Quiz Answers'}</button>
|
<button type="submit" className="btn-primary" disabled={saving}>{saving ? 'Saving...' : 'Save Answers'}</button>
|
||||||
<button type="button" className="btn-secondary" onClick={() => navigate(`/study/${study.slug}/${section.id}`)}>Back to Lesson</button>
|
<button type="button" className="btn-secondary" onClick={() => navigate(`/study/${study.slug}/${section.id}`)}>Back to Lesson</button>
|
||||||
</div>
|
</div>
|
||||||
{message && <p className="study-note-status" style={{ marginTop: '1rem' }}>{message}</p>}
|
{message && <p className="study-note-status" style={{ marginTop: '1rem' }}>{message}</p>}
|
||||||
|
|||||||
Reference in New Issue
Block a user