|
@@ -41,7 +41,7 @@ namespace TEAMModelFunction
|
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
|
List<ExamInfo> exams = new List<ExamInfo>();
|
|
|
string pk = input[0].GetPropertyValue<string>("pk");
|
|
|
- if (!string.IsNullOrEmpty(pk) && pk.Equals("Exam")) {
|
|
|
+ if (!string.IsNullOrEmpty(pk) && pk.Equals("Exam",StringComparison.OrdinalIgnoreCase)) {
|
|
|
string code = input[0].GetPropertyValue<string>("code");
|
|
|
await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(queryText: $"select value(c) from c where c.id = '{input[0].Id}'", requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"{code}") }))
|
|
|
{
|
|
@@ -73,7 +73,7 @@ namespace TEAMModelFunction
|
|
|
&& exams[i].endTime.CompareTo(DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()) > 0 )
|
|
|
{*/
|
|
|
if (examClassResults.Count < 0 ) {
|
|
|
- if (exams[i].progress.Equals("going"))
|
|
|
+ if (exams[i].progress.Equals("going",StringComparison.OrdinalIgnoreCase))
|
|
|
{
|
|
|
|
|
|
//await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(exams[i], exams[i].id.ToString(), new Azure.Cosmos.PartitionKey($"{exams[i].code}"));
|
|
@@ -119,7 +119,7 @@ namespace TEAMModelFunction
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (exams[i].progress.Equals("finish"))
|
|
|
+ if (exams[i].progress.Equals("finish",StringComparison.OrdinalIgnoreCase))
|
|
|
{
|
|
|
for (int j = 0; j < exams[i].subjects.Count; j++)
|
|
|
{
|