-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error with brace and x #1050
Comments
I do not believe that this has anything to do with MathQuill. It seems the same error occurs if MathQuill is not enabled for the course. |
Oh, sorry. I was led to believe that matters, because we have these exercises with alternating MQ (for interval notation) and non-MQ (for set-builder notation) answer blanks, and it seemed like my testing only showed this in the non-MQ answer blanks. But maybe the context() of the answer matters for this. |
I suspect the problem is due to using But there is really no reason to use this as a |
There is something else with this. If I:
Actually it's the same if I change to |
Just a guess, but for |
@dpvc I would guess I'm in the top 1% of WW users as far as understanding MathObjects, but I still don't truly understand everything that goes on with |
It turns out the If you add sub perl {
my $self = shift;
my $rop = $self->{coords}[0]{rop};
return $self->Package('InequalitySetBuilder' . $rop->type)->new($rop)->perl;
} to the sub new {
my $self = shift;
$self = $self->Package($self->type)->new(@_);
return $self->Package('SetBuilder')->new($self);
} to the Currently, the inequalities used in the sets must have the set variable on one side and a constant on the other. It would be potentially possible to allow a formula rather than a constant, so that set-values formulas would make sense. So you could do Context()->variables->add(a => 'Real');
$S = Formula("{x : x > 2a+3}"); but that isn't currently allowed. |
Yes, I would say you are in the top 1% for this esoteric and finicky process. Kudos for being so successful with it! As for
Finally, the reduction flags are returned to their original values, and the formula or constant Value object is returned. Some properties (like |
I have looked further into the question of using set-valued formulas, and it turns out that the real culprit is the Inequalities contexts, which also don't properly implement the $S1 = Compute("{ x : x > 3a + 1 }");
$S2 = Compute("{ x : a < x < 2a }"); and so on. When To solve this, this patch allows you to mark a variable as an arbitrary "constant" using Context()->variables->add(a => "Constant"); which is a real-valued variable that is to be considered a constant, but still takes part as a variable in formula comparisons. This is what allows the Inequalities contexts to determine which side of an inequality like Context("Inequalities");
Context()->variables->add(a => "Constant");
$I = Compute("a < x"); the variable In any case, this patch (against the current This patch should not harm existing problems, as the formulas only come into play when there are variables set up as |
In
develop
, with the following problem:If I type into a MQ answer blank
{x:x>1}
and submit the answer,syntax error at (eval 1515) line 6, near "$x :"
.The text was updated successfully, but these errors were encountered: