File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { ExercisePreview } from 'shared';
55import { Link } from 'react-router-dom' ;
66import { observer } from 'mobx-react' ;
77import { CornerRibbon } from 'shared' ;
8+ import { ArbitraryHtmlAndMath as HTML } from 'shared' ;
89
910const Preview = styled . div `
1011 margin-top: 1.5rem;
@@ -43,6 +44,8 @@ class ExerciseEditingPreview extends React.Component {
4344 < div key = "n" > { exercise . readOnlyReason } </ div > ,
4445 ] }
4546 >
47+ { exercise . context && < HTML html = { exercise . context } /> }
48+
4649 < ExercisePreview
4750 questionType = "teacher-preview"
4851 className = 'exercise-editing-preview'
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { idType } from 'shared';
99import { Loading , NotFound } from './exercise-state' ;
1010import Controls from './preview/controls' ;
1111import { ExercisePreview } from 'shared' ;
12+ import { ArbitraryHtmlAndMath as HTML } from 'shared' ;
1213
1314@observer
1415export default
@@ -52,6 +53,7 @@ class Preview extends React.Component {
5253
5354 return (
5455 < div className = "preview-screen" >
56+ { exercise . context && < HTML html = { exercise . context } /> }
5557 < ExercisePreview
5658 displayAllTags
5759 displayFeedback
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default class SharedExercise extends BaseModel {
2525
2626 @field published_at ?: Time | Date
2727 @field stem_html = ''
28-
28+ @ field context = '' ;
2929 @model ( Attachment ) attachments = array < Attachment > ( )
3030 @model ( Author ) authors = array < Author > ( )
3131 @model ( Author ) copyright_holders = array < Author > ( )
You can’t perform that action at this time.
0 commit comments