Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲 Only show saved programs in "Overview of programs per adventure" if the program has been modified #5161

Closed
jpelay opened this issue Feb 19, 2024 · 0 comments · Fixed by #5162
Labels
bug Something isn't working

Comments

@jpelay
Copy link
Member

jpelay commented Feb 19, 2024

One of the complaints we got from teachers during the hackathon was that students would just copy and paste the code from the examples, and take that as a submission. Ideally, we would only show programs that has been modified to a certain point.

@jpelay jpelay added the bug Something isn't working label Feb 19, 2024
@mergify mergify bot closed this as completed in #5162 Mar 3, 2024
mergify bot pushed a commit that referenced this issue Mar 3, 2024
…er adventure (#5162)

Modifies the way we choose if a program is suitable for having a tick mark in the Overview of programs per adventure table.

The process is basically this:

1. Get all of the code snippets from the yamls. For this I made a simple loop that kind of parses the markdown code, if it finds 3 consecutive backticks and then 3 more, the text found in-between is the code for that snippet.
2. For the teacher adventures, I use BeautifulSoup to parse the HTML code used to format the text in these adventures.
3. After getting all of the relevant code, and removing newlines, I compare the code from the student program with each one of the snippets. If the difference to any of the snippets is less than 10 characters, I consider the snippet not to be worthy of reviewing.

**Fixes #5161**

**How to test**

* Login as a teacher and go to Overview of program per adventure
* Login as a student in other window and copy-paste one of the example's code into the editor, and run the program.
* Check that the program isn't being shown for reviewing.
* Now in the student's window, modify the program before running it.
* Now the program should be available for reviewing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant