|
@@ -94,7 +94,7 @@ namespace TEAMModelFunction
|
|
data = new ActivityData
|
|
data = new ActivityData
|
|
{
|
|
{
|
|
id = info.id,
|
|
id = info.id,
|
|
- code = $"Activity-{info.owner}",
|
|
|
|
|
|
+ code = $"Activity-{info.school}",
|
|
type = "exam",
|
|
type = "exam",
|
|
name = info.name,
|
|
name = info.name,
|
|
startTime = info.startTime,
|
|
startTime = info.startTime,
|
|
@@ -104,7 +104,7 @@ namespace TEAMModelFunction
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
progress = "going",
|
|
progress = "going",
|
|
- owner = info.owner,
|
|
|
|
|
|
+ owner = info.school,
|
|
subjects = sub
|
|
subjects = sub
|
|
};
|
|
};
|
|
await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
|
|
await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
|
|
@@ -124,7 +124,7 @@ namespace TEAMModelFunction
|
|
progress = "going",
|
|
progress = "going",
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
- owner = info.owner,
|
|
|
|
|
|
+ owner = info.creatorId,
|
|
subjects = sub
|
|
subjects = sub
|
|
};
|
|
};
|
|
await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
|
|
await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
|
|
@@ -290,7 +290,7 @@ namespace TEAMModelFunction
|
|
data = new ActivityData
|
|
data = new ActivityData
|
|
{
|
|
{
|
|
id = info.id,
|
|
id = info.id,
|
|
- code = $"Activity-{info.owner}",
|
|
|
|
|
|
+ code = $"Activity-{info.school}",
|
|
type = "exam",
|
|
type = "exam",
|
|
name = info.name,
|
|
name = info.name,
|
|
startTime = info.startTime,
|
|
startTime = info.startTime,
|
|
@@ -300,7 +300,7 @@ namespace TEAMModelFunction
|
|
progress = "finish",
|
|
progress = "finish",
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
- owner = info.owner,
|
|
|
|
|
|
+ owner = info.school,
|
|
subjects = sub
|
|
subjects = sub
|
|
};
|
|
};
|
|
await client.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<ActivityData>(data, info.id, new Azure.Cosmos.PartitionKey(data.code));
|
|
await client.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<ActivityData>(data, info.id, new Azure.Cosmos.PartitionKey(data.code));
|
|
@@ -320,7 +320,7 @@ namespace TEAMModelFunction
|
|
progress = "finish",
|
|
progress = "finish",
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
tmdids = new List<string> { "" },
|
|
- owner = info.owner,
|
|
|
|
|
|
+ owner = info.creatorId,
|
|
subjects = sub
|
|
subjects = sub
|
|
};
|
|
};
|
|
await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<ActivityData>(data, info.id, new Azure.Cosmos.PartitionKey(data.code));
|
|
await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<ActivityData>(data, info.id, new Azure.Cosmos.PartitionKey(data.code));
|