private void btnTakeMasteryTest_Click(object sender, EventArgs e) { Form masteryForm = new frmTakeTest(student, klass, availableMasteryTests[student.MasteryLevel]); //Passes the students mastery level masteryForm.Tag = "mastery"; masteryForm.ShowDialog(); frmStudentHome_Load(null, null); }
private void btnTakePlacementTest_Click(object sender, EventArgs e) { if (availablePlacementTest != null) { Form placementForm = new frmTakeTest(student, klass, availablePlacementTest); //TODO Pass Correct Test object placementForm.Tag = "placement"; placementForm.ShowDialog(); frmStudentHome_Load(null, null); } else { MessageBox.Show("Your teacher has not made your Placement Test yet"); } }
private void btnTakeRandomPracticeTest_Click(object sender, EventArgs e) { if (Validation.IsComboSelected(cmbMasteryLevel) && Validation.IsComboSelected(cmbNumberOfQuestions)) { int masteryLevel = Convert.ToInt16(cmbMasteryLevel.SelectedItem); int numberOfQuestions = Convert.ToInt16(cmbNumberOfQuestions.SelectedItem); PracticeTest practiceTest = new PracticeTest(Question.GenerateRandomQuestions(masteryLevel, new TimeSpan(0, 0, 30), numberOfQuestions), new TimeSpan(0, 10, 0), true, masteryLevel, masteryLevel); Form practiceForm = new frmTakeTest(student, klass, practiceTest); practiceForm.Tag = "practice"; practiceForm.ShowDialog(); } }