diff --git a/client/views/Exam.jsx b/client/views/Exam.jsx index 3564461e9493a2fc529f63b3888453726327c7a7..dcabda0e37182c2f77ca18262cb3b8b5962923b5 100644 --- a/client/views/Exam.jsx +++ b/client/views/Exam.jsx @@ -343,19 +343,19 @@ class Exams extends React.Component { props.saveProblemName(e.target.value) }} /> </div> + <br/> + <label className='label'>Feedback options</label> </React.Fragment> )} </div> </div> - <div> - {this.isProblemWidget(selectedWidgetId) && (this.state.editActive - ? <EditPanel problemID={props.problem.id} feedback={this.state.feedbackToEdit} - goBack={this.backToFeedback} /> - : <FeedbackPanel examID={this.props.examID} problem={props.problem} - editFeedback={this.editFeedback} showTooltips={this.state.showTooltips} - grading={false} - />)} - </div> + {this.isProblemWidget(selectedWidgetId) && (this.state.editActive + ? <EditPanel problemID={props.problem.id} feedback={this.state.feedbackToEdit} + goBack={this.backToFeedback} /> + : <FeedbackPanel examID={this.props.examID} problem={props.problem} + editFeedback={this.editFeedback} showTooltips={this.state.showTooltips} + grading={false} + />)} <div className='panel-block'> <button disabled={props.disabledDelete} diff --git a/client/views/Grade.jsx b/client/views/Grade.jsx index 14d4aca40893487b9a22fe5bee07956d23d433f1..6c0bdc7644e4d2b1b12b5c60ca29973da2af9083 100644 --- a/client/views/Grade.jsx +++ b/client/views/Grade.jsx @@ -210,17 +210,18 @@ class Grade extends React.Component { <div className='column is-one-quarter-desktop is-one-third-tablet'> <ProblemSelector problems={exam.problems} changeProblem={this.changeProblem} current={this.state.pIndex} showTooltips={this.state.showTooltips} /> - {this.state.editActive - ? <EditPanel problemID={problem.id} feedback={this.state.feedbackToEdit} - goBack={this.backToFeedback} /> - : <FeedbackPanel examID={exam.id} submissionID={submission.id} - problem={problem} solution={solution} graderID={this.props.graderID} - editFeedback={this.editFeedback} showTooltips={this.state.showTooltips} - updateSubmission={() => { - this.props.updateSubmission(this.state.sIndex) - } - } grading /> - } + <nav className='panel'> + {this.state.editActive + ? <EditPanel problemID={problem.id} feedback={this.state.feedbackToEdit} + goBack={this.backToFeedback} /> + : <FeedbackPanel examID={exam.id} submissionID={submission.id} + problem={problem} solution={solution} graderID={this.props.graderID} + editFeedback={this.editFeedback} showTooltips={this.state.showTooltips} + updateSubmission={() => { + this.props.updateSubmission(this.state.sIndex) + }} grading /> + } + </nav> </div> <div className='column'> diff --git a/client/views/grade/EditPanel.jsx b/client/views/grade/EditPanel.jsx index f1f574ac6f383042b186a8ac1107caae34f00389..5639b8b60de39879bc4e84759e5702e67dd5ada3 100644 --- a/client/views/grade/EditPanel.jsx +++ b/client/views/grade/EditPanel.jsx @@ -107,7 +107,7 @@ class EditPanel extends React.Component { render () { return ( - <nav className='panel'> + <React.Fragment> <p className='panel-heading'> Manage feedback </p> @@ -168,7 +168,7 @@ class EditPanel extends React.Component { onCancel={() => { this.setState({deleting: false}) }} /> </div> - </nav> + </React.Fragment> ) } } diff --git a/client/views/grade/FeedbackBlock.jsx b/client/views/grade/FeedbackBlock.jsx index a7eb1718042e0f7f580a27ef454fa919284386bc..f3795f2968deffe5d214876f69bd5ae68e908030 100644 --- a/client/views/grade/FeedbackBlock.jsx +++ b/client/views/grade/FeedbackBlock.jsx @@ -32,7 +32,7 @@ class FeedbackBlock extends React.Component { render () { const shortcut = (this.props.index < 11 ? '' : 'shift + ') + this.props.index % 10 return ( - <a className='panel-block is-active' onClick={this.props.grading ? this.toggle : this.props.editFeedback} + <a className='panel-block' onClick={this.props.grading ? this.toggle : this.props.editFeedback} style={this.props.selected ? {backgroundColor: '#209cee'} : {}} > <span diff --git a/client/views/grade/FeedbackPanel.jsx b/client/views/grade/FeedbackPanel.jsx index 862a94e55cf8816a66e2a1b81f80d4501b8702c0..91231783c1f01bda7f72e79965a96e1008f6634b 100644 --- a/client/views/grade/FeedbackPanel.jsx +++ b/client/views/grade/FeedbackPanel.jsx @@ -101,7 +101,7 @@ class FeedbackPanel extends React.Component { this.props.problem.feedback[this.state.selectedFeedbackIndex].id return ( - <nav className='panel'> + <React.Fragment> {this.props.grading && <p className='panel-heading'> Total: <b>{totalScore}</b> @@ -126,7 +126,7 @@ class FeedbackPanel extends React.Component { <span>option</span> </button> </div> - </nav> + </React.Fragment> ) } }