Ejemplo n.º 1
0
        private async Task AddStudentsFlowAsync(Guid classId)
        {
            await AddStudentFlowAsync(classId);

            bool addAnotherStudent = SharedConsoleFlows.AskForBool("Add another student?");

            if (addAnotherStudent)
            {
                await AddStudentsFlowAsync(classId);
            }
        }
Ejemplo n.º 2
0
        private async Task AddBonusAssignmentFlowAsync(Guid testId)
        {
            bool isBonusAssignmentNeeded = SharedConsoleFlows.AskForBool($"Is there a bonus question?");

            if (isBonusAssignmentNeeded)
            {
                var addAssignmentRequest = new AddAssignmentRequest
                {
                    TestId            = testId,
                    NumberOfQuestions = 1
                };

                AddAssignmentResult addAssignmentResult = await _testController.AddAssignmentAsync(addAssignmentRequest);

                if (addAssignmentResult.ValidationMessages.Any())
                {
                    SharedConsoleFlows.PrintValidationMessages(addAssignmentResult.ValidationMessages);
                }
            }
        }