hedyorg / hedy

Hedy is a gradual programming language to teach children programming. Gradual languages use different language levels, where each level adds new concepts and syntactic complexity. At the end of the Hedy level sequence, kids master a subset of syntactically valid Python.
https://www.hedy.org
European Union Public License 1.2
1.27k stars 282 forks source link

🪲 saving programs consistently #5510

Open hasan-sh opened 1 month ago

hasan-sh commented 1 month ago

Fixes #5507

jpelay commented 1 month ago

Hi! I've been testing and, yes now the programs seem to be being saved more consistently. This is how a saved program from this page looks in the database:

    {
      "session": "fac24066d19f4fd8ac44508ac4a7fdae",
      "date": 1715266264375,
      "lang": "en",
      "version": "DEV",
      "level": 17,
      "code": "print 'hello' 1 + 2",
      "name": "Tik Tak Toe",
      "username": "teacher1",
      "error": false,
      "adventure_name": "Tik Tak Toe",
      "id": "720bcbb290384d7b9f5a018d168c8707",
      "username_level": "teacher1-17",
      "is_modified": true
    }

But I wonder if this is the solution? I think perhaps the best way is to not store programs in this page? I think we should only be storing programs that come from the /hedy page.