|
@@ -1101,6 +1101,7 @@ namespace TEAMModelOS.Controllers
|
|
|
//bool isAns = true;
|
|
|
bool isAns = result.studentScores[newIndex].Exists(s => s == -1);
|
|
|
HttpContext.Items.TryGetValue("Scope", out object scope);
|
|
|
+ int userType = $"{scope}".Equals(Constant.ScopeStudent) ? 2 : 1;
|
|
|
if (flag)
|
|
|
{
|
|
|
result.progress = true;
|
|
@@ -1139,7 +1140,7 @@ namespace TEAMModelOS.Controllers
|
|
|
else
|
|
|
{
|
|
|
if (request.TryGetProperty("artId", out JsonElement artId) && request.TryGetProperty("quotaId", out JsonElement quotaId)) {
|
|
|
- await getArtInfoAsync(client, artId.GetString(), school, result.sum[newIndex], id.GetString(), subjectId.GetString(), quotaId.GetString(), userId, picture, name);
|
|
|
+ await getArtInfoAsync(client, artId.GetString(), school, result.sum[newIndex], id.GetString(), subjectId.GetString(), quotaId.GetString(), userId, picture, name,userType);
|
|
|
};
|
|
|
|
|
|
if ($"{scope}".Equals(Constant.ScopeStudent))
|
|
@@ -1174,7 +1175,7 @@ namespace TEAMModelOS.Controllers
|
|
|
return BadRequest();
|
|
|
}
|
|
|
}
|
|
|
- private async Task getArtInfoAsync(CosmosClient client, string artId, string school, double score, string acId, string subject, string quotaId, string userid, string picture, string name)
|
|
|
+ private async Task getArtInfoAsync(CosmosClient client, string artId, string school, double score, string acId, string subject, string quotaId, string userid, string picture, string name,int userType)
|
|
|
{
|
|
|
var aresponse = await client.GetContainer("TEAMModelOS", "Common").ReadItemStreamAsync(artId, new PartitionKey($"Art-{school}"));
|
|
|
ArtEvaluation art;
|
|
@@ -1221,6 +1222,8 @@ namespace TEAMModelOS.Controllers
|
|
|
studentId = userid,
|
|
|
picture = picture,
|
|
|
studentName = name,
|
|
|
+ school = school,
|
|
|
+ userType = userType,
|
|
|
artId = artId,
|
|
|
classIds = art.classes,
|
|
|
};
|