Beispiel #1
0
 public ExerciseSlide(
     List <SlideBlock> blocks,
     SlideInfo slideInfo,
     string title, string id)
     : base(blocks, slideInfo, title, id)
 {
     MaxScore = 5;
     Exercise = blocks.OfType <ExerciseBlock>().SingleOrDefault();
 }
Beispiel #2
0
		public ExerciseSlide(
			List<SlideBlock> blocks,
			SlideInfo slideInfo,
			string title, Guid id)
			: base(blocks, slideInfo, title, id)
		{
			Exercise = blocks.OfType<ExerciseBlock>().Single();
			MaxScore = Exercise.MaxScore;
		}
Beispiel #3
0
		public ExerciseSlide(
			List<SlideBlock> blocks,
			SlideInfo slideInfo,
			string title, string id)
			: base(blocks, slideInfo, title, id)
		{
			MaxScore = 5;
			Exercise = blocks.OfType<ExerciseBlock>().SingleOrDefault();
		}
Beispiel #4
0
 public ExerciseSlide(
     List <SlideBlock> blocks,
     SlideInfo slideInfo,
     string title, Guid id)
     : base(blocks, slideInfo, title, id)
 {
     Exercise     = blocks.OfType <ExerciseBlock>().Single();
     MaxScore     = Exercise.MaxScore;
     ScoringGroup = Exercise.ScoringGroup ?? "";
 }
Beispiel #5
0
		public Slide(IEnumerable<SlideBlock> blocks, SlideInfo info, string title, string id)
		{
			try
			{
				Info = info;
				Title = title;
				Id = id;
				MaxScore = 0;
				Blocks = blocks.ToArray();
				foreach (var block in Blocks)
					block.Validate();
			}
			catch (Exception e)
			{
				throw new FormatException(string.Format("Error in slide {0} (id: {1}). {2}", title, id, e.Message), e);
			}
		}
Beispiel #6
0
 public Slide(IEnumerable <SlideBlock> blocks, SlideInfo info, string title, string id)
 {
     try
     {
         Info     = info;
         Title    = title;
         Id       = id;
         MaxScore = 0;
         Blocks   = blocks.ToArray();
         foreach (var block in Blocks)
         {
             block.Validate();
         }
     }
     catch (Exception e)
     {
         throw new FormatException(string.Format("Error in slide {0} (id: {1}). {2}", title, id, e.Message), e);
     }
 }
Beispiel #7
0
 public Slide(IEnumerable <SlideBlock> blocks, SlideInfo info, string title, Guid id)
 {
     try
     {
         Info         = info;
         Title        = title;
         Id           = id;
         MaxScore     = 0;
         Blocks       = blocks.ToArray();
         ScoringGroup = "";
         foreach (var block in Blocks)
         {
             block.Validate();
         }
     }
     catch (Exception e)
     {
         throw new FormatException($"Error in slide {title} (id: {id}). {e.Message}", e);
     }
 }