|
@@ -17,6 +17,7 @@ using TEAMModelOS.SDK.Extension;
|
|
using TEAMModelOS.SDK.Models;
|
|
using TEAMModelOS.SDK.Models;
|
|
using TEAMModelOS.SDK.Models.Cosmos;
|
|
using TEAMModelOS.SDK.Models.Cosmos;
|
|
using TEAMModelOS.SDK.Models.Cosmos.Common;
|
|
using TEAMModelOS.SDK.Models.Cosmos.Common;
|
|
|
|
+using TEAMModelOS.SDK.Models.Service;
|
|
using TEAMModelOS.SDK.Services;
|
|
using TEAMModelOS.SDK.Services;
|
|
using static TEAMModelOS.SDK.StudentService;
|
|
using static TEAMModelOS.SDK.StudentService;
|
|
|
|
|
|
@@ -130,12 +131,12 @@ namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
var (id, name, pic, school) = HttpContext.GetAuthTokenInfo();
|
|
var (id, name, pic, school) = HttpContext.GetAuthTokenInfo();
|
|
//if (!HttpContext.Items.TryGetValue("Scope", out object _scope)) return BadRequest();
|
|
//if (!HttpContext.Items.TryGetValue("Scope", out object _scope)) return BadRequest();
|
|
- (List<StuActivity> datas, string continuationToken) = await ActivityStudentService.FindActivity(request, id, school, _azureCosmos, _azureRedis);
|
|
|
|
- List<(string id, string scope, string name, string source, List<string> cIds, int qamode, string createId, Dictionary<string, JsonElement> ext, long time, string owner)> eIds = new();
|
|
|
|
|
|
+ (List<ExamInfo> datas, string continuationToken) = await ExamService.FindExam(request, id, school, _azureCosmos);
|
|
|
|
+ List<(string id, string scope, string name, string source, List<string> cIds, int qamode, string createId, dynamic ext, long time, string owner)> eIds = new();
|
|
//List<(string id, string scope, string name, List<string> cIds, string createId,long time)> wIds = new();
|
|
//List<(string id, string scope, string name, List<string> cIds, string createId,long time)> wIds = new();
|
|
foreach (var data in datas)
|
|
foreach (var data in datas)
|
|
{
|
|
{
|
|
- eIds.Add((data.id, data.scope, data.name, data.source, data.classIds, data.qamode, data.creatorId, data.ext, data.createTime, data.owner));
|
|
|
|
|
|
+ eIds.Add((data.id, data.scope, data.name, data.source, data.classes, data.qamode, data.creatorId, data.examType, data.createTime, data.owner));
|
|
}
|
|
}
|
|
if (eIds.Count == 0)
|
|
if (eIds.Count == 0)
|
|
{
|
|
{
|
|
@@ -194,8 +195,8 @@ namespace TEAMModelOS.Controllers
|
|
e.scope,
|
|
e.scope,
|
|
e.source,
|
|
e.source,
|
|
e.createId,
|
|
e.createId,
|
|
- e.qamode,
|
|
|
|
e.ext,
|
|
e.ext,
|
|
|
|
+ e.qamode,
|
|
e.time,
|
|
e.time,
|
|
e.owner,
|
|
e.owner,
|
|
point = pst.Where(s => s.key == e.id).Select(c => c.po),
|
|
point = pst.Where(s => s.key == e.id).Select(c => c.po),
|
|
@@ -208,9 +209,9 @@ namespace TEAMModelOS.Controllers
|
|
s.name,
|
|
s.name,
|
|
s.scope,
|
|
s.scope,
|
|
s.source,
|
|
s.source,
|
|
|
|
+ s.ext,
|
|
s.createId,
|
|
s.createId,
|
|
s.qamode,
|
|
s.qamode,
|
|
- s.ext,
|
|
|
|
s.time,
|
|
s.time,
|
|
s.owner,
|
|
s.owner,
|
|
point = s.point.FirstOrDefault(),
|
|
point = s.point.FirstOrDefault(),
|
|
@@ -533,7 +534,7 @@ namespace TEAMModelOS.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private async Task<List<(string eId, string sub, string cId, string cname, List<string> sIds, List<double> sum)>> getExamClassResult(List<(string id, string scope, string name, string source, List<string> cIds, int qamode, string createId, Dictionary<string, JsonElement> ext, long time, string owner)> eIds, CosmosClient client)
|
|
|
|
|
|
+ private async Task<List<(string eId, string sub, string cId, string cname, List<string> sIds, List<double> sum)>> getExamClassResult(List<(string id, string scope, string name, string source, List<string> cIds, int qamode, string createId, dynamic ext,long time, string owner)> eIds, CosmosClient client)
|
|
{
|
|
{
|
|
List<(string eId, string sub, string cId, string cname, List<string> sIds, List<double> sum)> classResults = new();
|
|
List<(string eId, string sub, string cId, string cname, List<string> sIds, List<double> sum)> classResults = new();
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(
|