mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-16 18:08:28 +00:00
Added the choice of simulated participants to the test situation of the BeyondFacts Lab
This commit is contained in:
13 files changed
+557
-5
No files matched your search
@@ -113,12 +113,19 @@ public sealed partial class BeyondFactsLabStore
|
||||
throw new InvalidDataException("This version of AI Studio cannot open the form.", exception);
|
||||
}
|
||||
|
||||
if (form is null || form.SchemaVersion is < 1 or > BflStepFormData.CURRENT_SCHEMA_VERSION || IsNull(form.Values) || form.CardSort is { } cardSort && IsBroken(cardSort))
|
||||
if (form is null || form.SchemaVersion is < 1 or > BflStepFormData.CURRENT_SCHEMA_VERSION || IsNull(form.Values) || form.CardSort is { } cardSort && IsBroken(cardSort) || form.Simulation is { } simulation && IsBroken(simulation))
|
||||
throw new InvalidDataException("This version of AI Studio cannot open the form.");
|
||||
|
||||
return form;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether a stored simulation lacks one of its parts, which JSON can make null, or names a mode this version
|
||||
/// does not know.
|
||||
/// </summary>
|
||||
/// <param name="simulation">The simulation.</param>
|
||||
private static bool IsBroken(BflSimulation simulation) => !Enum.IsDefined(simulation.Mode) || IsNull(simulation.People) || simulation.People.Any(IsNull);
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether a stored card sort lacks one of its parts, which JSON can make null.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user