Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignments Grading Application #208

Open
susham opened this issue Jul 19, 2017 · 46 comments
Open

Assignments Grading Application #208

susham opened this issue Jul 19, 2017 · 46 comments

Comments

@susham
Copy link

susham commented Jul 19, 2017

Application which helps to grade the assignments easily and gives the ability to provide comments to each test case. Below is the mockup of this application

image

@DavidWhitlock
Copy link
Collaborator

Hey, @susham. This is a cool idea.

Let's talk about the workflow that will be enabled by this tool:

  1. Source code is submitted by student via an email to the grader account
  2. Submission is downloaded to a PSU machine
  3. Submission is compiled on the PSU machine and test cases are run to create an output file
    • Today, the output file is human readable. We'll need to change the output so that this tool can read it.
    • Today, the student's program is run from the UNIX command line via a shell script. I'm not sure if we should continue that or if we should invoke the main using InvokeMainTestCase or something.
    • We'll probably want a "test case file" that specifies the test cases in a way that can be read by the test runner program/script.
  4. Graders grade submissions using the above tool
    • Is the tool web-based or a thick client?
      • If it's a think client, we'll have to figure out how to get information in the output files to the thick client. That is, we'll have to send the output file information over the network or copy them to the local machine.
  5. Grades from the graded project reports are imported into the gradebook
  6. Reports for the students are generated from the graded project reports
  7. Reports are emailed to students

Does that sound right? I want to make sure that we've identified all of the work required to make this solution work.

@susham
Copy link
Author

susham commented Jul 19, 2017

@DavidWhitlock

Yes, looks like most of the work is identified.

Till now, I thought this application should have a thick client, since we are connecting to the PSU linux machine with SSH where the .out files will be available. I was thinking to utilize most of the scripts that are currently used and yes we definitely need to modify the .out file, so that it could be read by the application(Possible XML format) and create the reports and send it to the students via email.

We could also discuss on the workflow of the web application.

The main reason, I was going with the thick client was due to the number of people using it.

@DavidWhitlock
Copy link
Collaborator

Yeah. I'd worry about the security of a web-based system. If there's a web server running on one of the CS Department's machines, it will be easily for an industrious student to find it and gain access to it.

For the initial revision of the tool, we might be able to parse the output of the current scripts. They're pretty uniform. Then again, running the main method with Java isn't a big deal, either.

Let's think some more on this...

@susham
Copy link
Author

susham commented Jul 19, 2017

Yeah, I was thinking if the .out files are created in an xml format. That would be easier to parse for the thick client application, rather than parsing the current .out file. Probably, we could create the reports in an excel sheet or the format you need to send it to the students

@susham
Copy link
Author

susham commented Jul 21, 2017

Hi Dave,

Below is the xml format, I was thinking to have as the output file from the script you are running to get the .out files.

Possible_xml_file.pdf

Please let me know your thoughts on this, would it be better to have a xml format or a different format?

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

Hey, @susham. That looks pretty good.

I've been thinking about how to approach this tool. I actually think that the easiest way to get to something that you guys can use would be to convert the existing .out files into XML. It's probably easier to write a parser that will convert the .out to XML files that it is to replace the grading bash scripts with something that will output XML.

@susham, would you like to contribute to authoring the tool? Do you have time to do that and still get the project/quiz grading done?

I've got some time this weekend to dedicate to this. I'm not sure if we'll have something that will help with Project 2, but we might have something to help with the Project 3 grading.

@susham
Copy link
Author

susham commented Jul 21, 2017

@DavidWhitlock
Yes, I have got time to work on both the grading and this project. Let me know, your availability in the weekend, so we could discuss on more on this project.

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

I started capturing a bunch of thoughts on this

https://github.com/DavidWhitlock/PortlandStateJava/wiki/GUI-for-grading-projects-POA

But now I'm falling asleep. Please review it and let me know what you think.

@susham
Copy link
Author

susham commented Jul 22, 2017

@DavidWhitlock

I have gone through the wiki and its awesome. All of the points that we need to work on is covered, including the workflow.

I was thinking about the version control feature. I understand, there is a concern of security when we make the project over http. But, we have the private repositories in github, assuming public can not view this repository and most of the graders use github in one way or the other. If we could get the files downloaded from the PSU Linux machine, graders could commit and push the changes to the private repository by running the git commands from the thick client. We could have another screen to configure the repository info.

I am not good on linux. I am not sure, if we can make an FTP Server or SFTP on PSU Linux which will be accessible by the graders only via SSH, so that we can use the Apache commons net api to download the files from the ftp server or sftp server, https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html

I have never worked on CVS, if that is easy to implement then we can carry on with that.

Please let me know your thoughts on this.

I have

@DavidWhitlock
Copy link
Collaborator

Based on my experience, using CVS is fundamentally the same as GitHub. After installing the executable, you check out a repository using the command line, and you commit and update using the command line.

I use CVS for storing the grade book for the class because it contains private information I don't know if I feel comfortable having it reside in locations that I don't have access to (such as GitHub, even in a private repository). CVS is admittedly very old, but I believe that it will work for us.

I'll create a new CVS repository and make sure that I can get it working for me. If so, I'll ask you to set it up in your local environment.

@DavidWhitlock
Copy link
Collaborator

Okay. I think I got the CVS repository set up. After you install the executable, you should be able to do the following to check out the repository.

cvs -d sjavata@linux.cecs.pdx.edu:/u/sjavata/.repository checkout submissions/summer2017

Right now, the repository only contains a README. The intent is that this repository contain only the XML files for the submissions.

However, it will require that you have ssh installed on your local machine.

If you're on windows, you may want to consider installing cygwin to provide these UNIX tools on Windows.

Let me know how you find this process.

@susham
Copy link
Author

susham commented Jul 22, 2017

@DavidWhitlock

I have used the below command to install the CVS on my local machine and then I have run the cvs command you have provided. Looks like, I was able to setup the cvs and get the README file.

Is there any way, we could run these commands from our project and install all the required softwares?

@DavidWhitlock
Copy link
Collaborator

Good question, @susham. We might be able to bundle all of the software required in a Docker container or something. I don't have a lot of experience doing that. From your point of view, how important is ease of installation for the environment?

@DavidWhitlock
Copy link
Collaborator

Okay. I've started developing the basic domain classes and the user interface for the project submission scorer application.

The code is off on a branch of my source code repository: https://github.com/DavidWhitlock/PortlandStateJava/tree/issue-208-project-submissions-scoring-ui

When you have a chance, please verify that you can check out this code, build it, and run the application on your local machine.

$ git clone git@github.com:DavidWhitlock/PortlandStateJava.git
$ cd PortlandStateJava/grader
$ git checkout issue-208-project-submissions-scoring-ui
$ mvn clean package
$ java -jar target/grader-Summer2017.jar scoreProjectSubmissions

You should see a UI pop up that contains a list of "student/Project" submissions.

At the moment, clicking on the submissions doesn't do anything.

@susham
Copy link
Author

susham commented Jul 22, 2017

@DavidWhitlock

In my view, if the dependency software can be installed via the command line then it would be better to have the dependency software be a part of the project. I wanted to avoid, graders or future application users doesn't bug you on the softwares they are installing or not able to configure the dependency softwares.

If the number of dependency softwares are minimum and doesn't have to configure them, then letting the users do the dependency softwares installation should be fine.

@DavidWhitlock
Copy link
Collaborator

DavidWhitlock commented Jul 22, 2017 via email

@susham
Copy link
Author

susham commented Jul 22, 2017

@DavidWhitlock

screen shot 2017-07-22 at 3 26 57 pm

I was able to run the project and it lists the students and the project

@DavidWhitlock
Copy link
Collaborator

DavidWhitlock commented Jul 22, 2017 via email

@DavidWhitlock
Copy link
Collaborator

Well, I had fun today developing the application. Update your checkout and see if it works for you.

I still have a ways to go, but I made good progress.

@susham
Copy link
Author

susham commented Jul 23, 2017

@DavidWhitlock

I have updated the repository and which command should i use to run the GUI?

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

DavidWhitlock commented Jul 23, 2017 via email

@DavidWhitlock
Copy link
Collaborator

Okay. I added some more functionality today. You can now save the score for the submission. When you do so, you are automatically advanced to the next submissions. Similarly, for the test cases: after you deduct points from a test case, the UI advanced to the next test case. Hopefully, this should make grading faster.

If you have a chance, please build the latest changes and let me know what you think.

The next thing to do is to parse the .out files and convert them into XML. I don't know when I'll be able to get to that, though.

@susham
Copy link
Author

susham commented Jul 26, 2017

@DavidWhitlock,

Sorry, I couldn't work on this earlier. I have taken the latest code and for some reason the build fails.

Below is the screenshot of the build error.
screen shot 2017-07-26 at 12 44 02 am

I have run the mvn build command from PortlandStateJava/Grader directory. I hope, I have run the command correctly.

Let me know your thoughts on this.

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

@susham, there isn't a "mvn build" command. Use "mvn clean package" instead. That will rebuild the jar file.

Also, it will be much faster, if you "cd grader" and just build the grader project.

@susham
Copy link
Author

susham commented Jul 26, 2017

I will start working on the .out file parser this weekend and update you on the status

Thanks,
Susham

@susham
Copy link
Author

susham commented Jul 28, 2017

@DavidWhitlock

I was just looking at the code you have written for this project and there lot of files. I am not sure, where to start writing the code for the parsing .out file. Whenever you are free, can we have a hangout session, so that we could discuss the workflow and the structure I need to follow to implement the .out file parsing.

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

Yeah. There's a lot there. I think the best way to proceed would be for me to write some unit tests and for you to make them pass. Let's catch up on this on Saturday. What does your schedule look like?

@susham
Copy link
Author

susham commented Jul 28, 2017

I am free this weekend. Let me know your availability.

@DavidWhitlock
Copy link
Collaborator

How about 9:30 on Saturday morning? That will give us time later in the day to work on it.

@susham
Copy link
Author

susham commented Jul 28, 2017

Looks good to me!

@DavidWhitlock
Copy link
Collaborator

Great. I'll put something on the calendar.

@DavidWhitlock
Copy link
Collaborator

Hey, I threw together some unit tests for a class that parses the output of the grading script:

b3d0af9

Have a look. Hopefully, that will help you get started.

Thanks,

Dave

@susham
Copy link
Author

susham commented Jul 29, 2017

@DavidWhitlock

Unit Test Cases helps a lot.

  1. Is there any class where I could start writing the code?
  2. Should I create a new class file?
  3. Is there any coding structure you follow, like method to access the .out files and another layer which access this method to parse the .out files(Hope this makes sense)

We could discuss these points tomorrow.

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

I'm glad you found the unit tests to be helpful, @susham.

We can talk more later this morning, but I recommend that you implement functionality in the ProjectSubmissionOutputFileParser class in order to make those unit tests pass.

https://github.com/DavidWhitlock/PortlandStateJava/blob/issue-208-project-submissions-scoring-ui/grader/src/main/java/edu/pdx/cs410J/grader/scoring/ProjectSubmissionOutputFileParser.java

@susham
Copy link
Author

susham commented Aug 24, 2017

@DavidWhitlock

I have few questions on the output parser.

  1. In the Unit Test Cases, new ProjectSubmissionOutputFileParser(new StringReader(text));
    Shouldn't my ProjectSubmissionOutputFileParser class reads the entire .out file?

  2. Can't we use BufferedReader class to read the contents of the file?

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

Hey, @susham.

  1. Yes, eventually, your ProjectSubmissionOutputFileParser should read the entire file, but while you're developing the class, a partial file should be fine. Are you concerned that that file snippets in the test cases do not valid output files and should, therefore, result in errors?
  2. Yes, internally to ProjectSubmissionOutputFileParser you could use a BufferedReader to read the contents of the Reader line by line. I think giving the ProjectSubmissionOutputFileParser a Reader provides the most flexibility.

Thanks!

Dave

@susham
Copy link
Author

susham commented Aug 28, 2017

@DavidWhitlock

  1. Yes, current test case should be good.
  2. I was just confused about the classes that I could use.

Thanks,
Susham

@DavidWhitlock
Copy link
Collaborator

👍

@susham
Copy link
Author

susham commented Aug 28, 2017

@DavidWhitlock

I am trying to parse the submission time and below is the code that I am using
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
date = format.parse(submissionTimeString);

Still the parseable exception occurs. I am not sure, where I am doing wrong.

@DavidWhitlock
Copy link
Collaborator

Hmm. That SimpleDateFormat might not recognize the "Jul". It might expect a two-digit month.

I recommend that you write a unit test that creates the SimpleDateFormat, formats a new Date and prints it out, then attempts to parse a date like in the output file (2017-Jul-28 19:51:41).

If I had to guess, I would bet that your date format needs a third M or something.

@susham
Copy link
Author

susham commented Aug 29, 2017

Yayy! Using a third 'M' as part of the date format, did work. Thanks a lot!!

@susham
Copy link
Author

susham commented Aug 29, 2017

@DavidWhitlock

I have added few implementations and pushed the changes to my repository. Can you please review the code and let me know, if there are any modifications required.

@DavidWhitlock
Copy link
Collaborator

Hey, @susham. The most effective way for me to provide you with feedback would be for you to put up a pull request for your changes. We can decided whether or not you want me to merge them or not. But a Pull Request would let us have a conversation.

Thanks!

Dave

@susham
Copy link
Author

susham commented Aug 30, 2017

@DavidWhitlock

I have raised the pull request.

Thanks,
Susham

@susham
Copy link
Author

susham commented Aug 31, 2017

Sorry about the confusion. I have raised another request, from issue 208 branch.

@DavidWhitlock
Copy link
Collaborator

No problem. Thank you for creating that other pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants