Example #1
0
        private void BindSections()
        {
            Courses courseda = new Courses(Globals.CurrentIdentity);

            Section.SectionList sections = courseda.GetSections(GetCourseID());

            dgSections.DataSource = sections;
            dgSections.DataBind();
        }
Example #2
0
 protected void CheckSectionExists(Section sec)
 {
     //Check to see if a section with identical attributes exists
     Section.SectionList secs = (new Courses(Globals.CurrentIdentity)).GetSections(sec.CourseID);
     if (secs.Contains(sec))
     {
         throw new DataAccessException("Identical section already exists");
     }
 }
Example #3
0
 private void AddSections(int courseID)
 {
     Section.SectionList sections = (new Courses(Globals.CurrentIdentity)).GetSections(courseID);
     foreach (Section section in sections)
     {
         AddNode(tvSection.Nodes, true, section.Name + " (Owner: " + section.Owner + ")",
                 "attributes/group.jpg", "Section " + section.ID);
     }
 }
Example #4
0
        private void AddUserSections(TreeNode node)
        {
            string[] tokens   = node.NodeData.Split(" ".ToCharArray());
            string   username = tokens[1];

            int courseID = Convert.ToInt32(HttpContext.Current.Request.Params["CourseID"]);

            Section.SectionList sections = (new Users(Globals.CurrentIdentity)).GetSections(username, courseID);

            foreach (Section section in sections)
            {
                AddNode(node.Nodes, true, section.Name + " (Owner: " + section.Owner + ")",
                        "attributes/group.jpg", "Section " + section.ID);
            }
        }
Example #5
0
        private void BindData()
        {
            Courses    courseda = new Courses(Globals.CurrentIdentity);
            Assignment asst     = new Assignments(Globals.CurrentIdentity).GetInfo(GetAsstID());
            Course     course   = courseda.GetInfo(asst.CourseID);

            Section.SectionList           sections = courseda.GetSections(course.ID);
            CourseMember.CourseMemberList mems     = courseda.GetMembers(course.ID, null);

            ArrayList secmems = sections;

            secmems.AddRange(mems);

            dgUsers.DataSource = secmems;
            dgUsers.DataBind();

            cmdEvaluate.Enabled = asst.ResultRelease;
            lblEvaluate.Visible = !asst.ResultRelease;

            lnkSecExpl.Attributes.Add("onClick",
                                      @"window.open('sectionexpl.aspx?CourseID=" + course.ID +
                                      @"', '" + course.ID + @"', 'width=430, height=530')");
        }