Code Monkey home page Code Monkey logo

codecheck2's People

Contributors

agill18 avatar atrinh567 avatar cayhorstmann avatar cidzoo avatar danielmai avatar geoj2003 avatar hisergiorojas avatar minhminh avatar odiaz95012 avatar thinh241819 avatar tienbruh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

codecheck2's Issues

Invisible underscores

Whenever there is a code submission box just underneath a variable name with the _ inside (as shown in below screenshot hours​_minutes variable), the _ is not visible in 100% browser zoom. Plese see rounded circles in red in screenshot below.
2023-02-24 01-18-47

Filter out "bad words" from CodeCheck IDs

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.

Implement CALL for C

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.

Add Rust support

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.

Better error/warning messages for common problems

  1. Can/should one give a warning for #EDIT instead of ##EDIT?
  2. If the name of the file equals the name of the function, ##CALL doesn't work. (Esoteric Python-only problem)
  3. A //HIDE, not in the first line, without a matching //EDIT yields "No solution file". A //HIDE in the miiddle of the file should not be taken as a non-solution file. It could hide everything from that point or give an error.

Fix "Cannot edit problem with directories"

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

Clean up problem editing flow

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.

For development, store assignments in file system

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.

Feature: hidden tests

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.

CodeCheck Tracer Issue: Objects embedded in Frames do not appear properly across browsers

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

Example:
tracer_embedded_issue

Instructor feedback

When viewing a student assignment, instructors would like to leave feedback. Provide an edit field per problem and display it in the student view.

Save work in local storage

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

Run web app and comrun service in AWS

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.

No horizontal scrollbar in overflowing assignment

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

Precompute solution outputs

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.

* in ARGS

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?

Other form of zip validation

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.

Multiline output in //CALL

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.