// Path: src/omr/QuestionGroup.java
// public enum Orientation {
// 	VERTICAL("vertical"), HORIZONTAL("horizontal"), STUDENT_NUMBER("student-number"), CHECK_LETTER("check-letter");
//     	
// 	private String name;
// 	private Orientation(String name) {
// 		this.name = name;
// 	}
//     	
// 	@Override
//     public String toString() {
// 		return this.name;
// 	}
// };


import java.io.FileInputStream;
import java.util.Properties;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.util.ByteArrayDataSource;
import omr.QuestionGroup.Orientation;

        // Create the multipart message
        Multipart multipart = new MimeMultipart();
        multipart.addBodyPart(messageBody);
        multipart.addBodyPart(messageAttachment);

        // Define message
        MimeMessage message = new MimeMessage(session);
        message.setFrom(new InternetAddress(from));
        message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
        message.setSubject(OMRProperties.getString("subject", "Exam Result" ));
        message.setContent(multipart);

        // Send the message
        Transport.send(message);
    }

    /**
     * Generates the feedback text.
     */
    private String generateFeedback(GradingScheme grading, SheetStructure structure, Sheet sheet) {
        StringBuilder sb = new StringBuilder();

        sb.append("Student ID: " + sheet.getStudentId() + "\n\n");

        // Header
        sb.append("question: answer [correct] --> score\n");

        for (QuestionGroup group : structure.getQuestionGroups()) {
            // Skip non-questions
// Path: src/omr/QuestionGroup.java
// public enum Orientation {
// 	VERTICAL("vertical"), HORIZONTAL("horizontal"), STUDENT_NUMBER("student-number"), CHECK_LETTER("check-letter");
//     	
// 	private String name;
// 	private Orientation(String name) {
// 		this.name = name;
// 	}
//     	
// 	@Override
//     public String toString() {
// 		return this.name;
// 	}
// };


// Path: src/omr/Mailer.java
import java.io.FileInputStream;
import java.util.Properties;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.util.ByteArrayDataSource;
import omr.QuestionGroup.Orientation;


        // Create the multipart message
        Multipart multipart = new MimeMultipart();
        multipart.addBodyPart(messageBody);
        multipart.addBodyPart(messageAttachment);

        // Define message
        MimeMessage message = new MimeMessage(session);
        message.setFrom(new InternetAddress(from));
        message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
        message.setSubject(OMRProperties.getString("subject", "Exam Result" ));
        message.setContent(multipart);

        // Send the message
        Transport.send(message);
    }

    /**
     * Generates the feedback text.
     */
    private String generateFeedback(GradingScheme grading, SheetStructure structure, Sheet sheet) {
        StringBuilder sb = new StringBuilder();

        sb.append("Student ID: " + sheet.getStudentId() + "\n\n");

        // Header
        sb.append("question: answer [correct] --> score\n");

        for (QuestionGroup group : structure.getQuestionGroups()) {
            // Skip non-questions
            if (group.getOrientation() != Orientation.VERTICAL && group.getOrientation() != Orientation.HORIZONTAL) {