// public HomeController() { } /* public HomeController(AssesmentsRepositories assRepos,CoursesRepositories courRepos, SpecialtiesRepositories specRepos, StudentsRepositories studRepos, SubjectsRepositories subRepos) * { * _assRepos = assRepos; * _courRepos = courRepos; * _specRepos = specRepos; * _studRepos = studRepos; * _subRepos = subRepos; * }*/ public HomeController() : base() { _assRepos = new AssesmentsRepositories(db); _courRepos = new CoursesRepositories(db); _specRepos = new SpecialityRepositories(db); _studRepos = new StudentsRepositories(db); _subRepos = new SubjectsRepositories(db); }
public EditModel(IAssessment assessment, int? lastSelectedResult) : this(assessment.Id, assessment.Name, GenerateResultsFromRepoModels(assessment), assessment.TotalMarks, GetSelectedResultIndex(lastSelectedResult, assessment.Results)) { }
public UploadViewModel(IAssessment assessment, UploadPostbackModel model) : this(assessment) { this.WorksheetNumber = model.WorksheetNumber; this.SurnameColumn = model.SurnameColumn; this.ForenamesColumn = model.ForenamesColumn; this.ResultColumn = model.ResultColumn; this.StartRow = model.StartRow; }
private static IList<ResultRow> GenerateResultsFromRepoModels(IAssessment assessment) { var results = from result in assessment.Results let percentage = result.Result / assessment.TotalMarks * 100 select new ResultRow(result.Id, result.Surname, result.Forenames, result.Result, percentage); return results.ToList(); }
private static IList<ResultRow> GenerateResultsFromRepoModels( IAssessment assessment, IGradeBoundaries boundaries) { var results = from result in assessment.Results let grade = boundaries.Boundaries.ForResult(result.Result) let percentage = result.Result / assessment.TotalMarks * 100 select new ResultRow(result.Id, result.Surname, result.Forenames, result.Result, percentage, grade); return results.ToList(); }
public UpdateComprehensiveAssessmentModel(IAssessment assessmentMngr, IDbLogger logger) { m_Assessment = assessmentMngr; m_Log = logger; }
public EditModel(IAssessment assessment, IEnumerable<IBoundary> boundaries) : this(assessment.Id, assessment.Name, assessment.TotalMarks, ConstructGradeBoundaries(boundaries)) { }
public EditModel(IAssessment assessment) : this(assessment.Id, assessment.Name, assessment.TotalMarks) { }
public ManageAssessmentController(IAssessment assessment, ITeacher teacher) { _assessment = assessment; _teacher = teacher; }
public UpdateMentalHealthAssessmentModel(IAssessment assessmentMngr, IDbLogger logger) { m_Assessment = assessmentMngr; m_Log = logger; }
public AssessmentGameState(AssessmentGame assessmentGame) { this.assessmentGame = assessmentGame; assessment = GetAssessment(); }
public UploadViewModel(IAssessment assessment) : this() { this.AssessmentId = assessment.Id; this.AssessmentName = assessment.Name; }
public int CompareTo(IAssessment other) { return string.CompareOrdinal(this.Name, other.Name); }
private static Assessment ForExport(IAssessment assessment, IGradeBoundaries gradeBoundaries) { return new Assessment { TotalMarks = assessment.TotalMarks, Rows = ForExport(assessment.Results), GradeBoundaries = ForExport(gradeBoundaries) }; }
private static Assessment ForExport(IAssessment assessment) { return new Assessment { TotalMarks = assessment.TotalMarks, Rows = ForExport(assessment.Results) }; }