liam-m / flippd

A lightweight VLE for the "flipped classroom"
1 stars 0 forks source link

video.erb and quiz.erb reference @item #35

Open liam-m opened 8 years ago

liam-m commented 8 years ago

In the quiz changes, we changed video.erb to reference @item rather than @video (https://github.com/Lixquid/flippd/commit/84a77d9ba01fd706f0c6b48e52ac9be74a44bc19).

Wouldn't it make more sense to reference @video, when we know that it's a video (and thus has properties like "youtube", which other items don't have)? This is definitely something we could write about in the report under clarity!

Changing this would also reduce the differences with flippd/flippd, making it easier to merge changes. For example the comment form Louis gave us is based on the original erb so doesn't merge cleanly.

This could be as simple as setting @video to @item.

A similar change could be made to set @quiz for quiz.erb.

liam-m commented 8 years ago

This would also simplify some of the pass checks, e.g.

    pass unless @item
    pass unless @item["type"] == :quiz

could just be

    pass unless @quiz