Beispiel #1
0
        public void TestCourseIDInSchema()
        {
            Skema kursusSkema = service.CreateKursusSkema("COBOL200");

            Assert.IsTrue(kursusSkema.LectureList.Count > 0, "No lecture list was returned");
            foreach (Lecture item in kursusSkema.LectureList)
            {
                Assert.IsTrue(item.Course.KursusKode == "COBOL200", "there is a course ID different from COBOL200");
                Console.WriteLine(item.Course.KursusKode);
            }
        }
        public ActionResult Course(string id)
        {
            Skema courseSchema = service.CreateKursusSkema(id);

            return(View(courseSchema));
        }
Beispiel #3
0
        public static void Main(string[] args)
        {
            SchemaService service = new SchemaService();

            //IMoodle moodle = new DumbMoodle();
            ////SchemaPlanner planner = new SchemaPlanner();

            //foreach (var room in moodle.Rooms)
            //    Console.WriteLine(room);

            //Console.ReadLine();

            //foreach (var hold in moodle.Hold)
            //    Console.WriteLine(hold);

            //Console.ReadLine();

            //foreach (var teacher in moodle.Teachers)
            //    Console.WriteLine(teacher);

            //Console.ReadLine();

            //Console.WriteLine(moodle.LookupTeacher("PAN"));

            //Console.ReadLine();

            //Console.WriteLine(moodle.LookupHold("MTH2014"));

            //Console.ReadLine();

            //foreach (var teacherCode in moodle.Teachers.Select(t => t.LaererKode))
            //    Console.WriteLine(moodle.LookupTeacher(teacherCode));

            //Console.ReadLine();

            //foreach (var holdCode in moodle.Hold.Select(h => h.HoldCode))
            //    Console.WriteLine(moodle.LookupHold(holdCode));

            //Console.ReadLine();

            //foreach (var course in moodle.Courses)
            //    Console.WriteLine(course);

            //Console.ReadLine();


            // MasterSchema masterSchema = planner.GenerateSchema(moodle);



            //create a schema for kursus with this id ALG100:
            Skema kursusSkema = service.CreateKursusSkema("ALG100");

            foreach (var item in kursusSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }

            Console.ReadLine();

            //create a schema for teacher with this initials: PJE
            Skema teacherSkema = service.CreateTeacherSkema("PAN");

            foreach (var item in teacherSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }

            Console.ReadLine();

            //create a schema for lokale with this id: BH112
            Skema lokaleSkema = service.CreateLokaleSkema("BH112");

            foreach (var item in lokaleSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }


            Console.ReadLine();

            //create a schema for a group/hold with id: MTH2014
            Skema holdSkema = service.CreateHoldSkema("MTH2014");

            foreach (var item in holdSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }

            Console.ReadKey();
        }