Skip to content

Commit

Permalink
Merge pull request #5402 from mishaschwartz/v1.12.5
Browse files Browse the repository at this point in the history
v1.12.5
  • Loading branch information
mishaschwartz authored Jul 13, 2021
2 parents 5709a7d + 8b93d04 commit 1a3c54d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [v1.12.5]
- Fix bugs in grading view when switching between submissions (#5400)

## [v1.12.4]
- Symlink git repo hooks (#5283)

Expand Down
2 changes: 1 addition & 1 deletion app/MARKUS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=1.12.4,PATCH_LEVEL=DEV
VERSION=1.12.5,PATCH_LEVEL=DEV
4 changes: 2 additions & 2 deletions app/assets/javascripts/Components/Result/file_viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export class FileViewer extends React.Component {
* Update the contents being displayed with the given submission file id.
*/
set_submission_file = (submission_file_id, force_text) => {
if (!this.props.result_id && this.props.selectedFile === null) {
this.setState({loading: false, type: null});
if ((!this.props.result_id && this.props.selectedFile === null) || submission_file_id === null) {
this.setState({loading: false, type: ''});
return;
}
force_text = !!force_text;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/Components/Result/result.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ class Result extends React.Component {
updateOverallComment = (value, remark) => {
return $.post({
url: Routes.update_overall_comment_assignment_submission_result_path(
this.props.assignment_id, this.props.submission_id, this.props.result_id,
this.state.assignment_id, this.state.submission_id, this.state.result_id,
),
data: {result: {overall_comment: value}},
}).then((result) => {
Expand Down
8 changes: 8 additions & 0 deletions app/assets/javascripts/Components/test_run_table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ export class TestRunTable extends React.Component {
this.fetchData();
}

componentDidUpdate(prevProps) {
if (prevProps.result_id !== this.props.result_id ||
prevProps.instructor_run !== this.props.instructor_run ||
prevProps.instructor_view !== this.props.instructor_view) {
this.fetchData();
}
}

fetchData = () => {
let ajaxDetails = {};
if (this.props.instructor_run) {
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class='main'>
<li id='logo'>
<a href='<%= root_url %>' id='logo-img'></a>
<a href='<%= root_path %>' id='logo-img' aria-label='<%= t('menu.dashboard') %>'></a>
</li>

<% if @current_user.admin? %>
Expand Down

0 comments on commit 1a3c54d

Please sign in to comment.