Checking correctness error

I have a very lengthy activity slide that I’m building which is multiple steps long, requiring multiple geometric transformations (similar to the game tetris). I want to check correctness at the very end if their shape ends up on top of the location it should be in. For some reason I can’t get it to check correctness with a check or x in the dashboard. I have marked every piece except for the correct check block as readOnly: true but yet it still just marks as a dot. How can I fix this?

(added context: I have added a gif that appears when it is correct, so I know the correct check is right I just can’t get it to display as a check or x, only a dot. It’s as if it is reading only but it shouldn’t be. help!)

If the graph is the only thing determining correctness, but the student doesn’t interact with the graph, this happens. You can use the hasResponse sink to force it. So let’s say you have some input they submit you can write hasResponse: input.submitCount > 0 in the graph CL.

That’s very helpful! Is there a way to do it with action buttons rather than every individual component needing to be have a submit button? I have an action button labeled sub2 so I tried:
hasResponse: sub2.timeSincePress()>0 and got the same issue.

You wouldn’t need to do it with more than one component. Maybe try pressCount instead of timeSincePress since that may get reset to 0 by a variety of different things. The trigger can be literally any boolean - it doesn’t have to respond to a button press. Like, it could be if a text input is not blank.

You can also just do hasResponse: true to see if that works. The downside is that it would immediately have an X before a student even does something, until they got it right.

Alternatively, if you have a non-graph component that a student is interacting with that has a correct sink, you can make the graph read only, and pull a number from the graph (assuming you have a variable C_orrect = 1 or something) and setting the correct sink in that other component based on that.

If you can’t get it to work, feel free to include a link and I can take a look.

That fixed it! Thank you soooo much. I’ve been struggling with this for a while!

No problem - I remember having the exact same issue a while back and needed Jay’s help to understand what was going on. Your project sounds cool - I’d like to see the finished product if I can. Here’s something I made that touches on the same ideas which you might like to see: Flip and Slide Game version 2.0 (Rigid transformations practice) • Activity Builder by Desmos

Sure, I’ll definitely post it here when it’s finished (or at least, a fully playable version)! That looks awesome, thanks for sharing! I’m going to have to look into how you made the bubbles poppable and the animation of the transformations. I haven’t tried too hard yet, but the motion of the transformations is pretty daunting to me, but it adds so much to the activity!

Actually, I think its “functional” now, but definitely still a work in progress. I want to figure out a way to make it so that the figure “breaks” if it goes out of bounds or hits another piece, similar to the “Transformations Golf” activity in Desmos.
Let me know if you have any suggestions! Enjoy! Tetris Transformations • Activity Builder by Desmos

That looks really cool. I notice that you are doing the calculations in the CL instead of inside the graph. After this project, you may want to try doing calculations in the graph instead, and just sinking in the values needed from the CL. That will probably make it much easier to do the kinds of things you want. I just put together a streamlined version of how you can make animated transformations using the Geometry tool (the other link I shared was made prior to that). The idea is that you sink in the type of transformation, the angle or translation vector, or line of reflection, etc. and then run the t0 timer. Animated transformations | Desmos If you want any explanations of it, just let me know.

EDIT: I decided to see this through a bit further, and put the code into the structure that you had. I deleted the CL that was no longer needed since the math is done in the graph. I put in the correctness check and the out of bounds check as well. It’s just a basic out of bounds check. I can go back later and add in code that will check if it has hit another piece. Should it show an error message if it happens after the first move, or only based on where it ends up? [Copy of] Tetris Transformations • Activity Builder by Desmos

I somehow missed this notification. That looks awesome!! I’ve been trying to figure out how to make the transformations look like that. I only looked at this super quickly today, but I’m definitely going to go through this thoroughly and learn from this. It looks like you did a ton of work! Thank you so much for all your help with this! I will definitely let you know when I have more questions about this :grin:

No worries. I actually went a bit further and turned it into a full game. Transformation Tetris • Activity Builder by Desmos

This is crazy! How long did this take you? How long have you been using CL?

I worked on it for a couple hours at a time over maybe 5 days. I had to restart a couple of times as I realized better ways to represent the tiles’ locations. I started working in CL in 2020 during the pandemic, and found that working on projects like this game is a good way for me to relax!