-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪲Only show programs that has been modified in Overview of programs p…
…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.
- Loading branch information
Showing
1 changed file
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters