Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
program-service
Commits
0f29b7f3
Unverified
Commit
0f29b7f3
authored
3 years ago
by
Kartheek Palla
Committed by
GitHub
3 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #273 from snehar-nd/snehar-nd/printdocx
Snehar nd/printdocx
parents
65640726
cd1caef0
release-5.1.0
dependabot/npm_and_yarn/src/async-2.6.4
dependabot/npm_and_yarn/src/axios-0.21.2
dependabot/npm_and_yarn/src/decode-uri-component-0.2.2
dependabot/npm_and_yarn/src/jsonwebtoken-9.0.0
dependabot/npm_and_yarn/src/lodash-4.17.21
dependabot/npm_and_yarn/src/moment-2.29.4
dependabot/npm_and_yarn/src/moment-timezone-0.5.37
dependabot/npm_and_yarn/src/node-fetch-2.6.7
dependabot/npm_and_yarn/src/qs-and-body-parser-and-express-6.5.3
dependabot/npm_and_yarn/src/redis-3.1.1
dependabot/npm_and_yarn/src/simple-get-2.8.2
dependabot/npm_and_yarn/src/underscore-1.12.1
master
release-4.7.0
release-4.8.0
release-4.9.0
release-5.1.0_RC1
release-4.9.0_RC1
release-4.8.0_RC3
release-4.8.0_RC2
release-4.8.0_RC1
release-4.7.0_RC6
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/print/csv.js
+19
-17
src/service/print/csv.js
with
19 additions
and
17 deletions
+19
-17
src/service/print/csv.js
+
19
−
17
View file @
0f29b7f3
...
...
@@ -264,20 +264,22 @@ async function renderMCQ(
answerOptions
=
[
"
A
"
,
"
B
"
,
"
C
"
,
"
D
"
];
let
questionTitle
;
let
finalQuestion
=
""
;
for
(
const
[
index
,
qo
]
of
question
.
editorState
.
options
.
entries
())
{
let
qoBody
=
qo
.
value
.
body
;
let
qoData
=
qoBody
.
search
(
"
img
"
)
>=
0
||
qoBody
.
search
(
"
sup
"
)
>=
0
||
qoBody
.
search
(
"
sub
"
)
>=
0
||
(
qoBody
.
match
(
/<p>/g
)
&&
qoBody
.
match
(
/<p>/g
).
length
>
1
)
||
(
qoBody
.
match
(
/<ol>/g
)
&&
qoBody
.
match
(
/<ol>/g
).
length
>=
1
)
?
await
getStack
(
qoBody
,
answerOptions
[
index
])
:
[
`
${
cleanHTML
(
qoBody
)}
`
];
questionOptions
.
push
(
qoData
);
if
(
question
.
editorState
.
options
)
{
for
(
const
[
index
,
qo
]
of
question
.
editorState
.
options
.
entries
())
{
let
qoBody
=
qo
.
value
.
body
;
let
qoData
=
qoBody
.
search
(
"
img
"
)
>=
0
||
qoBody
.
search
(
"
sup
"
)
>=
0
||
qoBody
.
search
(
"
sub
"
)
>=
0
||
(
qoBody
.
match
(
/<p>/g
)
&&
qoBody
.
match
(
/<p>/g
).
length
>
1
)
||
(
qoBody
.
match
(
/<ol>/g
)
&&
qoBody
.
match
(
/<ol>/g
).
length
>=
1
)
?
await
getStack
(
qoBody
,
answerOptions
[
index
])
:
[
`
${
cleanHTML
(
qoBody
)}
`
];
questionOptions
.
push
(
qoData
);
}
}
let
q
=
question
.
editorState
.
question
;
questionTitle
=
q
.
search
(
"
img
"
)
>=
0
||
q
.
search
(
"
sub
"
)
>=
0
||
...
...
@@ -366,16 +368,15 @@ async function renderMCQ(
}
}
}
let
data
=
{
Class
:
grade
,
Subject
:
subject
,
QuestionSetName
:
examName
,
Questions
:
finalQuestion
,
Option1
:
questionOptions
[
0
][
0
],
Option2
:
questionOptions
[
1
][
0
],
Option3
:
questionOptions
[
2
][
0
],
Option4
:
questionOptions
[
3
][
0
],
Option1
:
questionOptions
.
length
!==
0
?
questionOptions
[
0
][
0
]
:
""
,
Option2
:
questionOptions
.
length
!==
0
?
questionOptions
[
1
][
0
]
:
""
,
Option3
:
questionOptions
.
length
!==
0
?
questionOptions
[
2
][
0
]
:
""
,
Option4
:
questionOptions
.
length
!==
0
?
questionOptions
[
3
][
0
]
:
""
,
"
CorrectAnswer(1/2/3/4)
"
:
question
.
answer
,
Competencies
:
learningOutcome
,
Skills
:
blooms
,
...
...
@@ -385,6 +386,7 @@ async function renderMCQ(
RightColumn
:
""
,
LeftColumn
:
""
,
};
return
data
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets