Commit 5e75b49c authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents c7c417dc 7d189fa4
......@@ -93,9 +93,8 @@ namespace Edu.Model.Entity.Question
public string Answer { get; set; }
/// <summary>
/// 问题分数
/// 填空题(答案顺序打乱也判正确)
/// </summary>
public decimal Score { get; set; }
public int IsMutex { get; set; }
}
}
......@@ -27,7 +27,7 @@ namespace Edu.Model.ViewModel.Question
}
/// <summary>
/// 选择题选项列表
/// 选择题选项列表【单选、多选、判断题】
/// </summary>
public class optionItem
{
......@@ -47,4 +47,15 @@ namespace Edu.Model.ViewModel.Question
public bool IsAnswer { get; set; }
}
/// <summary>
/// 填空题、简答题
/// </summary>
public class fillInItem
{
/// <summary>
/// 选项内容
/// </summary>
public string Content { get; set; }
}
}
\ No newline at end of file
......@@ -870,7 +870,7 @@ namespace Edu.Module.Course
{
new
{
CostTypeId = fcmodel.CostTypeId,
fcmodel.CostTypeId,
Number = 1,
OriginalMoney = backModel.RealityBackMoney,
UnitPrice = backModel.RealityBackMoney,
......
......@@ -20,7 +20,7 @@ namespace Edu.Module.Question
{
var obj = new object();
switch (key)
{
{
//单选题
case "single":
obj = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
......@@ -29,6 +29,34 @@ namespace Edu.Module.Question
case "multiple":
obj = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
break;
//填空题
case "fill-in":
obj = Common.Plugin.JsonHelper.DeserializeObject<List<fillInItem>>(data);
break;
//判断题
case "judge":
obj = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
break;
//简答题
case "short-answer":
obj = data;
break;
//名词解释
case "noun-explanation":
obj = data;
break;
//论述题
case "essay-question":
obj = data;
break;
//计算题
case "calculation":
obj = data;
break;
//分录题
case "entry-problem":
obj = Common.Plugin.JsonHelper.DeserializeObject<List<fillInItem>>(data);
break;
}
return obj;
}
......
......@@ -89,7 +89,7 @@ namespace Edu.Module.Question
{nameof(RB_Question_ViewModel.UpdateBy),model.UpdateBy },
{nameof(RB_Question_ViewModel.UpdateTime),model.UpdateTime },
{nameof(RB_Question_ViewModel.Answer),model.Answer },
{nameof(RB_Question_ViewModel.Score),model.Score },
{nameof(RB_Question_ViewModel.IsMutex),model.IsMutex },
};
flag = questionRepository.Update(fileds, new WhereHelper(nameof(RB_Question_ViewModel.QuestionId), model.QuestionId));
}
......
using Edu.Model.ViewModel.Question;
using Edu.Common.Enum;
using Edu.Model.ViewModel.Question;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -55,6 +56,7 @@ WHERE 1=1
SELECT A.*,IFNULL(B.`Name` ,'') AS QuestionTypeName
FROM RB_Question AS A LEFT JOIN RB_Question_Type B ON A.QuestionTypeId=B.QId
WHERE 1=1 ");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Question_ViewModel.Status), (int)DateStateEnum.Normal);
if (query == null)
{
return new List<RB_Question_ViewModel>();
......@@ -70,7 +72,7 @@ WHERE 1=1 ");
builder.AppendFormat(" AND A.{0} LIKE @Title ", nameof(RB_Question_ViewModel.Title));
parameters.Add("Title", "%" + query.Title.Trim() + "%");
}
return GetPage<RB_Question_ViewModel>(pageIndex,pageSize,out rowsCount,builder.ToString(),parameters).ToList();
return GetPage<RB_Question_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
}
}
......
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