|
@@ -154,9 +154,9 @@ namespace TEAMModelOS.Services.Common
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<StuActivity>(vote.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReadItemAsync<StuActivity>(vote.id, new PartitionKey($"Activity-{userid}"));
|
|
activity.taskStatus = taskStatus;
|
|
activity.taskStatus = taskStatus;
|
|
- await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<StuActivity>(activity, vote.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReplaceItemAsync<StuActivity>(activity, vote.id, new PartitionKey($"Activity-{userid}"));
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -164,9 +164,9 @@ namespace TEAMModelOS.Services.Common
|
|
{
|
|
{
|
|
if (ex.Status == 404)
|
|
if (ex.Status == 404)
|
|
{
|
|
{
|
|
- StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<StuActivity>(vote.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReadItemAsync<StuActivity>(vote.id, new PartitionKey($"Activity-{userid}"));
|
|
activity.taskStatus = taskStatus;
|
|
activity.taskStatus = taskStatus;
|
|
- await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<StuActivity>(activity, vote.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReplaceItemAsync<StuActivity>(activity, vote.id, new PartitionKey($"Activity-{userid}"));
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -425,7 +425,7 @@ namespace TEAMModelOS.Services.Common
|
|
}
|
|
}
|
|
List<StuActivity> datas = new List<StuActivity>();
|
|
List<StuActivity> datas = new List<StuActivity>();
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
- string containerId = "";
|
|
|
|
|
|
+ string containerId = "Student";
|
|
string PartitionKey = "";
|
|
string PartitionKey = "";
|
|
if (!string.IsNullOrWhiteSpace(school) && userType.Equals("schoolid"))
|
|
if (!string.IsNullOrWhiteSpace(school) && userType.Equals("schoolid"))
|
|
{
|
|
{
|
|
@@ -434,7 +434,7 @@ namespace TEAMModelOS.Services.Common
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- containerId = "Teacher";
|
|
|
|
|
|
+ containerId = "Student";
|
|
PartitionKey = $"Activity-{id}";
|
|
PartitionKey = $"Activity-{id}";
|
|
}
|
|
}
|
|
string querySchool = $" SELECT distinct value c FROM c {joinSqlSubjects} where {stimesql} {etimesql} and c.pk='Activity' {typesql} {andSqlSubjects} ";
|
|
string querySchool = $" SELECT distinct value c FROM c {joinSqlSubjects} where {stimesql} {etimesql} and c.pk='Activity' {typesql} {andSqlSubjects} ";
|
|
@@ -674,9 +674,9 @@ namespace TEAMModelOS.Services.Common
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<StuActivity>(survey.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReadItemAsync<StuActivity>(survey.id, new PartitionKey($"Activity-{userid}"));
|
|
activity.taskStatus = taskStatus;
|
|
activity.taskStatus = taskStatus;
|
|
- await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<StuActivity>(activity, survey.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReplaceItemAsync<StuActivity>(activity, survey.id, new PartitionKey($"Activity-{userid}"));
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -684,9 +684,9 @@ namespace TEAMModelOS.Services.Common
|
|
{
|
|
{
|
|
if (ex.Status == 404)
|
|
if (ex.Status == 404)
|
|
{
|
|
{
|
|
- StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<StuActivity>(survey.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ StuActivity activity = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReadItemAsync<StuActivity>(survey.id, new PartitionKey($"Activity-{userid}"));
|
|
activity.taskStatus = taskStatus;
|
|
activity.taskStatus = taskStatus;
|
|
- await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<StuActivity>(activity, survey.id, new PartitionKey($"Activity-{userid}"));
|
|
|
|
|
|
+ await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Student").ReplaceItemAsync<StuActivity>(activity, survey.id, new PartitionKey($"Activity-{userid}"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|