Skip to content

Conversation

@rossellhayes
Copy link
Contributor

@rossellhayes rossellhayes commented Feb 16, 2023

  • When only one of solution or submitted is an infix, provide the whole context,
    • e.g. "I expected you to call mean() where you called (x + y)/2."
  • When both solution and submitted are infixes, provide jus the operator,
    • e.g. "I expected you to call + where you called *."

Closes #84.

TODO

user <- "sqrt(1 + 2)"
solution <- "sqrt(1 + 2 + 3)"
code_feedback(user, solution)
#> In `1 + 2`, I expected `1 + 2` where you wrote `1`.
  • Don't reveal the contents of functions that are infix arguments
user <- "b(1)"
solution <- "b(1) + 2"
code_feedback(user, solution)
#> I expected you to call `b(1) + 2` where you called `b()`.
  • Investigate how we give feedback on the base pipe (|>)
  • Improve handling of repeated operators (e.g. !!, !!! and {{ }})

Created on 2023-02-16 with reprex v2.0.2

…ix operators

* When only one of `solution` or `submitted` is an infix, provide the whole context,
e.g. "I expected you to call `mean()` where you called `(x + y)/2`."
* When both `solution` and `submitted` are infixes, provide jus the operator,
e.g. "I expected you to call `+` where you called `*`."
@rossellhayes rossellhayes added the grade code Related to automatic code grading label Feb 16, 2023
@rossellhayes rossellhayes self-assigned this Feb 16, 2023
@CLAassistant
Copy link

CLAassistant commented Jul 3, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grade code Related to automatic code grading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better handling of infix operators

3 participants