Skip to content
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

Hide overlay when teacher viewing student work #29097

Merged
merged 1 commit into from
Jun 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/src/templates/instructions/InstructionsCSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const styles = {

class InstructionsCSF extends React.Component {
static propTypes = {
teacherViewingStudentWork: PropTypes.bool,
handleClickCollapser: PropTypes.func,
adjustMaxNeededHeight: PropTypes.func,
overlayVisible: PropTypes.bool,
Expand Down Expand Up @@ -192,6 +193,11 @@ class InstructionsCSF extends React.Component {
* Calculate our initial height (based off of rendered height of instructions)
*/
componentDidMount() {
//Overlay is not needed when a teacher is viewing the students work
if (this.props.teacherViewingStudentWork) {
this.props.hideOverlay();
}

// Might want to increase the size of our instructions after our icon image
// has loaded, to make sure the image fits
$(ReactDOM.findDOMNode(this.icon)).load(
Expand Down
3 changes: 3 additions & 0 deletions apps/src/templates/instructions/TopInstructions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,9 @@ class TopInstructions extends Component {
handleClickCollapser={this.handleClickCollapser}
adjustMaxNeededHeight={this.adjustMaxNeededHeight}
isEmbedView={this.props.isEmbedView}
teacherViewingStudentWork={
this.state.teacherViewingStudentWork
}
/>
)}
{!this.props.hasContainedLevels &&
Expand Down