JoyOfCoding icon indicating copy to clipboard operation
JoyOfCoding copied to clipboard

Assignments Grading Application

Open susham opened this issue 7 years ago • 46 comments

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

susham avatar Jul 19 '17 07:07 susham

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.

DavidWhitlock avatar Jul 19 '17 13:07 DavidWhitlock

@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.

susham avatar Jul 19 '17 17:07 susham

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...

DavidWhitlock avatar Jul 19 '17 18:07 DavidWhitlock

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 avatar Jul 19 '17 19:07 susham

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

susham avatar Jul 21 '17 05:07 susham

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.

DavidWhitlock avatar Jul 21 '17 13:07 DavidWhitlock

@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

susham avatar Jul 21 '17 18:07 susham

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.

DavidWhitlock avatar Jul 22 '17 04:07 DavidWhitlock

@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

susham avatar Jul 22 '17 06:07 susham

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 avatar Jul 22 '17 13:07 DavidWhitlock

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 [email protected]:/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.

DavidWhitlock avatar Jul 22 '17 14:07 DavidWhitlock

@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?

susham avatar Jul 22 '17 16:07 susham

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 avatar Jul 22 '17 17:07 DavidWhitlock

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 [email protected]: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.

DavidWhitlock avatar Jul 22 '17 21:07 DavidWhitlock

@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.

susham avatar Jul 22 '17 22:07 susham

I completely agree. Let's see if we can get it working first, then we can optimize how it's installed.

On Sat, Jul 22, 2017 at 3:01 PM, susham kumar [email protected] wrote:

@DavidWhitlock https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DavidWhitlock/PortlandStateJava/issues/208#issuecomment-317213253, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzMaNrOPejCfbeWtAPSAKMWpPpVqWF_ks5sQnEjgaJpZM4OcUHx .

-- David Whitlock Adjunct Lecturer Portland State University

DavidWhitlock avatar Jul 22 '17 22:07 DavidWhitlock

@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

susham avatar Jul 22 '17 22:07 susham

Sweet! I'm making progress on building out functionality. Slow and steady. :)

On Sat, Jul 22, 2017 at 3:30 PM, susham kumar [email protected] wrote:

@DavidWhitlock https://github.com/davidwhitlock

[image: screen shot 2017-07-22 at 3 26 57 pm] https://user-images.githubusercontent.com/5677583/28494937-8aeaf40a-6ef2-11e7-8f94-5bfdc280060f.png

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DavidWhitlock/PortlandStateJava/issues/208#issuecomment-317214598, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzMaOHE3W5Epzkj7-tqkiGhm2pvLByEks5sQnftgaJpZM4OcUHx .

-- David Whitlock Adjunct Lecturer Portland State University

DavidWhitlock avatar Jul 22 '17 22:07 DavidWhitlock

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.

DavidWhitlock avatar Jul 23 '17 05:07 DavidWhitlock

@DavidWhitlock

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

Thanks, Susham

susham avatar Jul 23 '17 17:07 susham

Oh. Same command as before:

$ java -jar target/grader-Summer2017.jar scoreProjectSubmissions

On Sun, Jul 23, 2017 at 10:18 AM, susham kumar [email protected] wrote:

@DavidWhitlock https://github.com/davidwhitlock

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

Thanks, Susham

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DavidWhitlock/PortlandStateJava/issues/208#issuecomment-317268012, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzMaEoEXvDnr_Z8zESWdLiuQxqAwKkvks5sQ4BhgaJpZM4OcUHx .

-- David Whitlock Adjunct Lecturer Portland State University

DavidWhitlock avatar Jul 23 '17 18:07 DavidWhitlock

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.

DavidWhitlock avatar Jul 24 '17 04:07 DavidWhitlock

@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

susham avatar Jul 26 '17 07:07 susham

@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.

DavidWhitlock avatar Jul 26 '17 11:07 DavidWhitlock

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

Thanks, Susham

susham avatar Jul 26 '17 15:07 susham

@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

susham avatar Jul 28 '17 00:07 susham

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?

DavidWhitlock avatar Jul 28 '17 04:07 DavidWhitlock

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

susham avatar Jul 28 '17 04:07 susham

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

DavidWhitlock avatar Jul 28 '17 04:07 DavidWhitlock

Looks good to me!

susham avatar Jul 28 '17 04:07 susham