learn-gdscript icon indicating copy to clipboard operation
learn-gdscript copied to clipboard

Automatically check that practice function definitions are preserved by the student

Open razcore-rad opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Students can easily change the function declarations and fail validation checks. For example:

func _process(delta):

Could be written as:

func _process(d):

And be a valid function declaration, but a check looking for delta in the body of the function would fail.

Describe the solution you'd like The simplest solution is to make a section of the code uneditable (i.e. function/variable declarations).

Describe alternatives you've considered Have the PracticeTester test for declarations, but on second thought this is much more work and prone to error.

razcore-rad avatar Feb 28 '22 14:02 razcore-rad

The simplest solution is to make a section of the code uneditable (i.e. function/variable declarations).

We had that planned at first but it's not that easy to implement, and it proved unnecessary so far. We haven't had a case of people messing with the function definitions yet.

NathanLovato avatar Feb 28 '22 14:02 NathanLovato