             @tr =>
               @th "Name"
               @th "Present?"
-              @th "Dinner Choice"
+              if '' + register.sessionId == Config.setting('dinnerSession')
+                @th "Dinner Choice"
           @tbody id: 'registerBody', =>
             for pupil in Pupil.where('classId', register.classId)
               @tr =>

{View} = require 'space-pen'

{Class, DinnerMenuAssignment, Pupil, Register, RegisterEntry, Session} = require '../../database'

module.exports =
  class RegisterView extends View

                      @input type: 'checkbox', 'data-pupil': pupil.idPupils, 'data-register': register.idRegister
                      @span class: 'check'
                      @span class: 'choice', "Yes"
                if '' + register.sessionId == Config.setting('dinnerSession')
                  @td =>
                    @select 'data-pupil': pupil.idPupils, 'data-register': register.idRegister, =>
                      @option value: 0, 'None/Packed Lunch'
                      for choice in DinnerMenuAssignment.forRegister()
                        @option value: choice.idDinnerChoice, choice.name
        @button class: 'large info', click: 'recordRegister', "Record Register"

    recordRegister: (event, element) ->
