|
@@ -1555,6 +1555,14 @@ namespace TEAMModelOS.Controllers
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ foreach (SDK.Models.Cosmos.Common.Scoring ss in attr)
|
|
|
+ {
|
|
|
+ //ss.items.Add(ss.items.Where(x => x.scores.))
|
|
|
+ foreach (Item item in ss.items)
|
|
|
+ {
|
|
|
+ item.scores = item.scores.Where(x => x.tmdId.Equals(tId.GetString())).ToList();
|
|
|
+ }
|
|
|
+ }
|
|
|
return Ok(new { attr, paper = info.papers[index].blob });
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -1672,7 +1680,14 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
}
|
|
|
await redisClient.HashSetAsync($"Exam:Scoring:{id}-{subjectId}", stuId.ToString(), new { info = tmds, ans = blob, score = sc }.ToJsonString());*/
|
|
|
-
|
|
|
+ //var its = value.Where(x => x.items.s)
|
|
|
+ List<SDK.Models.Cosmos.Common.Scoring> val = new List<SDK.Models.Cosmos.Common.Scoring>();
|
|
|
+ foreach (SDK.Models.Cosmos.Common.Scoring ss in value) {
|
|
|
+ //ss.items.Add(ss.items.Where(x => x.scores.))
|
|
|
+ foreach (Item item in ss.items) {
|
|
|
+ item.scores = item.scores.Where(x => x.tmdId.Equals(tId.GetString())).ToList();
|
|
|
+ }
|
|
|
+ }
|
|
|
return Ok(value);
|
|
|
}
|
|
|
else
|
|
@@ -1725,6 +1740,11 @@ namespace TEAMModelOS.Controllers
|
|
|
}*/
|
|
|
//选取后,缓存池相应的减少,以便于分配给其他的老师
|
|
|
//await redisClient.HashSetAsync($"Exam:Scoring:{id}-{subjectId}", sId.ToString(), new { info = tmds, ans = blob, score = sc }.ToJsonString());
|
|
|
+ //ss.items.Add(ss.items.Where(x => x.scores.))
|
|
|
+ foreach (Item its in item.items)
|
|
|
+ {
|
|
|
+ its.scores = its.scores.Where(x => x.tmdId.Equals(tId.GetString())).ToList();
|
|
|
+ }
|
|
|
return Ok(item);
|
|
|
}
|
|
|
|