Beispiel #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ExerciseContent" /> class.
 /// </summary>
 /// <param name="holder">The holder.</param>
 /// <param name="name">The name.</param>
 /// <param name="processing">The processing.</param>
 protected ExerciseContent(BasicHolder holder, string name, ExerciseProcessing processing)
     : base(holder, name)
 {
     Processing = processing;
     Answered = false;
     Accept = false;
     UID = Guid.NewGuid().GetHashCode();
     HasBeenCollected = false;
 }
Beispiel #2
0
        public override void AddIt(BasicHolder holder)
        {
            var factory = new ExerciseContent.ExerciseFactory(holder as ExerciseHolder);
            var content = factory.GetGraphical(ExerciseName /*, Width, Height*/);
            content.ImportLayer(Layer);
            content.AddLayer("Votre réponse");
            content.UID = UID;

            holder.Contents.Add(content);
        }
Beispiel #3
0
        public override void AddIt(BasicHolder holder)
        {
            var factory = new ExerciseContent.ExerciseFactory(holder as ExerciseHolder);
            QuizContent content;
            if (Mode == QuizMode.QCM)
                content = factory.GetQCM(ExerciseName);
            else
                content = factory.GetQCU(ExerciseName);

            content.ImportLayer(Layer);
            content.Bullets = Bullets;
            content.UID = UID;

            holder.Contents.Add(content);
        }
Beispiel #4
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ExerciseContent" /> class.
 ///     Default access to create a ExerciseContent (we don't break the object-related inheritance).
 ///     But, exercises should only be created by their Factory!
 /// </summary>
 /// <param name="holder">The holder.</param>
 /// <param name="name">The name.</param>
 public ExerciseContent(BasicHolder holder, string name) : this(holder, name, new QuizProcessing())
 {
 }
Beispiel #5
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ExerciseContent" /> class.
 /// </summary>
 /// <param name="holder">The holder.</param>
 /// <param name="name">The name.</param>
 /// <param name="processing">The processing.</param>
 internal QuizContent(BasicHolder holder, string name, ExerciseProcessing processing, QuizMode mode)
     : base(holder, name, processing)
 {
     Mode = mode;
 }
Beispiel #6
0
 public BasicContent(BasicHolder holder, string name)
     : base(holder, name)
 {
 }
Beispiel #7
0
 public abstract void AddIt(BasicHolder holder);