Пример #1
0
 public static string GetSource(string courseId, Guid slideId, CourseManager courseManager, string code)
 {
     return(string.Equals(courseId, "web", StringComparison.OrdinalIgnoreCase) && slideId == Guid.Empty
                         ? code
                         : ((SingleFileExerciseBlock)((ExerciseSlide)courseManager.GetCourse(courseId).GetSlideById(slideId))
                            .Exercise)
            .BuildSolution(code)
            .SourceCode);
 }
Пример #2
0
		public static string GetSource(string courseId, Guid slideId, CourseManager courseManager, string code)
		{
			return String.Equals(courseId, "web", StringComparison.OrdinalIgnoreCase) && slideId == Guid.Empty
				? code
				: ((SingleFileExerciseBlock)((ExerciseSlide)courseManager.GetCourse(courseId).GetSlideById(slideId))
					.Exercise)
					.BuildSolution(code)
					.SourceCode;
		}
Пример #3
0
		public static string GetSource(string courseId, string slideId, CourseManager courseManager, string code)
		{
			return courseId == "web" && slideId == "runner"
				? code
				: ((ExerciseSlide) courseManager.GetCourse(courseId).GetSlideById(slideId))
					.Exercise
					.Solution
					.BuildSolution(code)
					.SourceCode;
		}
Пример #4
0
 public static string GetSource(string courseId, string slideId, CourseManager courseManager, string code)
 {
     return(courseId == "web" && slideId == "runner"
                         ? code
                         : ((ExerciseSlide)courseManager.GetCourse(courseId).GetSlideById(slideId))
            .Exercise
            .Solution
            .BuildSolution(code)
            .SourceCode);
 }
Пример #5
0
		public void SetUp()
		{
			var cm = new CourseManager(new DirectoryInfo(@"..\..\..\uLearn.Web"));
			cm.ReloadCourse("ForTests.zip");
			course = cm.GetCourses().Single();
		}