/// <summary>
        /// get and filter the tests in the course
        /// </summary>
        /// <param name="courseId">identifier of the course that contains these tests</param>
        /// <param name="filter">function to filter the tests</param>
        /// <returns></returns>
        private IEnumerable <CourseTestDetailsVM> GetAndFilterTests(string courseId, TestFilterDelegate filter)
        {
            var courseTests   = courseService.GetTests(courseId);
            var filteredTests = filter(courseTests);

            return(filteredTests.Select(test =>
                                        new CourseTestDetailsVM(test.Id.ToString(), test.Topic, test.Weight, test.Questions.ToViewModels(), test.Status, test.Deadline, test.IsGraded)));
        }
 public TestFilter(int priority, TestFilterDelegate del)
     : base(priority)
 {
     m_delegate = del;
 }
Exemplo n.º 3
0
 public TestFilter(int priority, TestFilterDelegate del)
     : base(priority)
 {
     m_delegate = del;
 }