Beispiel #1
0
        public void SynchronizePoints()
        {
            Courses     courseda = new Courses(m_ident);
            Assignments asstda   = new Assignments(m_ident);
            int         total    = 0;

            Course.CourseList courses = courseda.GetAll();
            foreach (Course course in courses)
            {
                Assignment.AssignmentList assts = courseda.GetAssignments(course.ID);
                foreach (Assignment asst in assts)
                {
                    Rubric            arub = asstda.GetRubric(asst.ID);
                    Rubric.RubricList rubs = Flatten(arub);
                    Components.Submission.SubmissionList subs = asstda.GetSubmissions(asst.ID);
                    foreach (Rubric rub in rubs)
                    {
                        foreach (Components.Submission sub in subs)
                        {
                            m_dp.UpdateRubricSubPoints(rub.ID, sub.ID);
                            total++;
                        }
                    }
                }
            }

            System.Diagnostics.Trace.WriteLine(total);
        }
Beispiel #2
0
        /// <summary>
        /// Get total points available for course
        /// </summary>
        public double GetTotalPoints(int courseID)
        {
            Assignment.AssignmentList assts = GetAssignments(courseID);
            double points = 0.0;

            Assignments asstda = new Assignments(m_ident);

            foreach (Assignment asst in assts)
            {
                points += asstda.GetRubric(asst.ID).Points;
            }

            return(points);
        }
Beispiel #3
0
        /// <summary>
        /// Get total points available for course
        /// </summary>
        public double GetTotalPoints(int courseID)
        {
            Assignment.AssignmentList assts = GetAssignments(courseID);
            double points=0.0;

            Assignments asstda = new Assignments(m_ident);
            foreach (Assignment asst in assts)
                points += asstda.GetRubric(asst.ID).Points;

            return points;
        }
Beispiel #4
0
        public void SynchronizePoints()
        {
            Courses courseda = new Courses(m_ident);
            Assignments asstda = new Assignments(m_ident);
            int total=0;

            Course.CourseList courses = courseda.GetAll();
            foreach (Course course in courses) {
                Assignment.AssignmentList assts = courseda.GetAssignments(course.ID);
                foreach (Assignment asst in assts) {
                    Rubric arub = asstda.GetRubric(asst.ID);
                    Rubric.RubricList rubs = Flatten(arub);
                    Components.Submission.SubmissionList subs = asstda.GetSubmissions(asst.ID);
                    foreach (Rubric rub in rubs) {
                        foreach (Components.Submission sub in subs) {
                            m_dp.UpdateRubricSubPoints(rub.ID, sub.ID);
                            total++;
                        }
                    }
                }
            }

            System.Diagnostics.Trace.WriteLine(total);
        }
        private void LoadAsstNode(TreeNode par, int asstID)
        {
            FileSystem fs = new FileSystem(Globals.CurrentIdentity);
            Assignments asstda = new Assignments(Globals.CurrentIdentity);
            Assignment asst = asstda.GetInfo(asstID);

            //Load content
            par.Nodes.Clear();
            CFile.FileList cdir = fs.ListDirectory(fs.GetFile(asst.ContentID));
            foreach (CFile file in cdir) {
                if (file.IsDirectory())
                    AddFolderNode(par.Nodes, file);
                else
                    AddDocumentNode(par.Nodes, file);
            }

            if (StudentMode) {
                AddSubFolderNode(par.Nodes, asstID);
                AddGroupFolderNode(par.Nodes, asstID);
                AddCompetitionNode(par.Nodes, asstID);
                AddResFolderNode(par.Nodes, asstID);
            }
            else {
                //Load rubric
                Rubric rub = asstda.GetRubric(asstID);
                AddRubricNode(par.Nodes, rub);

                AddFeedbackNode(par.Nodes, asstID);
                AddAutoSysNode(par.Nodes, asstID);

                AddSectionFolderNode(par.Nodes, asst.CourseID, "Users and Sections");

                AddPermNode(par.Nodes, asstID);
            }
        }