-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emergency mode banner for teacher dashboard #43702
Changes from 10 commits
69900e8
a5b34db
433ae06
965de9f
a1c5a48
482c0d3
b4a2b57
9d7b03a
0543876
e79490c
f017ad5
491ff78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ import { | |
import {sectionShape} from '@cdo/apps/templates/teacherDashboard/shapes'; | ||
import Button from '../Button'; | ||
import DropdownButton from '../DropdownButton'; | ||
import {disabledBubblesSupportArticle} from '@cdo/apps/code-studio/disabledBubbles'; | ||
|
||
class TeacherDashboardHeader extends React.Component { | ||
static propTypes = { | ||
|
@@ -70,6 +71,30 @@ class TeacherDashboardHeader extends React.Component { | |
/> | ||
)); | ||
|
||
progressNotSavingNotification() { | ||
let details = ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be |
||
<p> | ||
{i18n.disabledProgress1()} {i18n.disabledProgressTeacherDashboard2()}{' '} | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={disabledBubblesSupportArticle} | ||
> | ||
{i18n.learnMore()} | ||
</a> | ||
</p> | ||
); | ||
|
||
return ( | ||
<Notification | ||
type={NotificationType.failure} | ||
notice={i18n.disabledProgressTeacherDashboard1()} | ||
details={details} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think I have a strong opinion either way, but is there a reason to do the "Learn more" as an inline link to the article rather than a button? Mostly asking since the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the tip - I switched it to use the |
||
dismissable={false} | ||
/> | ||
); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
|
@@ -83,6 +108,9 @@ class TeacherDashboardHeader extends React.Component { | |
restrictSection={this.props.selectedSection.restrictSection} | ||
loginType={this.props.selectedSection.loginType} | ||
/> | ||
{this.props.selectedSection.postMilestoneDisabled && ( | ||
<this.progressNotSavingNotification /> | ||
)} | ||
<div style={styles.header}> | ||
<div> | ||
<h1>{this.props.selectedSection.name}</h1> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -304,6 +304,8 @@ def summarize(include_students: true) | |
restrict_section: restrict_section, | ||
code_review_enabled: code_review_enabled?, | ||
is_assigned_csa: assigned_csa?, | ||
# this will be true when we are in emergency mode and this section has any script assigned other than CSP or CSD | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be more accurate to say that this will be true for CSF and HoC courses? (Even more precisely, it is the set of scripts returned here.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to this suggestion because making the comment more specific will be more future-proof There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! This is definitely better! |
||
post_milestone_disabled: !!script && !Gatekeeper.allows('postMilestone', where: {script_name: script.name}, default: true), | ||
code_review_expires_at: code_review_expires_at | ||
} | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) I thought "while we are dealing with this issue" sounded a bit negative but I see that this string is derived from the one above so am ok with just leaving this as-is.