Browse Source

HiTeach API 上傳評測API 調整上傳內容

jeff 4 years ago
parent
commit
79f90e339b
1 changed files with 1 additions and 2 deletions
  1. 1 2
      TEAMModelOS/Controllers/Client/HiTeachController.cs

+ 1 - 2
TEAMModelOS/Controllers/Client/HiTeachController.cs

@@ -792,7 +792,6 @@ namespace TEAMModelOS.Controllers.Client
                 //ExamInfo內容取得、調整
                 string blobContainer = (dbExamInfo.range == "school" && dbExamInfo.scope == "school" && dbExamInfo.school != null) ? dbExamInfo.school : id; //blob容器
                 dbExamInfo.source = "1"; //評測來源固定為  1:課中評量 
-                dbExamInfo.progress = "going"; //進行中(才會觸發計算分數)
                 //UPDATE
                 var examResponse = _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Common").UpsertItemAsync(dbExamInfo, new PartitionKey(dbExamInfo.code)).GetAwaiter().GetResult();
                 
@@ -826,7 +825,7 @@ namespace TEAMModelOS.Controllers.Client
                             string studentId = examClassResultRow.studentIds[i];
                             string fileName = examId + "/" + subjectId + "/" + studentId;
                             string blob = fileName + "/" + "ans.json";
-                            await _azureStorage.UploadFileByContainer(blobContainer, examClassResultRow.studentAnswersArray[i].ToJsonString(), "exam", blob);
+                            await _azureStorage.UploadFileByContainer(blobContainer, examClassResultRow.studentAnswersArray[i].ToJsonString(), "exam", blob, false);
                             List<string> studenrAnswerRow = new List<string>();
                             studenrAnswerRow.Add(blob);
                             examClassResultUpd.studentAnswers.Add(studenrAnswerRow);