I have a table that the students are completing with exponential expressions. I would like to get a check mark on the teacher dashboard if the students are correct. I was able to get this to work on a previous slide, but am having issues on this slide. I get a dash showing on the teacher dashboard regardless of student accuracy/completion. I really do not understand the coding and am trying to learn. Thank you for your help! Here is my code:
cellContent(4,2): table3.cellContent(4,2)
cellContent(5,2): table3.cellContent(5,2)
cellContent(6,2): table3.cellContent(6,2)
cellContent(7,2): table3.cellContent(7,2)
readOnly: true
b = button5
cellDisableEvaluation(3,3): true
cellDisableEvaluation(4,3): true
cellDisableEvaluation(5,3): true
cellDisableEvaluation(6,3): true
cellDisableEvaluation(7,3): true
p = patterns
exponentPattern = p.exponent(p.literal(“2”),p.number)
row3Correct = exponentPattern.matches(this.cellContent(3,3)) and this.cellNumericValue(3,2) = this.cellNumericValue(3,3)
row4Correct = exponentPattern.matches(this.cellContent(4,3)) and this.cellNumericValue(4,2) = this.cellNumericValue(4,3)
row5Correct = exponentPattern.matches(this.cellContent(5,3)) and this.cellNumericValue(5,2) = this.cellNumericValue(5,3)
row6Correct = exponentPattern.matches(this.cellContent(6,3)) and this.cellNumericValue(6,2) = this.cellNumericValue(6,3)
row7Correct = exponentPattern.matches(this.cellContent(7,3)) and this.cellNumericValue(7,2) = this.cellNumericValue(7,3)
correct: this.cellContent(3,3) = 2^2
and this.cellContent(4,3) = 2^3
and this.cellContent(5,3) = 2^4
and this.cellContent(6,3) = 2^5
and this.cellContent(7,3) = 2^6
cellSuffix(3,3): when b.timeSincePress = 0 “” otherwise “= {this.cellNumericValue(3,3)}"
cellSuffix(4,3): when b.timeSincePress = 0 "" otherwise "= {this.cellNumericValue(4,3)}”
cellSuffix(5,3): when b.timeSincePress = 0 “” otherwise “= {this.cellNumericValue(5,3)}"
cellSuffix(6,3): when b.timeSincePress = 0 "" otherwise "= {this.cellNumericValue(6,3)}”
cellSuffix(7,3): when b.timeSincePress = 0 “” otherwise “= ${this.cellNumericValue(7,3)}”
cellErrorMessage(3,3): when isDefined(this.cellNumericValue(3,3)) “” otherwise “Enter a numeric expression.”
cellErrorMessage(4,3): when isDefined(this.cellNumericValue(4,3)) “” otherwise “Enter a numeric expression.”
cellErrorMessage(5,3): when isDefined(this.cellNumericValue(5,3)) “” otherwise “Enter a numeric expression.”
cellErrorMessage(6,3): when isDefined(this.cellNumericValue(6,3)) “” otherwise “Enter a numeric expression.”
cellErrorMessage(7,3): when isDefined(this.cellNumericValue(7,3)) “” otherwise “Enter a numeric expression.”
warning:
when (isDefined(this.cellNumericValue(3,3)) or isBlank(this.cellContent(3,3)))
and (isDefined(this.cellNumericValue(4,3)) or isBlank(this.cellContent(4,3)))
and (isDefined(this.cellNumericValue(5,3)) or isBlank(this.cellContent(5,3)))
and (isDefined(this.cellNumericValue(6,3)) or isBlank(this.cellContent(6,3)))
and (isDefined(this.cellNumericValue(7,3)) or isBlank(this.cellContent(7,3))) “”
otherwise “Enter a numeric value.”