public IActionResult WelcomeBack(string participantID, Sleepinesses?stanford) { var testName = _testNameGetter.Get(participantID); if (stanford.HasValue) { _stanfordRepository.Save(participantID, testName, stanford.Value); } var testInstructionsViewModel = _testInstructionsViewModelGetter.Get(participantID); return(View(new TestWelcomeBackViewModel(participantID, testInstructionsViewModel))); }
public IActionResult Index(string participantID, Sleepinesses?stanford) { _stanfordRepository.Save(participantID, "Immediate", stanford); var viewModel = new EncodingIndexViewModel(participantID, stanford, _config.ImageDisplayDurationInMilliseconds, _config.AttentionResetDisplayDurationInMilliseconds, _config.NumberDisplayProbabilityPercentage, _config.NumberCheckIntervalInMilliseconds, _config.NumberDisplayThresholdInMilliseconds, PhaseSetsGetter.EncodingImageTypes, _config.ImageTypesImageUrlTemplate, _config.ImageTypesAudioUrlTemplate); return(View(viewModel)); }
public IActionResult EncodingInstructions(string participantID, Sleepinesses?stanford, string nextActionAfterImageCheck, bool showSpacebarOrientation) { _stanfordRepository.Save(participantID, "Immediate", stanford); var stimuliCount = _phaseSetsGetter.Get(participantID).EncodingCount; var targetCount = stimuliCount / 2; return(View(new EncodingInstructionsViewModel(participantID, nextActionAfterImageCheck, showSpacebarOrientation, stanford, stimuliCount, targetCount))); }