Merge pull request #145 from adamarla/master

Couple of fixes for receive scan
Renamed AnswerSheet to simply Worksheet
[Decoupling #1]: Storing quiz layout information in a new model - Draft

The layout of a quiz impacts many operations - from what QR code is
set to how scans are received to how report cards are generated

Unfortunately, the current system assumes only one invariant layout per quiz,
the details of which are scattered across models. Any computation
requiring layout information is therefore pieced back together afresh everytime.

This decoupling will also help us assign a page-agnostic QR code
to every response in the future
Dropping the idea of maintaining multiple drafts for Quizzes ...

There are other re-wirings that are more essential. For now, we can
live with the fact that a Quiz can have only one layout. Any teething
problems due to recent change in layout algo. can be handled on a  case
by case basis
Merge pull request #146 from adamarla/master

fixed single element in list as part of savon response with fetch_unreso...
Renamed Testpaper -> Exam

An Exam is nothing more than a collection of worksheets. Its only
created if the teacher does NOT publish a quiz. Otherwise, only individual
worksheets are created for students
Some more references to testpapers replaced with those to exams
 AnswerSheet -> Worksheet
Simplied code for calculating Exam.mean?

It should always been as simple as it is now. We were in fact under-reporting
the class average in our mails
Merge branch 'master' of https://github.com/abhinavc/web-application
Individual UIDs for quizzes, worksheets and exams + removed disputing

The UIDs will be needed as part of the TeX compilation redesign

Taking away ability to dispute grade  from students for 3 reasons:
  1. there is nothing to dispute as they don't get to see grades anyway
  2. its never been used while it was there
  3. need to see a clearer model before going into further rewiring
G.Response -> Worksheet -> Exam -> Quiz
G.Response -> Worksheet -> Exam -> Quiz
Removed 'compiled' column from Worksheets

What we need instead is a compilation_required? method
Worksheet now :belongs_to :quiz also

Worksheets made in an institutional environment have
both exam_id and quiz_id set

But those made in the online offering have just quiz_id set ( exam_id = nil )
This is how we will differentiate between worksheets
Edited / defined some obvious query methods
Flip-flopping: Worksheets -> Quiz via Exam only ...

Exam as a model has its purposes - albeit in an institutional environment only.
However, its there and rather than bypass it, its behaviour in an online
envrionment must be defined explicitly
 New method to find (last) sektion common to a group of students
Method common_to returns the whole lit of common sektions - order by date of creation
Added 'business_time' gem to do deadline calculations ...