Skip to content
Snippets Groups Projects
Commit 4c16b37e authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- fixed issue where no permission on edit exercise would give us an invalid state

- fixed typo
parent 03a76faf
No related branches found
No related tags found
No related merge requests found
...@@ -339,7 +339,7 @@ const conversion: ReadonlyArray<ChatMessage> = [ ...@@ -339,7 +339,7 @@ const conversion: ReadonlyArray<ChatMessage> = [
kind: 'message', kind: 'message',
name: 'Steffen', name: 'Steffen',
withLoading: true, withLoading: true,
message: 'Jaja, von wegen keine Fehler. Ich habe dir aber doch gleich gesagt, dass wir einen vernünftigen 404-Seite brauchen!' message: 'Jaja, von wegen keine Fehler. Ich habe dir aber doch gleich gesagt, dass wir einen vernünftige 404-Seite brauchen!'
}, },
{ {
kind: 'message', kind: 'message',
......
...@@ -27,6 +27,7 @@ import Spinner from '../../helpers/spinner' ...@@ -27,6 +27,7 @@ import Spinner from '../../helpers/spinner'
import {copyExercise} from '../../../communicationLayer/exerciseEditorLayer' import {copyExercise} from '../../../communicationLayer/exerciseEditorLayer'
import Logger from '../../../helpers/logger' import Logger from '../../../helpers/logger'
import history from '../../../routerHistory' import history from '../../../routerHistory'
import {debugOriginUrl, isProduction} from '../../../../debug'
//const css = require('./styles.styl'); //const css = require('./styles.styl');
...@@ -675,6 +676,10 @@ class TableView extends React.Component<Props, any> { ...@@ -675,6 +676,10 @@ class TableView extends React.Component<Props, any> {
newExerciseId = await copyExercise(exercisePreview.id) newExerciseId = await copyExercise(exercisePreview.id)
} catch (err) { } catch (err) {
if (!isProduction) {
Logger.warn(`could not create exercise copy: ${err.message}`, err)
}
Logger.warn('could not create exercise copy') Logger.warn('could not create exercise copy')
errorDialog(getI18n(this.props.langId, "Error"), errorDialog(getI18n(this.props.langId, "Error"),
getI18n(this.props.langId, "Could not copy exercise"), this.props.langId getI18n(this.props.langId, "Could not copy exercise"), this.props.langId
......
...@@ -13,7 +13,7 @@ import Logger from './helpers/logger' ...@@ -13,7 +13,7 @@ import Logger from './helpers/logger'
* y - breaking changes / new features * y - breaking changes / new features
* z - fixes, small changes * z - fixes, small changes
*/ */
export const versionString = '2.5.4' export const versionString = '2.5.5'
export const supportMail = 'yapex@informatik.uni-halle.de' export const supportMail = 'yapex@informatik.uni-halle.de'
......
...@@ -9,6 +9,7 @@ import {EditorExerciseFromBackend} from "../../../types/exerciseEditor"; ...@@ -9,6 +9,7 @@ import {EditorExerciseFromBackend} from "../../../types/exerciseEditor";
import {convertEditorExerciseFromBackendToFrontend} from "../../../helpers/convertersAndTransformers"; import {convertEditorExerciseFromBackendToFrontend} from "../../../helpers/convertersAndTransformers";
import {AceEditorsStorageHelper} from '../../../components/codeEditors/aceEditors/aceEditorsStorageHelper' import {AceEditorsStorageHelper} from '../../../components/codeEditors/aceEditors/aceEditorsStorageHelper'
import {editExerciseExerciseDescriptionEditorPanelViewEditorId} from '../../../constants' import {editExerciseExerciseDescriptionEditorPanelViewEditorId} from '../../../constants'
import {initial as initialEditorExercise} from './editorExerciseReducer'
export interface GET_editorExerciseAction export interface GET_editorExerciseAction
...@@ -78,7 +79,7 @@ export function reducer(state: State = initial(), action: AllActions): State { ...@@ -78,7 +79,7 @@ export function reducer(state: State = initial(), action: AllActions): State {
return { return {
...state, ...state,
isLoading: false, isLoading: false,
editorExercise: null editorExercise: initialEditorExercise()
} }
default: default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment