Skip to content

Commit

Permalink
Merge branch 'main' into prevent-students-multiple-classes
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-sh committed Dec 18, 2023
1 parent 3053d92 commit d5c6e91
Show file tree
Hide file tree
Showing 189 changed files with 40,807 additions and 38,909 deletions.
32 changes: 31 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,36 @@ def view_program(user, id):
**arguments_dict)


@app.route('/render_code/<level>/<code>', methods=['GET'])
def render_code_in_editor(level, code):

try:
level = int(level)
except BaseException:
return utils.error_page(error=404, ui_message=gettext('no_such_level'))

a = Adventure('start', 'start', 'start', 'start', code, False, False)
adventures = [a]

return render_template("code-page.html",
specific_adventure=True,
level_nr=str(level),
level=level,
adventures=adventures,
raw=True,
menu=False,
blur_button_available=False,
# See initialize.ts
javascript_page_options=dict(
page='code',
lang=g.lang,
level=level,
adventures=adventures,
initial_tab='start',
current_user_name=current_user()['username'],
))


@app.route('/adventure/<name>', methods=['GET'], defaults={'level': 1, 'mode': 'full'})
@app.route('/adventure/<name>/<level>', methods=['GET'], defaults={'mode': 'full'})
@app.route('/adventure/<name>/<level>/<mode>', methods=['GET'])
Expand Down Expand Up @@ -2064,7 +2094,7 @@ def get_slides(level):
return utils.error_page(error=404, ui_message="Slides do not exist!")

slides = SLIDES[g.lang].get_slides_for_level(level, keyword_language)
return render_template('slides.html', slides=slides)
return render_template('slides.html', level=level, slides=slides)


@app.route('/translate_keywords', methods=['POST'])
Expand Down
84 changes: 42 additions & 42 deletions content/achievements/it.yaml
Original file line number Diff line number Diff line change
@@ -1,139 +1,139 @@
achievements:
adventure_is_worthwhile:
title: Adventure is Worthwhile
title: L'avventura Conviene
text: Store a program from an adventure
deadline_daredevil_I:
title: Deadline Daredevil I
title: Daredevil delle Scadenze I
text: Submit 1 Hedy program
deadline_daredevil_II:
title: Deadline Daredevil II
title: Daredevil delle Scadenze II
text: Submit 3 Hedy programs
deadline_daredevil_III:
title: Deadline Daredevil III
title: Daredevil delle Scadenze III
text: Submit 10 Hedy programs
detention:
title: Detention!
title: Detenzione!
text: Remove a student from a class
did_you_say_please:
title: Did you say please?
title: Hai chiesto per favore?
text: Create a program with the 'ask' command
do_you_have_copy:
title: Do you have a copy?
title: Hai una copia?
text: Delete a saved program
double_check:
title: Double-check
title: Controlla due volte
text: Get a duplicate program name warning
end_of_semester:
title: End of Semester
title: Fine del Semestre
text: Delete a class
epic_education:
title: Epic Education
title: Istruzione Epica
text: Join a class
error_or_empty:
title: Error or empty?
title: Sbagliato o vuoto?
text: Create a program that has no output
fresh_look:
title: Fresh Look
title: Look Fresco
text: Change your profile picture
full_house:
title: Full House
title: Casa Piena
text: Have a class with more than 20 students
getting_started_I:
title: Getting Started I
title: Per Iniziare I
text: Run 1 Hedy program
getting_started_II:
title: Getting Started II
title: Per Iniziare II
text: Run 10 Hedy programs
getting_started_III:
title: Getting Started III
title: Per Iniziare III
text: Run 50 Hedy programs
getting_started_IV:
title: Getting Started IV
title: Per Iniziare IV
text: Run 200 Hedy programs
getting_started_V:
title: Getting Started V
title: Per Iniziare V
text: Run 500 Hedy programs
go_live:
title: Let's Go Live
title: Andiamo In Diretta
text: Create a public profile
hedy-ious:
title: Hedy-ious
text: Print 10 times the same string without using a loop
hedy_certificate:
title: Hedy Certificate of Completion
text: Hedy Certificate of Completion
title: Certificato di Completamento Hedy
text: Certificato di Completamento Hedy
hedy_hacking:
title: Hedy Hacking
text: Create a timeout due to your program running too long
hedy_honor:
title: Hedy Honor
title: Onore Hedy
text: Run a program that prints the text 'Hedy'
indiana_jones:
title: Indiana Jones
text: Search within the explore page
lets_focus:
title: Let's Focus
title: Concentriamoci
text: Turn on the programmers mode
make_some_noise:
title: Make Some Noise
title: Fai un po' di Rumore
text: Let your program be read aloud
my_class_my_rules:
title: My Class, my Rules
title: La mia classe, le mie Regole
text: Customize a class
next_question:
title: Next Question...
text: Finish a Hedy quiz
ninja_turtle:
title: Ninja Turtle
title: Tartaruga Ninja
text: Create a program with the turtle
on_second_thoughts:
title: On Second Thoughts
text: Rename a class
one_for_money:
title: One for the Money, Two for the Show
text: Duplicate a class
text: Duplica una classe
one_to_remember_I:
title: One to Remember I
title: Qualcuno da Ricordare I
text: Save 1 Hedy program
one_to_remember_II:
title: One to Remember II
title: Qualcuno da Ricordare II
text: Save 5 Hedy programs
one_to_remember_III:
title: One to Remember III
title: Qualcuno da Ricordare III
text: Save 10 Hedy programs
one_to_remember_IV:
title: One to Remember IV
title: Qualcuno da Ricordare IV
text: Save 25 Hedy programs
one_to_remember_V:
title: One to Remember V
title: Qualcuno da Ricordare V
text: Save 50 Hedy programs
programming_panic:
title: Programming Panic
title: Panico da Programmazione
text: Try to run a faulty program 3 times in a row
programming_protagonist:
title: Programming Protagonist
title: Protagonista della Programmazione
text: Run a successful program after an error
quiz_master:
title: Quiz Master
title: Maestro dei Quiz
text: Get the maximum score on a quiz
ready_set_education:
title: Ready, Set, Education!
title: Pronti, Partenza, Educazione!
text: Create a class
ring_the_bell:
title: Ring the Bell
title: Suona il Campanello
text: Finish the teacher tutorial
sharing_is_caring:
title: Sharing is Caring
title: Condividere è Curare
text: Share a saved program
talk-talk-talk:
title: Talk-talk-talk
title: Discussione
text: Create a program with a least 5 ask keywords
trying_is_key:
title: Gotta Use Them All
title: Devo Usarli Tutti
text: Use all Hedy commands at least once
watch_out:
title: Watch out!
title: Attenzione!
text: Create a program that results in a (non-empty) warning
well_begun_is_half_done:
title: Well begun is half done
title: Ben iniziato è metà fatto
text: Finish the Hedy tutorial
1 change: 0 additions & 1 deletion content/adventures/adventures.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"story_text_6": { "type": "string" },
"example_code_6": { "type": "string" }
},
"required": ["start_code"],
"additionalProperties": false
}
}
Expand Down
Loading

0 comments on commit d5c6e91

Please sign in to comment.