Commit 5a153466 authored by 黄奎's avatar 黄奎

页面修改

parent fc19e487
...@@ -30,5 +30,17 @@ namespace Edu.Common.Enum.Course ...@@ -30,5 +30,17 @@ namespace Edu.Common.Enum.Course
/// </summary> /// </summary>
[EnumField("阅读理解")] [EnumField("阅读理解")]
ReadingComprehensio = 3, ReadingComprehensio = 3,
/// <summary>
/// 文字词汇
/// </summary>
[EnumField("文字词汇")]
WordVocabulary = 4,
/// <summary>
/// 语法
/// </summary>
[EnumField("语法")]
Grammar =5
} }
} }
\ No newline at end of file
...@@ -92,7 +92,7 @@ namespace Edu.Common.Plugin ...@@ -92,7 +92,7 @@ namespace Edu.Common.Plugin
{ {
QuestionWordData questionWordData = new QuestionWordData(); QuestionWordData questionWordData = new QuestionWordData();
// \r\n【图一】\r\n // \r\n【图一】\r\n
string imgPattern = @"\r\n[【][图][一二三四五六七八九十]*[】]"; string imgPattern = @"[【][图][一二三四五六七八九十]*[】]";
Regex imgReg = new Regex(imgPattern); Regex imgReg = new Regex(imgPattern);
//判断是否有图片 //判断是否有图片
if (imgReg.IsMatch(questionStr)) if (imgReg.IsMatch(questionStr))
...@@ -101,6 +101,7 @@ namespace Edu.Common.Plugin ...@@ -101,6 +101,7 @@ namespace Edu.Common.Plugin
var imgMatchs = Regex.Matches(questionStr, imgPattern); var imgMatchs = Regex.Matches(questionStr, imgPattern);
if (imgMatchs != null && imgMatchs.Count > 0) if (imgMatchs != null && imgMatchs.Count > 0)
{ {
//"【图十】【图三】"
foreach (var item in imgMatchs) foreach (var item in imgMatchs)
{ {
//获取文档中“【图一】、【图二】...”中的“一、二” //获取文档中“【图一】、【图二】...”中的“一、二”
......
...@@ -7,7 +7,7 @@ namespace Edu.Test ...@@ -7,7 +7,7 @@ namespace Edu.Test
static void Main(string[] args) static void Main(string[] args)
{ {
string filePath = ""; string filePath = "";
filePath = @"C:/Users/qiaoyajun/Desktop/10年7月N3题库-朱俊贤 - 副本.docx"; filePath = @"C:/Users/qiaoyajun/Desktop/源模板.docx";
//filePath = @"C:/Users/qiaoyajun/Desktop/EduWordTemplate.doc"; //filePath = @"C:/Users/qiaoyajun/Desktop/EduWordTemplate.doc";
var data = Common.Data.QuestionHelper.GetWordQuestionData(filePath); var data = Common.Data.QuestionHelper.GetWordQuestionData(filePath);
Console.WriteLine(Common.Plugin.JsonHelper.Serialize(data)); Console.WriteLine(Common.Plugin.JsonHelper.Serialize(data));
......
...@@ -750,6 +750,12 @@ namespace Edu.WebApi.Controllers.Course ...@@ -750,6 +750,12 @@ namespace Edu.WebApi.Controllers.Course
case "阅读理解": case "阅读理解":
Category = QuestionCategoryEnum.ReadingComprehensio; Category = QuestionCategoryEnum.ReadingComprehensio;
break; break;
case "文字词汇":
Category = QuestionCategoryEnum.WordVocabulary;
break;
case "语法":
Category = QuestionCategoryEnum.Grammar;
break;
} }
} }
var questionTypeModel = questionTypeList?.Where(qitem => qitem.Name == item.QuestionTypeName)?.FirstOrDefault(); var questionTypeModel = questionTypeList?.Where(qitem => qitem.Name == item.QuestionTypeName)?.FirstOrDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment