Ejemplo n.º 1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="GradePageController" /> class.
 /// </summary>
 /// <param name="gradePage">The grade page.</param>
 public GradePageController(GradePage gradePage)
 {
     this.gradePage    = gradePage;
     this.studentIds   = new Dictionary <int, string>();
     this.gradeItemDal = new GradeItemDAL();
     this.studentDal   = new StudentDAL();
 }
Ejemplo n.º 2
0
 public StudentController()
 {
     this.courseDAL  = new CourseDAL();
     this.gradesDAL  = new GradeItemDAL();
     this.rubricDAL  = new RubricDAL();
     this.studentDAL = new StudentDAL();
 }
Ejemplo n.º 3
0
 public TeacherController()
 {
     this.courseDAL     = new CourseDAL();
     this.gradeItemDAL  = new GradeItemDAL();
     this.rubricDAL     = new RubricDAL();
     this.weightTypeDAL = new WeightTypeDAL();
     this.studentDAL    = new StudentDAL();
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ManageGradeItemsController" /> class.
 /// </summary>
 /// <param name="assignmentPage">The assignment page.</param>
 public ManageGradeItemsController(ManageAssignmentPage assignmentPage)
 {
     this.assignmentPage = assignmentPage;
     this.semesterDal    = new SemesterDAL();
     this.courseDal      = new CourseDAL();
     this.rubricDal      = new CourseRubricDAL();
     this.gradeItemDal   = new GradeItemDAL();
     this.CRN            = assignmentPage.CRN;
 }
Ejemplo n.º 5
0
 private void handleCourses()
 {
     if (HttpContext.Current.Session["CurrentCourse"] != null)
     {
         this.currentCourse = HttpContext.Current.Session["CurrentCourse"] as Course;
         this.GradeDAL      = new GradeItemDAL();
         var RubricDAL = new CourseRubricDAL();
         RubricDAL.GetCourseRubricByCRN(this.currentCourse.CRN);
     }
 }
        private void loadGrades(User currentUser)
        {
            CourseRubricDAL   rubricGetter = new CourseRubricDAL();
            GradeItemDAL      gradeGetter  = new GradeItemDAL();
            List <RubricItem> rubric       =
                rubricGetter.GetCourseRubricByCRN(int.Parse(this.ddlStudentCourses.SelectedItem.Value));
            List <GradeItem> grades =
                gradeGetter.GetPublicGradedItemsByStudentId(currentUser.UserId,
                                                            int.Parse(this.ddlStudentCourses.SelectedItem.Value));

            assignCurrentGrade(rubric, grades);
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="TeacherHomePageController" /> class.
 /// </summary>
 /// <param name="page">The page.</param>
 public TeacherHomePageController(TeacherHomePAge page)
 {
     if (page == null)
     {
         throw new ArgumentException("page cannot be null");
     }
     this.homePage             = page;
     this.courseDAL            = new CourseDAL();
     this.gradedItemDal        = new GradeItemDAL();
     this.desktopGradedItemDal = new DesktopGradedItemDAL();
     this.semesterDal          = new SemesterDAL();
 }
Ejemplo n.º 8
0
        private void AssignmentCombo_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            GradeItemDAL dal = new GradeItemDAL();
            var          crn = CourseManagementTools.findCrn(this.courseComboBox.Text, this.semesterComboBox.Text);

            item = dal.GetGradedItemByCRNAndGradeName(crn, this.AssignmentCombo.Text);
            if (item != null)
            {
                this.assignmentNameBox.Text = item.Name;
                this.pointsBox.Text         = item.PossiblePoints.ToString();
            }
        }
Ejemplo n.º 9
0
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            this.GradeDAL = new GradeItemDAL();
            if (HttpContext.Current.Session["CurrentGradedItem"] != null && HttpContext.Current.Session["editing"] != null)
            {
                this.handleWhenGradeItemExists();
            }
            else
            {
                this.handleWhenGradeITemNotExists();
            }



            this.createdModal.Show();
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataBind();
                SemesterDAL tester         = new SemesterDAL();
                var         stuffSemesters = tester.GetAllSemesters();
                int         count          = 0;
                foreach (Semester sem in stuffSemesters)
                {
                    if (sem.StartDate <DateTime.Now& sem.EndDate> DateTime.Now)
                    {
                        this.ddlSemesters.SelectedIndex = count;
                    }
                    count++;
                }
            }


            GradeItemDAL checker = new GradeItemDAL();
            int          crn     = Int32.Parse(this.ddlCourses.SelectedValue);
            Dictionary <string, string> items = checker.GetUniqueGradedItemsByCRN(crn);

            try
            {
                var selected = items.First(o => o.Value.Equals(this.ddlAssignments.SelectedValue));
                Dictionary <string, string> list = (Dictionary <string, string>) this.odsAssignments.Select();
                string stuff = list.Values.ToList()[0];

                string selectedValue = selected.Value;

                bool visible = checker.getPublicStatusByCRNandGradeName(crn,
                                                                        selectedValue);
                this.cbxVisibility.Checked = visible;
            }
            catch (Exception ex)
            {
                this.lblError.Text = "There are no assignments for this course. Whoops!";
            }
        }
Ejemplo n.º 11
0
        protected void cbxVisibility_CheckedChanged(object sender, EventArgs e)
        {
            GradeItemDAL gradeStuff = new GradeItemDAL();

            gradeStuff.PublishGradeItemByNameAndCRNForAllStudents(Int32.Parse(this.ddlCourses.SelectedValue), this.ddlAssignments.SelectedValue, !this.cbxVisibility.Checked);
        }