Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
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
黄奎
Education
Commits
a6df4f52
Commit
a6df4f52
authored
Jan 10, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
daabd064
bf4b8147
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
20 deletions
+103
-20
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+101
-18
AppletLoginController.cs
Edu.WebApi/Controllers/Applet/AppletLoginController.cs
+2
-2
No files found.
Edu.Module.Exam/CourseExamModule.cs
View file @
a6df4f52
...
...
@@ -40,36 +40,119 @@ namespace Edu.Module.Exam
List
<
object
>
reviewGroupList
=
new
List
<
object
>();
List
<
object
>
prepGroupList
=
new
List
<
object
>();
if
(
reviewList
!=
null
&&
reviewList
.
Count
>
0
)
{
for
(
var
i
=
0
;
i
<
reviewList
.
Count
;
i
++)
{
var
tempWords
=
reviewList
[
i
];
//选择题
if
(
i
%
2
==
0
)
{
string
title
=
"我是问题"
;
string
wordType
=
tempWords
.
WordType
;
string
wordTone
=
tempWords
.
WordTone
;
List
<
optionItem
>
options
=
new
List
<
optionItem
>();
int
randNum
=
Common
.
ConvertHelper
.
CreateRandomNum
();
switch
(
randNum
)
var
tempList
=
reviewList
.
Where
(
qitem
=>
qitem
.
Id
!=
tempWords
.
Id
)?.
Take
(
3
)?.
ToList
();
if
(
tempList
!=
null
&&
tempList
.
Count
>
2
)
{
//根据单词选择中文意思
case
0
:
break
;
//根据中文意思选择单词
case
1
:
break
;
//根据日语书写选择中文意思
case
2
:
switch
(
randNum
)
{
//根据单词选择中文意思
case
0
:
title
=
tempWords
.
WordContent
;
options
.
Add
(
new
optionItem
()
{
Content
=
tempWords
.
ChineseMean
,
IsAnswer
=
true
,
Name
=
""
,
ShowName
=
""
});
foreach
(
var
item
in
tempList
)
{
options
.
Add
(
new
optionItem
()
{
Content
=
item
.
ChineseMean
,
IsAnswer
=
false
,
Name
=
""
,
ShowName
=
""
,
});
}
break
;
//根据中文意思选择单词
case
1
:
title
=
tempWords
.
ChineseMean
;
options
.
Add
(
new
optionItem
()
{
Content
=
tempWords
.
WordContent
,
IsAnswer
=
true
,
Name
=
""
,
ShowName
=
""
});
foreach
(
var
item
in
tempList
)
{
options
.
Add
(
new
optionItem
()
{
Content
=
item
.
WordContent
,
IsAnswer
=
false
,
Name
=
""
,
ShowName
=
""
,
});
}
break
;
//根据日语书写选择中文意思
case
2
:
title
=
tempWords
.
WordWrite
;
options
.
Add
(
new
optionItem
()
{
Content
=
tempWords
.
ChineseMean
,
IsAnswer
=
true
,
Name
=
""
,
ShowName
=
""
});
foreach
(
var
item
in
tempList
)
{
options
.
Add
(
new
optionItem
()
{
Content
=
item
.
ChineseMean
,
IsAnswer
=
false
,
Name
=
""
,
ShowName
=
""
,
});
}
break
;
//根据中文意思选日语书写
case
3
:
title
=
tempWords
.
ChineseMean
;
options
.
Add
(
new
optionItem
()
{
Content
=
tempWords
.
WordWrite
,
IsAnswer
=
true
,
Name
=
""
,
ShowName
=
""
});
foreach
(
var
item
in
tempList
)
{
options
.
Add
(
new
optionItem
()
{
Content
=
item
.
WordWrite
,
IsAnswer
=
false
,
Name
=
""
,
ShowName
=
""
,
});
}
break
;
}
break
;
//根据中文意思选日语书写
case
3
:
break
;
options
=
options
?.
OrderBy
(
qitem
=>
Guid
.
NewGuid
())?.
ToList
();
for
(
var
j
=
1
;
j
<=
options
.
Count
;
j
++)
{
options
[
j
].
Name
=
Common
.
Plugin
.
StringHelper
.
ReturnEnChar
(
j
);
options
[
j
].
ShowName
=
Common
.
Plugin
.
StringHelper
.
ReturnEnChar
(
j
);
}
}
List
<
optionItem
>
options
=
new
List
<
optionItem
>();
reviewGroupList
.
Add
(
new
{
QuestionTypeName
=
"单选题"
,
...
...
Edu.WebApi/Controllers/Applet/AppletLoginController.cs
View file @
a6df4f52
...
...
@@ -155,7 +155,7 @@ namespace Edu.WebApi.Controllers.APP
//{
// return ApiResult.Failed(message: "用户不存在", new { Error = -1 });
//}
IUserInfoToken
mallUserInfo
=
new
ErpTokenUserInfo
{
uid
=
umodel
.
Id
.
ToString
(),
requestFrom
=
Common
.
Enum
.
ApiRequestFromEnum
.
MallMiniProgram
};
IUserInfoToken
mallUserInfo
=
new
ErpTokenUserInfo
{
uid
=
(
umodel
?.
Id
??
0
)
.
ToString
(),
requestFrom
=
Common
.
Enum
.
ApiRequestFromEnum
.
MallMiniProgram
};
#
region
JWT
IDateTimeProvider
provider
=
new
UtcDateTimeProvider
();
var
now
=
provider
.
GetNow
().
AddMinutes
(-
1
);
...
...
@@ -343,7 +343,7 @@ namespace Edu.WebApi.Controllers.APP
//{
// return ApiResult.Failed(message: "用户不存在", new { Error = -1 });
//}
IUserInfoToken
mallUserInfo
=
new
ErpTokenUserInfo
{
uid
=
umodel
.
Id
.
ToString
(),
requestFrom
=
Common
.
Enum
.
ApiRequestFromEnum
.
MallMiniProgram
};
IUserInfoToken
mallUserInfo
=
new
ErpTokenUserInfo
{
uid
=
(
umodel
?.
Id
??
0
)
.
ToString
(),
requestFrom
=
Common
.
Enum
.
ApiRequestFromEnum
.
MallMiniProgram
};
#
region
JWT
IDateTimeProvider
provider
=
new
UtcDateTimeProvider
();
var
now
=
provider
.
GetNow
().
AddMinutes
(-
1
);
...
...
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