Table Resets button.timeSincePress?

Hi all,

Wondering if I can get some help with my button feature. I’d like the students to marked as correct if

  • Both tables are correct
  • All points are plotted correct
    *and the button is pressed to “graph” the function…I’m using button.timeSincePress(99) > 0.

My problem is that if they alter any cell in the table component, the timeSincePress resets. How can I fix this? Here is the activity. [LINK]!
Here is what it looks like when correct.
correct|690x361 (Graphing in Transformational Form • Activity Builder by Desmos)

Thank you so much for helping!

You can use button.pressCount>0 instead if you don’t care about the time.

The only problem with button.pressCount>0 is that if a student plots the points incorrectly, presses “Graph It”, then adjusts their points, the graphed square root disappears (As I want). I want to force the correctness to include the last button press.
In other words: A student could press “Graph it” once with an incorrect graph and the pressCount is already > 0. Does this make sense?
I had so many students complete the problem correctly yesterday, then adjust their table and the correctness went away. I’m just trying to capture their last button press somehow.

You can use the capture sink in the button CL to capture the coordinates, then in the graph CL use button.lastValue for your correct sink.

So, button CL:

capture(`a_1`): graphcbrt.number(`a_1`)
capture(`b_1`): graphcbrt.number(`b_1`)...
etc.

Then, in the graph CL:

correct= button.lastValue(`a_1`) and ...button.pressCount>0
1 Like

This imo is a UX bug and should not be happening.

Altering focus-state should NOT reset an animation. I’ve mentioned this before but it’s gone nowhere.

Thank you. Here is a video of what is happening. For Daniel Grubbs - Desmos.wmv - Google Drive

Here is the updated activity: Graphing in Transformational Form • Activity Builder by Desmos

Thank you so much for your help!

Take out timeSincePress and use pressCount. The time reset won’t matter, and because you’re using lastValue the correction won’t automatically change, the button needs to be pressed to check the graph again.