Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nanMoMentorPlatform
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
nanMoMentorPlatform
Commits
e14daa22
Commit
e14daa22
authored
Jul 06, 2026
by
PC-20251223ZVQQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学生端-导师测评问题修复
parent
24ca3f55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
teacherSurvey.ts
src/biz/admin/teacherSurvey.ts
+1
-2
myTeacher.ts
src/biz/student/myTeacher.ts
+2
-3
No files found.
src/biz/admin/teacherSurvey.ts
View file @
e14daa22
...
...
@@ -171,8 +171,7 @@ export async function updateSurvey(param: {
}
else
{
let
semester
=
await
getCurrentSemester
();
// 若是更新开始时间,则通过模板创建试卷
let
tempId
=
survey
.
data
.
id
;
let
insertData
=
await
insertSurveyInfo
(
semester
.
id
,
surveyName
,
startTime
,
endTime
,
isOpen
,
description
,
2
,
tempId
);
let
insertData
=
await
insertSurveyInfo
(
semester
.
id
,
surveyName
,
startTime
,
endTime
,
isOpen
,
description
,
2
,
surveyId
);
let
survey_id
=
(
insertData
as
any
).
data
.
id
;
await
insertSurveyDetail
(
survey_id
,
questions
);
}
...
...
src/biz/student/myTeacher.ts
View file @
e14daa22
...
...
@@ -519,7 +519,6 @@ export async function surveyTeacher(studentId: string, surveyId: number, answers
/**遍历答案并保存 */
for
(
let
answerItem
of
answers
)
{
for
(
let
key
in
answerItem
)
{
let
questionId
=
parseInt
(
key
);
let
rawValue
=
(
answerItem
as
any
)[
key
];
// 解析答案值(JSON字符串)
...
...
@@ -531,7 +530,7 @@ export async function surveyTeacher(studentId: string, surveyId: number, answers
}
// 查题目类型
let
question
=
await
selectOneDataByParam
(
TABLENAME
.
测评题目表
,
{
id
:
questionId
});
let
question
=
await
selectOneDataByParam
(
TABLENAME
.
测评题目表
,
{
survey_id
:
surveyId
,
question_code
:
key
});
if
(
!
question
.
data
||
!
(
question
.
data
as
any
).
id
)
{
continue
;
// 题目不存在则跳过
}
...
...
@@ -540,7 +539,7 @@ export async function surveyTeacher(studentId: string, surveyId: number, answers
// 根据题目类型保存答案
let
answerData
:
any
=
{
submission_id
:
submissionId
,
question_id
:
question
I
d
question_id
:
question
.
data
.
i
d
};
if
(
questionType
===
'text'
)
{
answerData
.
answer_text
=
typeof
parsedValue
===
'string'
?
parsedValue
:
JSON
.
stringify
(
parsedValue
);
...
...
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