/// <summary>
 /// Displays all students test results for one chosen test in the StudentResultView
 /// </summary>
 /// <param name="testId"></param>
 public void DisplayStudentResult(int testId)
 {
     DisplayResult.Clear();
     foreach (TestResult tr in StudentTestResults.ToList())
     {
         foreach (Student student in AllStudents)
         {
             if (tr.TestId == testId && student.StudentId == tr.StudentId)
             {
                 DisplayResult.Add($"TestId: {tr.TestId}\nNamn: {student.FirstName} {student.LastName}\nPoäng: {tr.TotalPoints}");
             }
         }
     }
 }
 /// <summary>
 /// Displays all the tests that have been finished
 /// </summary>
 public void DisplayAllTests()
 {
     GradedTests.Clear();
     foreach (TestResult tr in StudentTestResults.ToList())
     {
         foreach (Test t in AllTests.ToList())
         {
             if (t.TestId == tr.TestId && !GradedTests.Contains(t))
             {
                 GradedTests.Add(t);
             }
         }
     }
 }
        /// <summary>
        /// Used to get all TestResults and all Tests from DB
        /// </summary>

        public async void GetTests()
        {
            StudentTestResults.Clear();
            AllTests.Clear();
            try
            {
                StudentTestResults = await ApiHelper.Instance.GetTestResults();

                AllTests = await ApiHelper.Instance.GetAllTests();
            }

            catch (Exception exc)
            {
                await new MessageDialog(exc.Message).ShowAsync();
            }
            DisplayAllTests();
        }