'Validates all mandatory fields'

def validate_mandatory(self):

    fields = [u'course', u'room', u'instructor', u'from_time', u'to_time', u'course_start_date', u'course_end_date', u'day']
    for d in fields:
        if (not self.get(d)):
            frappe.throw(_(u'{0}    is    mandatory').format(self.meta.get_label(d)))
