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
d7065bea
Commit
d7065bea
authored
Jan 28, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
65c8af14
67599ff6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
11 deletions
+30
-11
QuestionHelper.cs
Edu.Common/Data/QuestionHelper.cs
+8
-8
WordHelper.cs
Edu.Common/Plugin/WordHelper.cs
+4
-2
RB_Class_Config.cs
Edu.Model/Entity/Course/RB_Class_Config.cs
+5
-0
ClassConfigModule.cs
Edu.Module.Public/ClassConfigModule.cs
+1
-0
AnalysisQuestionTypeModule.cs
Edu.Module.Question/AnalysisQuestionTypeModule.cs
+11
-1
PublicController.cs
Edu.WebApi/Controllers/Public/PublicController.cs
+1
-0
No files found.
Edu.Common/Data/QuestionHelper.cs
View file @
d7065bea
...
...
@@ -219,10 +219,10 @@ namespace Edu.Common.Data
{
if
(!
string
.
IsNullOrEmpty
(
subItem
))
{
if
(
subItem
.
Contains
(
"答案解析:"
)
||
subItem
.
Contains
(
"解析:
"
))
if
(
subItem
.
Contains
(
"答案解析:"
)
||
subItem
.
Contains
(
"答案解析:"
)
||
subItem
.
Contains
(
"解析:"
)
||
subItem
.
Contains
(
"解析:
"
))
{
string
answerReg1
=
@"答案解析
:
"
;
string
answerReg2
=
@"解析
:
"
;
string
answerReg1
=
@"答案解析
[::]
"
;
string
answerReg2
=
@"解析
[::]
"
;
Regex
reg
=
new
Regex
(
answerReg1
);
Regex
reg2
=
new
Regex
(
answerReg2
);
string
[]
answerAnalysisArray
=
null
;
...
...
@@ -239,19 +239,19 @@ namespace Edu.Common.Data
model
.
AnswerAnalysis
=
answerAnalysisArray
.
Length
>
1
?
answerAnalysisArray
[
1
]
:
""
;
}
}
if
(
subItem
.
Contains
(
"答案:"
))
if
(
subItem
.
Contains
(
"答案:"
)
||
subItem
.
Contains
(
"答案:"
)
)
{
answerObj
=
subItem
;
var
answerArray
=
Regex
.
Split
(
subItem
,
"
答案:
"
);
var
answerArray
=
Regex
.
Split
(
subItem
,
"
[答][案][::]
"
);
if
(
answerArray
!=
null
&&
answerArray
.
Length
>
0
)
{
model
.
QuestionAnswer
=
answerArray
.
Length
>
1
?
answerArray
[
1
]
:
""
;
}
}
if
(
subItem
.
Contains
(
"难易程度:"
)
||
subItem
.
Contains
(
"难易度:
"
))
if
(
subItem
.
Contains
(
"难易程度:"
)
||
subItem
.
Contains
(
"难易程度:"
)
||
subItem
.
Contains
(
"难易度:"
)
||
subItem
.
Contains
(
"难易度:
"
))
{
string
easyReg1
=
@"难易程度
:
"
;
string
easyReg2
=
@"难易度
:
"
;
string
easyReg1
=
@"难易程度
[::]
"
;
string
easyReg2
=
@"难易度
[::]
"
;
Regex
reg
=
new
Regex
(
easyReg1
);
Regex
reg2
=
new
Regex
(
easyReg2
);
string
[]
easyTypeArray
=
null
;
...
...
Edu.Common/Plugin/WordHelper.cs
View file @
d7065bea
...
...
@@ -102,8 +102,9 @@ namespace Edu.Common.Plugin
string
para
=
paragraph
.
Text
;
foreach
(
DocumentObject
docObject
in
paragraph
.
ChildObjects
)
{
if
(
docObject
is
DocPicture
pic
)
if
(
docObject
.
DocumentObjectType
==
DocumentObjectType
.
Picture
)
{
DocPicture
pic
=
docObject
as
DocPicture
;
string
imageName
=
string
.
Format
(
@"WordImage_{0}.png"
,
DateTime
.
Now
.
Ticks
);
using
MemoryStream
ms
=
new
MemoryStream
(
pic
.
ImageBytes
);
Image
outputImg
=
Image
.
FromStream
(
ms
);
...
...
@@ -194,7 +195,8 @@ namespace Edu.Common.Plugin
Regex
reg1
=
new
Regex
(
pattern1
);
if
(
isBigType
)
{
string
pattern2
=
@"[\r\n][(][一二三四五六七八九十]*[)]"
;
//注意“[ ]”为word里面的空格(出现0-N次)
string
pattern2
=
@"[\r\n][ ]*[((][一二三四五六七八九十]*[))]"
;
Regex
reg2
=
new
Regex
(
pattern2
);
if
(
reg2
.
IsMatch
(
questionStr
))
{
...
...
Edu.Model/Entity/Course/RB_Class_Config.cs
View file @
d7065bea
...
...
@@ -46,5 +46,10 @@ namespace Edu.Model.Entity.Course
/// 修改时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 基础课时
/// </summary>
public
int
BasicHours
{
get
;
set
;
}
}
}
Edu.Module.Public/ClassConfigModule.cs
View file @
d7065bea
...
...
@@ -58,6 +58,7 @@ namespace Edu.Module.Public
{
nameof
(
RB_Class_Config_ViewModel
.
BasicMinutes
),
extModel
.
BasicMinutes
},
{
nameof
(
RB_Class_Config_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Class_Config_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
{
nameof
(
RB_Class_Config_ViewModel
.
BasicHours
),
extModel
.
BasicHours
},
};
flag
=
class_ConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Config_ViewModel
.
ConfigId
),
oldModel
.
ConfigId
));
}
...
...
Edu.Module.Question/AnalysisQuestionTypeModule.cs
View file @
d7065bea
...
...
@@ -173,7 +173,17 @@ namespace Edu.Module.Question
break
;
//单选题(数字)
case
"single-number"
:
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
data
);
try
{
if
(!
string
.
IsNullOrEmpty
(
data
))
{
obj
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
optionItem
>>(
data
);
}
}
catch
(
Exception
ex
)
{
string
str
=
ex
.
Message
;
}
break
;
}
return
obj
;
...
...
Edu.WebApi/Controllers/Public/PublicController.cs
View file @
d7065bea
...
...
@@ -464,6 +464,7 @@ namespace Edu.WebApi.Controllers.Public
BasicHourFee
=
base
.
ParmJObj
.
GetDecimal
(
"BasicHourFee"
),
BasicClassNum
=
base
.
ParmJObj
.
GetInt
(
"BasicClassNum"
),
BasicMinutes
=
base
.
ParmJObj
.
GetInt
(
"BasicMinutes"
),
BasicHours
=
base
.
ParmJObj
.
GetInt
(
"BasicHours"
),
};
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
...
...
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