Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #140 from UniversityOfHelsinkiCS/22.8-hotfixes
Browse files Browse the repository at this point in the history
Correct permissions to adding graders
  • Loading branch information
Jakousa committed Aug 22, 2017
2 parents 097bf7e + c7b5e67 commit d74bb50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/thesis/ThesisCreatePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class ThesisCreatePage extends Component {
*/
render() {
const isAdmin = this.props.user.role === "admin";
const isProfessor = this.props.user.role.includes("Prof");
return (
<div>
<ThesisConfirmModal sendAddThesis={this.handleAddThesis} closeModal={this.toggleModal} showModal={this.state.showModal} />
Expand All @@ -75,7 +76,7 @@ export class ThesisCreatePage extends Component {
<h3 className="ui dividing header">Upload Thesis files</h3>
<ThesisUploadWidget errors={this.state.newThesis.errors} sendChange={this.handleChange} currentFile={this.state.newThesis.values.PdfFile.name} type={"newThesisReview"} />
<ThesisGraders errors={this.state.newThesis.errors} updateOrNew={"newThesis"} graders={this.props.Graders} alreadySelected={this.state.newThesis.values.Graders} editing={true}/>
<GraderListCreateUpdate editable />
{isProfessor || isAdmin ? <GraderListCreateUpdate editable /> : ""}
<ThesisCouncilMeetingPicker errors={this.state.newThesis.errors} councilMeetings={this.props.CouncilMeetings} sendChange={this.handleChange} editing={true} />
</div>
<button className="ui primary button" onClick={this.toggleModal}>
Expand Down
2 changes: 1 addition & 1 deletion src/thesis/ThesisEditPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class ThesisEditPage extends Component {
{this.renderThesisFileButtons()}
{this.state.editing ? this.renderThesisUploadFiles() : ""}
<ThesisGraders errors={this.state.updateThesis.errors} updateOrNew={"updateThesis"} graders={this.props.Graders} alreadySelected={this.state.updateThesis.values.Graders} editing={this.state.editing} />
<GraderListCreateUpdate editable />
{this.state.editing ? <GraderListCreateUpdate editable /> : ""}
<ThesisCouncilMeetingPicker errors={this.state.updateThesis.errors} councilMeetings={this.props.councilmeetings} sendChange={this.handleChange} />
{this.renderGraderEval()}
{this.props.user.role === "admin" ? <ThesisEmails thesisProgress={this.state.updateThesis.values.ThesisProgress} sendEmail={this.handleEmail} sendDone={this.setReminderDone} /> : ""}
Expand Down

0 comments on commit d74bb50

Please sign in to comment.