|
@@ -171,10 +171,12 @@ namespace TEAMModelFunction
|
|
endTime = vote.endTime,
|
|
endTime = vote.endTime,
|
|
scode = vote.code,
|
|
scode = vote.code,
|
|
scope = vote.scope,
|
|
scope = vote.scope,
|
|
- classes = vote.classes,
|
|
|
|
- tmdids = vote.tmdids,
|
|
|
|
progress = "finish",
|
|
progress = "finish",
|
|
- owner = vote.owner
|
|
|
|
|
|
+ classes = vote.classes.IsNotEmpty() ? vote.classes : new List<string> { "" },
|
|
|
|
+ tmdids = vote.tmdids.IsNotEmpty() ? vote.tmdids : new List<string> { "" },
|
|
|
|
+ owner = vote.owner,
|
|
|
|
+ subjects = new List<string> { "" }
|
|
|
|
+
|
|
};
|
|
};
|
|
await client.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<ActivityData>(data,data.id, new Azure.Cosmos.PartitionKey(data.code));
|
|
await client.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<ActivityData>(data,data.id, new Azure.Cosmos.PartitionKey(data.code));
|
|
}
|
|
}
|
|
@@ -192,9 +194,10 @@ namespace TEAMModelFunction
|
|
scode = vote.code,
|
|
scode = vote.code,
|
|
scope = vote.scope,
|
|
scope = vote.scope,
|
|
progress = "finish",
|
|
progress = "finish",
|
|
- classes = vote.classes,
|
|
|
|
- owner = vote.owner
|
|
|
|
- // tmdids = vote.tmdids
|
|
|
|
|
|
+ classes = vote.classes.IsNotEmpty() ? vote.classes : new List<string> { "" },
|
|
|
|
+ owner = vote.owner,
|
|
|
|
+ tmdids = new List<string> { "" },
|
|
|
|
+ subjects = new List<string> { "" }
|
|
};
|
|
};
|
|
await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<ActivityData>(data,data.id, new Azure.Cosmos.PartitionKey(data.code));
|
|
await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<ActivityData>(data,data.id, new Azure.Cosmos.PartitionKey(data.code));
|
|
}
|
|
}
|