|
@@ -158,7 +158,7 @@ namespace IES.ExamServer.Controllers
|
|
client.DefaultRequestHeaders.Remove(Constant._X_Auth_AuthToken);
|
|
client.DefaultRequestHeaders.Remove(Constant._X_Auth_AuthToken);
|
|
}
|
|
}
|
|
client.DefaultRequestHeaders.Add(Constant._X_Auth_AuthToken, teacher.x_auth_token);
|
|
client.DefaultRequestHeaders.Add(Constant._X_Auth_AuthToken, teacher.x_auth_token);
|
|
- HttpResponseMessage message = await client.PostAsJsonAsync($"{CenterUrl}/blob/sas-read", new { containerName = $"{evaluationClient.ownerId}" });
|
|
|
|
|
|
+ HttpResponseMessage message = await client.PostAsJsonAsync($"{CenterUrl}/blob/sas-read", new { containerName = $"{dataInfo.evaluationCloud.ownerId}" });
|
|
string sas = string.Empty;
|
|
string sas = string.Empty;
|
|
string url = string.Empty;
|
|
string url = string.Empty;
|
|
string cnt = string.Empty;
|
|
string cnt = string.Empty;
|
|
@@ -176,7 +176,7 @@ namespace IES.ExamServer.Controllers
|
|
}
|
|
}
|
|
var httpClient = _httpClientFactory.CreateClient();
|
|
var httpClient = _httpClientFactory.CreateClient();
|
|
string packagePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "package");
|
|
string packagePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "package");
|
|
- string evaluationPath = Path.Combine(packagePath, evaluationClient.id!);
|
|
|
|
|
|
+ string evaluationPath = Path.Combine(packagePath, dataInfo.evaluationCloud.id!);
|
|
//删除文件夹
|
|
//删除文件夹
|
|
FileHelper.DeleteFolder(evaluationPath);
|
|
FileHelper.DeleteFolder(evaluationPath);
|
|
string evaluationDataPath = Path.Combine(evaluationPath, "data");
|
|
string evaluationDataPath = Path.Combine(evaluationPath, "data");
|
|
@@ -304,8 +304,8 @@ namespace IES.ExamServer.Controllers
|
|
{
|
|
{
|
|
Directory.CreateDirectory(zipPath);
|
|
Directory.CreateDirectory(zipPath);
|
|
}
|
|
}
|
|
- string zipFilePath = Path.Combine(zipPath, $"{evaluationClient.id}-{evaluationClient.blobHash}.zip");
|
|
|
|
- var zipInfo = ZipHelper.CreatePasswordProtectedZip(evaluationPath, zipFilePath, evaluationClient.openCode!);
|
|
|
|
|
|
+ string zipFilePath = Path.Combine(zipPath, $"{dataInfo.evaluationCloud.id}-{dataInfo.evaluationCloud.blobHash}.zip");
|
|
|
|
+ var zipInfo = ZipHelper.CreatePasswordProtectedZip(evaluationPath, zipFilePath, dataInfo.evaluationCloud.openCode!);
|
|
|
|
|
|
if (zipInfo.res)
|
|
if (zipInfo.res)
|
|
{
|
|
{
|