The Code Grader Extension is a Visual Studio Code extension that allows you to automatically send your source code files to a server for grading. The server evaluates the code and returns a score along with suggestions for improvement. This extension is ideal for students, educators, and developers who want quick feedback on their code quality.
Features
Send Source Code for Grading: Automatically send all source code files in the open folder to a remote server for evaluation.
Receive Grading Feedback: Get a score from 1 to 10 for each file along with detailed suggestions to improve your code.
Easy to Use: Simply click a button or run a command, and your code will be sent for grading.
Alternatively, you can download the .vsix file and install it manually by dragging and dropping it into the Extensions view in Visual Studio Code.
Usage:
After installation, open a folder containing your source code files.
Use the command Send Source Code for Grading from the Command Palette (Ctrl+Shift+P) or click the button in the status bar.
The extension will send your code to the server and display the grading results in the output channel.
Requirements
You need to have a server set up that can process the source code and return grading results. This extension assumes that the server API is running and accessible.
Configuration
Currently, the server URL is hardcoded in the extension's source code. If you want to change the server URL or other settings, you need to modify the extension's source code and rebuild the .vsix package.
Example
Here’s an example of the response you might receive:
{
"success": true,
"result": "Here are the grades for each file:\n\n**a.html:** 8/10\nThe code is well-structured and uses HTML boilerplate correctly, but it's missing a closing tag for the `<h1>` element which should be `</h1>`.\n\n**index.html:** 9.5/10\nThe code is also well-structured, but there's no closing tag for the opening `<html>` and `<body>` elements.\n\nThe perfect grade of 10 would require the following HTML file:\n\n```html\n<!-- perfection.html -->\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Perfect HTML Page</title>\n</head>\n<body>\n <!-- content -->\n <h1>Welcome!</h1>\n <p>This is a perfectly valid HTML page.</p>\n \n <!-- closing tags -->\n</body>\n</html>\n```\n\nNote that I've used the `doctype` declaration and included a basic `<head>` section to meet all HTML5 requirements. Additionally, every opening tag now has its corresponding closing tag."
}
## Hub URL
https://marketplace.visualstudio.com/manage/publishers/KrissadaChalermsook/extensions/send-source-code/hub