Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
d9b3a274
Commit
d9b3a274
authored
May 09, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:bug
parent
93fd7ffe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
src/modules/teach-tool/examination-manager/AddExam.tsx
+1
-1
src/modules/teach-tool/question-manage/OperateQuestion.jsx
+5
-5
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
+6
-1
No files found.
src/modules/teach-tool/examination-manager/AddExam.tsx
View file @
d9b3a274
...
@@ -243,7 +243,7 @@ function AddExam(props: any) {
...
@@ -243,7 +243,7 @@ function AddExam(props: any) {
help=
{
check
&&
!
examName
&&
'请选择课程'
}
help=
{
check
&&
!
examName
&&
'请选择课程'
}
required
>
required
>
<
Input
placeholder=
'请输入
试卷
名称(40字以内)'
maxLength=
{
40
}
value=
{
examName
}
onChange=
{
(
e
)
=>
{
<
Input
placeholder=
'请输入
考试
名称(40字以内)'
maxLength=
{
40
}
value=
{
examName
}
onChange=
{
(
e
)
=>
{
setExamName
(
e
.
target
.
value
)
setExamName
(
e
.
target
.
value
)
}
}
style=
{
{
width
:
320
}
}
/>
}
}
style=
{
{
width
:
320
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/modules/teach-tool/question-manage/OperateQuestion.jsx
View file @
d9b3a274
...
@@ -336,7 +336,7 @@ class OperateQuestion extends Component {
...
@@ -336,7 +336,7 @@ class OperateQuestion extends Component {
key=
"SINGLE_CHOICE"
key=
"SINGLE_CHOICE"
>
>
<
OperateQuestionTab
<
OperateQuestionTab
questionTypeKey=
{
activeKey
}
questionTypeKey=
{
"SINGLE_CHOICE"
}
onRef=
{
(
ref
)
=>
{
onRef=
{
(
ref
)
=>
{
this
.
singleChoiceRef
=
ref
;
this
.
singleChoiceRef
=
ref
;
}
}
}
}
...
@@ -365,7 +365,7 @@ class OperateQuestion extends Component {
...
@@ -365,7 +365,7 @@ class OperateQuestion extends Component {
key=
"MULTI_CHOICE"
key=
"MULTI_CHOICE"
>
>
<
OperateQuestionTab
<
OperateQuestionTab
questionTypeKey=
{
activeKey
}
questionTypeKey=
{
"MULTI_CHOICE"
}
onRef=
{
(
ref
)
=>
{
onRef=
{
(
ref
)
=>
{
this
.
multiChoiceRef
=
ref
;
this
.
multiChoiceRef
=
ref
;
}
}
}
}
...
@@ -393,7 +393,7 @@ class OperateQuestion extends Component {
...
@@ -393,7 +393,7 @@ class OperateQuestion extends Component {
key=
"JUDGE"
key=
"JUDGE"
>
>
<
OperateQuestionTab
<
OperateQuestionTab
questionTypeKey=
{
activeKey
}
questionTypeKey=
{
"JUDGE"
}
onRef=
{
(
ref
)
=>
{
onRef=
{
(
ref
)
=>
{
this
.
judgeRef
=
ref
;
this
.
judgeRef
=
ref
;
}
}
}
}
...
@@ -421,7 +421,7 @@ class OperateQuestion extends Component {
...
@@ -421,7 +421,7 @@ class OperateQuestion extends Component {
key=
"GAP_FILLING"
key=
"GAP_FILLING"
>
>
<
OperateQuestionTab
<
OperateQuestionTab
questionTypeKey=
{
activeKey
}
questionTypeKey=
{
"GAP_FILLING"
}
onRef=
{
(
ref
)
=>
{
onRef=
{
(
ref
)
=>
{
this
.
gapRef
=
ref
;
this
.
gapRef
=
ref
;
}
}
}
}
...
@@ -459,7 +459,7 @@ class OperateQuestion extends Component {
...
@@ -459,7 +459,7 @@ class OperateQuestion extends Component {
key=
"INDEFINITE_CHOICE"
key=
"INDEFINITE_CHOICE"
>
>
<
OperateQuestionTab
<
OperateQuestionTab
questionTypeKey=
{
activeKey
}
questionTypeKey=
{
"INDEFINITE_CHOICE"
}
onRef=
{
(
ref
)
=>
{
onRef=
{
(
ref
)
=>
{
this
.
indefiniteRef
=
ref
;
this
.
indefiniteRef
=
ref
;
}
}
}
}
...
...
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
View file @
d9b3a274
...
@@ -634,6 +634,9 @@ class OperateQuestionTab extends Component {
...
@@ -634,6 +634,9 @@ class OperateQuestionTab extends Component {
this
.
state
.
stemContent
,
this
.
state
.
stemContent
,
(
contentItem
)
=>
contentItem
.
type
===
"RICH_TEXT"
(
contentItem
)
=>
contentItem
.
type
===
"RICH_TEXT"
);
);
if
(
stemContent
.
textLength
>
1000
)
{
validateError
++
;
}
let
stem
=
stemContent
.
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
let
stem
=
stemContent
.
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
stem
=
stem
.
replace
(
/
\&
nbsp
\;
/gi
,
""
);
stem
=
stem
.
replace
(
/
\&
nbsp
\;
/gi
,
""
);
stem
=
stem
.
replace
(
/
\s
+/g
,
""
);
stem
=
stem
.
replace
(
/
\s
+/g
,
""
);
...
@@ -691,7 +694,9 @@ class OperateQuestionTab extends Component {
...
@@ -691,7 +694,9 @@ class OperateQuestionTab extends Component {
optionUnChecked
=
item
.
isCorrectAnswer
optionUnChecked
=
item
.
isCorrectAnswer
?
optionUnChecked
?
optionUnChecked
:
optionUnChecked
+
1
;
:
optionUnChecked
+
1
;
if
(
optionContent
[
0
].
textLength
>
1000
)
{
validateError
++
;
}
let
optionInput
=
optionContent
[
0
].
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
let
optionInput
=
optionContent
[
0
].
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
optionInput
=
optionInput
.
replace
(
/
\&
nbsp
\;
/gi
,
""
);
optionInput
=
optionInput
.
replace
(
/
\&
nbsp
\;
/gi
,
""
);
optionInput
=
optionInput
.
replace
(
/
\s
+/g
,
""
);
optionInput
=
optionInput
.
replace
(
/
\s
+/g
,
""
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment