Skip to content
Snippets Groups Projects
Commit a6fe66c1 authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- fixed do editor compile single file (hidden files)

parent 8022fe4d
Branches
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ namespace ClientServer.Helpers
/// </summary>
public static class Constants
{
public static string VersionString = "2.20.4";
public static string VersionString = "2.20.5";
/// <summary>
/// this is only set once at program.cs!!
......
......@@ -120,6 +120,7 @@ namespace ClientServer.Controllers.Core.Testing
var participation = await _context.ExerciseReleaseWithUserAsParticipations
.Include(p => p.ExerciseRelease)
.Include(p => p.ExerciseRelease.Exercise.CodeTemplates)
.FirstOrDefaultAsync(p => p.UserId == userId
//&& p.ExerciseRelease.IsReleased //compiling is ok
&& p.ExerciseRelease.GeneratedCode == runCompileSingleFileCommand.GeneratedCode);
......@@ -180,6 +181,21 @@ namespace ClientServer.Controllers.Core.Testing
MainFile = mainFile,
MainFileId = mainFile.Id,
};
var codeTemplate = participation.ExerciseRelease.Exercise.CodeTemplates
.FirstOrDefault(p => p.PLangId == solution.PLangId)
;
if (codeTemplate == null)
{
await
Response.WriteAsync(
Jc.Serialize(new BasicResponse(ResponseCode.NotFound, "codeTemplate not found")));
return;
}
//make readonly files up-to-date
var errorMsg = UserSolutionHelper.ReplaceReadonlyFiles(solution, codeTemplate, false, true);
var test = new AllTest
{
......@@ -457,7 +473,7 @@ namespace ClientServer.Controllers.Core.Testing
return;
}
if (runCompileSingleFileCommand.Files == null || runCompileSingleFileCommand.Files.Count == 0)
if (runCompileSingleFileCommand.Files == null || runCompileSingleFileCommand.Files.Count == 0)
{
await
Response.WriteAsync(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment