|
@@ -83,7 +83,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
foreach (var obj in value.EnumerateArray())
|
|
|
{
|
|
|
string statusNow = obj.GetProperty("status").ToString();
|
|
|
- if(statusNow == "join") //成為老師的才放入
|
|
|
+ if(statusNow.Equals("join")) //成為老師的才放入
|
|
|
{
|
|
|
dynamic schoolExtobj = new ExpandoObject();
|
|
|
var schoolJson = await client.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync($"{obj.GetProperty("schoolId")}", new PartitionKey("Base"));
|
|
@@ -588,7 +588,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
if (!request.TryGetProperty("grant_type", out JsonElement grant_type)) return BadRequest();
|
|
|
string partitionid = string.Empty;
|
|
|
string container = string.Empty;
|
|
|
- if (grant_type.ToString() == "school")
|
|
|
+ if (grant_type.ToString() .Equals("school"))
|
|
|
{
|
|
|
if (!request.TryGetProperty("school_code", out JsonElement school_code_json))
|
|
|
{
|
|
@@ -651,7 +651,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
string order = "createTime"; //排序項目
|
|
|
if (request.TryGetProperty("order", out JsonElement order_json))
|
|
|
{
|
|
|
- if(order_json.ToString() == "useCount")
|
|
|
+ if(order_json.ToString().Equals("useCount"))
|
|
|
{
|
|
|
order = order_json.ToString();
|
|
|
}
|
|
@@ -756,7 +756,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
queryWhere += $" AND ( {queryOptionForGrade} )";
|
|
|
}
|
|
|
//科目ID
|
|
|
- if (request.TryGetProperty("subjectId", out JsonElement subjectId) && container == "School")
|
|
|
+ if (request.TryGetProperty("subjectId", out JsonElement subjectId) && container .Equals("school"))
|
|
|
{
|
|
|
queryWhere += $" AND c.subjectId = '{subjectId}'";
|
|
|
}
|
|
@@ -932,7 +932,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
}
|
|
|
if (!string.IsNullOrWhiteSpace(stulist))
|
|
|
{
|
|
|
- string pk = (grant_type.GetString() == "school") ? $"StuList-{school_code}" : $"StuList";
|
|
|
+ string pk = (grant_type.GetString() .Equals("school")) ? $"StuList-{school_code}" : $"StuList";
|
|
|
var querystl = $"SELECT c.students, c.tmids FROM c WHERE c.id = '{stulist}'";
|
|
|
Dictionary<string, List<string>> stuDic = new Dictionary<string, List<string>>();
|
|
|
List<string> tmidList = new List<string>();
|
|
@@ -1103,7 +1103,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
//※規則 owner:"school" => 校園評測 "teacher" => 個人評測
|
|
|
//※規則 scope:"school" => 校本班級 "private" => 個人班級
|
|
|
//※規則 BLOB容器: scope:"school" => {學校ID}下 scope:"private" => {個人ID}下
|
|
|
- string blobContainer = (!string.IsNullOrWhiteSpace(dbExamInfo.school) && dbExamInfo.scope == "school") ? dbExamInfo.school : id; //blob容器
|
|
|
+ string blobContainer = (!string.IsNullOrWhiteSpace(dbExamInfo.school) && dbExamInfo.scope .Equals("school")) ? dbExamInfo.school : id; //blob容器
|
|
|
//dbExamInfo.source = "1"; //評測來源固定為 1:課中評量(不應由API擅自變更)
|
|
|
|
|
|
//取得課堂紀錄下的試卷資料(blob)、複製到評測紀錄下
|
|
@@ -1125,7 +1125,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
string sourceBlobPath = recordPaperInfoDic["blob"];
|
|
|
Azure.Pageable<BlobItem> sourceBlobs = blobPrivateContainer.GetBlobs(prefix: sourceBlobPath);
|
|
|
string destBlobPath = $"exam/{dbExamInfo.id}/paper/{recordPaperInfoDic["id"]}/"; //拷貝對象路徑 path:exam/{評測ID}/paper/{試卷ID}/
|
|
|
- if (targetScope == "school") //校本
|
|
|
+ if (targetScope .Equals("school")) //校本
|
|
|
{
|
|
|
string schoolId = dbExamInfo.school;
|
|
|
var blobSchoolContainer = _azureStorage.GetBlobContainerClient(schoolId);
|
|
@@ -1339,7 +1339,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
|
|
|
foreach (var syllabus in syllabuses)
|
|
|
{
|
|
|
- if (syllabus.pid == "")
|
|
|
+ if (syllabus.pid.Equals(""))
|
|
|
nodes.Add(new SyllabusNode { id = syllabus.id, name = syllabus.name });
|
|
|
else
|
|
|
{
|