CodeGrade autograding tutorial for python and java
News
August 17, 2021

Webinar: Getting Started for the new Academic Year

With our latest webinar, our goal was to get you ready for the new academic year, whether this is your first time using CodeGrade or a new iteration of your previous courses. This webinar was part of our monthly Focus Groups and was recorded on August 13th 2021, it is available on demand now.

CodeGrade Basics

The first part of the webinar was dedicated to CodeGrade basics. In our example, we discussed a very basic autograded Python Assignment in which a student has to generate the numbers of the Fibonacci sequence. We show the three CodeGrade workflows:

  • Handing in to this assignment as a student. We hand in our code as a student and get instant feedback on it. If we want, we can use this feedback to improve our code and resubmit. Want to learn more about the student workflows in CodeGrade? Click here!
  • Grading code manually. After the students have handed in, we switched to the teacher / grader view to start marking the submission. We explored inline comments, snippets, general feedback and the rubric. Furthermore, we show how the feedback can be released to the student. More information about Grading in CodeGrade can be found here.
  • Setting up the autograded Python assignment. We conclude by showing how the previously used assignment can be set up from scratch. We go over the basic configuration: hand in instructions, submission settings, rubrics and the automatic tests in AutoTest. You can find more information on setting up an assignment in our Help Center, or in our previous webinars and guides.

Copying your previous work

If you are doing a new iteration of a previous course, or if you would like to import parts of a previous assignment, you can use the various importing options we have in CodeGrade:

Start using CodeGrade now to supercharge your programming assignments!

Autograding best practices & Cheat sheet

Generally speaking, it is best to try complex AutoTest configurations out locally before. AutoTest simply runs a regular Ubuntu operating system in the background and all input fields are regular Bash commands. All software that is run under the hood (e.g. Python, Java, JUnit, Bash, ...) are all regular, meaning that all error messages are universal and can be very easily resolved with our biggest friends Google and Stack Overflow. You can always find more info under the `stdout` and `stderr` tabs in CodeGrade if something goes wrong:

There are two different places in which you can do configuration in AutoTest: Global Setup Script and Per-Student Setup Script. Both have different use cases for you:

Differences between Global and Per-Student Setup Script in CodeGrade AutoTest

Finally, we share an AutoTest Cheat Sheet with all useful folders and built in scripts in AutoTest:

  • `$FIXTURES`: Folder with your uploaded fixtures, read more here;
  • `$STUDENT`: Folder with the code submission of the current student, also the current directory;
  • `$AT_OUTPUT`: Folder to write generated output too that you want to show up in the Code Viewer as feedback for students or for your further visual grading, learn more here;
  • `from cg_at_utils import CG_INFO`: Python package (automatically installed in AutoTest environment) to access submission metadata, learn more about using this here;
  • `become_nobody`: Built in command to limit student access to $FIXTURES folder, use before your command. More info on limiting visibility to students can be found here;
  • `normalize_floats`: Built in command to normalize floating point output to a number of decimals, read usage info here.

CodeGrade Resources

Reading this blog means you have probably already found your way around CodeGrade's resources, which you can find:

Finally, with this webinar we hope to have given you a great way to kickstart your CodeGrade course in the new academic year. We are here to make your course with CodeGrade a success, so please do not hesitate to reach out to us on Discord or via support@codegrade.com with any question, request or if you would like some technical or educational consultancy. We are always more than happy to help you out!

Continue reading

Our LTI Advantage Certification from 1EdTech!

CodeGrade is now LTI Advantage certified by 1EdTech, offering secure and seamless LMS integration with features like single sign-on, automated grading, and streamlined data sharing.

Incorporating AI into Code Learning

Discover CodeGrade's AI Code Assistant and its role in enhancing learning while maintaining educational integrity.

Preparing NSW Classrooms for the Software Engineering HSC

Simplify coding assessments with CodeGrade’s seamless LMS integration and instant feedback. Perfect for the 2025 Software Engineering curriculum.

Why You Should Switch to AutoTest V2

Upgrade to AutoTest V2: Faster, More Flexible, and Easier Debugging

Sign up to our newsletter

See how CodeGrade can transform your courses today!