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> = [
kind: 'message',
name: 'Steffen',
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',
......
......@@ -27,6 +27,7 @@ import Spinner from '../../helpers/spinner'
import {copyExercise} from '../../../communicationLayer/exerciseEditorLayer'
import Logger from '../../../helpers/logger'
import history from '../../../routerHistory'
import {debugOriginUrl, isProduction} from '../../../../debug'
//const css = require('./styles.styl');
......@@ -675,6 +676,10 @@ class TableView extends React.Component<Props, any> {
newExerciseId = await copyExercise(exercisePreview.id)
} catch (err) {
if (!isProduction) {
Logger.warn(`could not create exercise copy: ${err.message}`, err)
}
Logger.warn('could not create exercise copy')
errorDialog(getI18n(this.props.langId, "Error"),
getI18n(this.props.langId, "Could not copy exercise"), this.props.langId
......
......@@ -13,7 +13,7 @@ import Logger from './helpers/logger'
* y - breaking changes / new features
* z - fixes, small changes
*/
export const versionString = '2.5.4'
export const versionString = '2.5.5'
export const supportMail = 'yapex@informatik.uni-halle.de'
......
......@@ -9,6 +9,7 @@ import {EditorExerciseFromBackend} from "../../../types/exerciseEditor";
import {convertEditorExerciseFromBackendToFrontend} from "../../../helpers/convertersAndTransformers";
import {AceEditorsStorageHelper} from '../../../components/codeEditors/aceEditors/aceEditorsStorageHelper'
import {editExerciseExerciseDescriptionEditorPanelViewEditorId} from '../../../constants'
import {initial as initialEditorExercise} from './editorExerciseReducer'
export interface GET_editorExerciseAction
......@@ -78,7 +79,7 @@ export function reducer(state: State = initial(), action: AllActions): State {
return {
...state,
isLoading: false,
editorExercise: null
editorExercise: initialEditorExercise()
}
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