cayhorstmann / codecheck2 Goto Github PK
View Code? Open in Web Editor NEWMerging CodeCheck checker and Play server
License: GNU Affero General Public License v3.0
Merging CodeCheck checker and Play server
License: GNU Affero General Public License v3.0
Allow the table of submissions to be sorted by clicking on the columns. See https://www.willmaster.com/library/features/sorting-a-table-with-javascript.php
for inspiration.
I am concerned about anal, babe, nude, sexy. Look at grep -E '^(([aeiouy][bcdfghjklmnpqrstvwxz]){2}|([bcdfghjklmnpqrstvwxz][aeiouy]){2})$' /usr/share/dict/words and find all objectionable words, then make sure they don't get generated.
Make a progfileCodeCheck.c with the contents
// Student/instructor code
extern int atoi(const char*);
int main(int argc, char *argv[]) {
int arg = atoi(argv[1]);
if (arg == 1) print_T(FUN(ARGS));
...
}
where T is derived from the return type (print_int
, print_double
, print_char_pointer
, print_bool
, print_char
, ...). If the return type is something else, the instructor/student code must contain a function print_T.
Look at
https://github.com/cayhorstmann/codecheck2/blob/main/comrun/bin/preload.sh
How do we compile and run a Rust program from the CLI?
Look at
https://github.com/cayhorstmann/codecheck2/blob/main/app/com/horstmann/codecheck/JavaLanguage.java
We need regex for a main file, a variable declaration, and for compiler errors. And a way to print scalars, arrays, maps, etc.
Is there a canonical unit test framework? If so, we need to know how to invoke it and the regex for success and failure.
Currently, one can submit a ZIP file to https://codecheck.io/assets/uploadProblem.html, and that archive may contain files in subdirectories. This works fine, as this example shows.
However, when one tries to edit the problem, the message Cannot edit problem with directories
is displayed. This seems unwarranted and is very annoying, as fixing even a small typo will require creating a new problem altogether. Why shouldn't I be able to send a new ZIP or edit files in subdirectories (with names such as dir/file
)?
(As a workaround, when developing a new problem, I generally start by a submitting a simple file, then I follow the Edit URL and I upload the ZIP file and leave the browser open. Then, if I spot a typo, I can press the browser button to get back to the Edit URL page and send an updated ZIP.)
When editing a problem that has a binary file (such as hsql.db in Gerald Cohen's https://codecheck.io/files/22121513531ga6ejmwq41uwlkw8tudtitd2), then the binary file is shown in a textbox and probably corrupted when resubmitting. Allow for uploading them, or provide a message that they can't be edited.
This from Maurice Naftalin: The workflow for refining a CodeCheck problem is a bit laborious: because re-submitting your input takes you away from the submission page, you have to either repeatedly go back to the submission page, or click on the link on the response page to go to the edit URL. I did the second of these, and ended up with a confusing multiplicity of open tabs. It would be nicer if the the result of submission was to stay on the same page (with the zip upload field unaltered and perhaps with the unit test results appended on the same page), so that after changing the zip file, you could just click on the upload button again and then just refresh the student tab.
It is a hassle that an AWS DynamoDB is required for local development. We want to imitate what is done for S3. When there is no AWS account, data should be stored locally. The root directory is specified by the config key com.horstmann.codecheck.db
. It has subdirectories for each DynamoDB table: Assignments
, LTICredentials
, and so on. Use subdirectories for the partition key and, when present, the sort key.
Codecheck programming exercises currently expose all tests to the student.
It would be nice If Codecheck could have some hidden tests.
These would simply report a Pass/Fail result, without exposing parameters or results.
Hidden tests should prevent students from tailoring their solutions just to pass specific tests and not solve the general problem.
Right now, when one views a https://codecheck.io/private/problem/id/KEY, one must click on Submit Changes to get the student URL. That's not so nice if one reviews an existing problem since one may well be nervous about changing it. Make it so that the student URL is displayed.
(Firefox Only)
When creating a new Frame and attempting to add a Arr, Obj, or Seq object, it will not appear. For example:
const vars = sim.add(8, 0, new Frame());
vars.x = new Seq([1,2,3]);
This can best be seen when viewing the tracer documentation (https://horstmann.com/codecheck/tracer.html), where error messages will pop up when using the Firefox browser. Error messages do not pop up on standalone tracers. Note: The documentation's example vars.x = sim.add(new Seq([1,2,3]));
does not work on any browser, as far as I've seen.
(Firefox, Microsoft Edge, & Chrome)
When creating a new Frame and attempting to add a Mat object, it will not appear. For example:
const vars = sim.add(8, 0, new Frame());
vars.y = new Mat([[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
I am unsure if these issues existed before the most recent commit, I did most of my tracer testing on Microsoft Edge before switching to my native Firefox browser yesterday, when I started noticing the issues.
When viewing a student assignment, instructors would like to leave feedback. Provide an edit field per problem and display it in the student view.
[email protected] reports:
My students using tablets have this accidental refreshing of page while trying to fill in the missing code in typical EDIT parts. and after that they have to key in all over again.
Is there any way to retrieve the parts they typed in, after they refresh? Or could we do something to prevent the loss of input when accidental refresh is made?
Right now the storage layer (DynamoDB, S3) runs in AWS but the web app and comrun service are in Google Cloud Run. Identify the matching AWS service, find and document the CLI commands necessary to install the services on AWS, and test that performance and costs are comparable.
Some CodeCheck problems have relative links to the textbook that won't work outside EPUB. Hide them, or maybe send a message to the parent iframe when they are clicked.
Right now, In Udacity Chapter 4, "Working with the Book Text", the entire Alice text is sent to /lti/saveWork, resulting in a Error 413 Request Entity Too Large.
When viewing the large output of a CodeCheck problem like this one, scrollbars (vertical and horizontal) appear.
(Edit URL)
However, if this exercise is part of an assignment, then only the vertical scrollbar is visible.
(Private URL)
I tracked this to the overflow: hidden
style of the <body>
element of the CodeCheck problem document embedded in the assignment's <iframe>
element.
(I wrongly reported this in the ltihub project, more than 2 years ago.)
Right now, the solution outputs are compluted together with the student outputs. This is inefficient since they don't change. Instead, compute them when a problem is submitted and save them with the problem zip.
Because existing problems don't have the solutions, every problem zip needs to be tested for the presence of solutions. If they aren't present, add them and store the augmented file in S3, then run the student submission.
Also _test for unit test
If the command line arguments have a * (e.g. //ARGS 6 * 7), it needs to be escaped so that it isn't shell-expanded. Should one quote all arguments? What if they are quotes?
Right now it is displayed in the local time zone but one needs to input it in UTC (https://codecheck.io/newAssignment, https://codecheck.io/private/editAssignment/id/key)
new Date().getTimezoneOffset()
Intl.DateTimeFormat().resolvedOptions().timeZone
Show both local time and UTC?
The zip validation uses an SSL certificate that has now expired. Instead, provide another form of validation, by uploading a file and checking the validity on the server.
codecheck-bj-4-loop-107 cannot work. Each output is more than one line. Remedy: If output contains newlines, print as
actual
\n
expected
\n
status
What if it has multiple newlines? Use one more than the longest newline???
When a very long file is displayed, e.g. https://horstmann.com/sjsu/cs046/lesson4-35.html, show the first few lines and provide a button to expand or collapse it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.