Пример #1
0
        public CourseInformation Clone()
        {
            CourseInformation c = new CourseInformation();

            c.CourseName  = CourseName;
            c.CourseCode1 = CourseCode1;
            c.CourseCode2 = CourseCode2;
            c.Year        = Year;
            c.Semester    = Semester;
            return(c);
        }
Пример #2
0
        private void DisplayInformation(AssessmentScript a)
        {
            //Show the assessment info. This will always be present
            if (a.AssessmentInfo != null)
            {
                AssessmentInformation ai = a.AssessmentInfo;

                if (!ai.AssessmentName.NullOrEmpty())
                {
                    lblAssessmentName.Text = ai.AssessmentName;
                }
                else
                {
                    lblAssessmentName.Text = "Assessment";
                }

                if (!ai.Author.NullOrEmpty())
                {
                    lblAuthor.Text = $"Author: {ai.Author}";
                }
                else
                {
                    lblAuthor.Text = "";
                }

                lblWeighting.Text = ai.AssessmentWeighting > 0 ? $"{ai.AssessmentWeighting}%" : "";
            }

            //Show the course info. This will only be present if the assessment has been published.
            if (a.CourseInformation != null)
            {
                CourseInformation c = a.CourseInformation;
                if (!c.CourseCodeFull.NullOrEmpty())
                {
                    lblCourseCode.Text = c.CourseCodeFull;
                }
                else
                {
                    lblCourseCode.Text = "";
                }

                if (!c.CourseName.NullOrEmpty())
                {
                    lblCourseName.Text = c.CourseName;
                }
                else
                {
                    lblCourseName.Text = "Unkown course";
                }
            }
            //Enable the information panel
            pnlInformation.Enabled = true;
            pnlInformation.Visible = true;
        }