-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Show Me Another Refactor #612
Conversation
1adc11c
to
484f28b
Compare
Note, this should be pulled into develop after 2.11 is split off. |
…o smaref Conflicts: lib/WeBWorK/ContentGenerator/Problem.pm
I merged develop into this branch. The conflicts with problem got kind of hairy so you should also check:
|
So ultimately this has been pulled into develop before 2.11 is split off? I'm looking for things that I can help test. If this is to be part of 2.11, I might put it on that list. If it's coming in later, it's less urgent. |
This is probably better not being in 2.11. If you want to test something, On Tue, Sep 1, 2015 at 10:04 PM, Alex Jordan notifications@github.com
|
I see, I misunderstood "I merged develop into this branch" backwards. We use SMA a lot, and there is one common piece of feedback instructors give me. Since this branch is a major SMA restructuring, I think I will comment about it here. But these comments apply to develop right now, not to any work that has already been done with this branch. Basically, it's too hard/tedious to set the SMA threshold numbers (the number of tries it takes for the SMA button to unlock). This is a problem-by-problem parameter. It's real original purpose was just so you can set it to -1 to turn SMA off on certain problems, but we increased its functionality by making it an attempt threshold for unlocking the button. If an instructor imports a set from a .def (V1) where all of the SMA threshold numbers were blank, then the value of $problemDefaults{showMeAnother} is written to the database for each problem. If an instructor imports a set from a .def (V2) where all of the SMA threshold numbers were defined, then those numbers are written to the database entry for the problem. (I haven't explored a V1 .def where all/some of the SMA threshold numbers are defined.) At this point, since numbers have been written to the database, the only thing an instructor can do to change these threshold numbers is to manually change each one for each problem. This scenario is bad when they are using a .def file they inherited from someone else. (If it's V1 and the SMA threshold numbers are blank, and if they know they can set $problemDefaults{showMeAnother} in course.conf, then that helps, but most faculty don't know to do that. But it doesn't help after the import, and it doesn't help with V2 problem .defs, which have mostly hard-coded whatever $problemDefaults{showMeAnother} was set to on the previous user's course.) One idea to remedy this is as follows:
Once this branch is merged into develop later, if what I am talking about is still an issue, I can volunteer to implement what I have described here. Assuming there isn't something bad about it someone sees. |
I'm not fond of having more magic keywords floating around. It also doesn't necessarily solve your problem of someone exporting a set with -1's for the SMA field and having that set imported by someone who wants to then use SMA. The -1's will still be put into the database and you will still have to change things manually. Or am I misunderstanding? |
If preferred, instead of 'inherit', just leaving that database entry blank could serve the same purpose. It just probably violates some principle of coding to purposely leave an entry blank. Or -2 could take that roll, but then we start having more cryptic numerical codes that serve purposes. In what I describe, values other than 'inherit' (or empty, or -2) would not be put into the database very often.
And all this can work the other way too, where Alice uses SMA a lot and has the threshold at 0 most of the time, but Bob only wants to use it here and there. |
It would have to be a magic number. The "words" that go there are just sugar added by ProblemSetDetail. And I suppose you would have to add that as well, although I would call it "default" and not "inherit". You should also put a tool tip next to the box to indicate what all of these magic words mean. The only other solution I can think of is to only allow a course wide settings. SMA is either on for the whole course with a certain set of parameters or off for the whole course. Why do we need to turn SMA off for certain problems again? |
| Why do we need to turn SMA off for certain problems again? The biggest reason I recall is you might mostly want it on, but turn it off for multiple choice questions. If the multiple choice question scrambles the order of options, it will be enough to count as a new version even if the options are the same. So it gives away the answer to the question that's for credit. |
Ah. Yeah, this was always the fundamental danger of SMA. I suppose we have a choice: Option 1: Make Show Me Another a global option. Its mostly global right now. The only per problem option is the number of attempts to make the button available. The benefit is the whole system is simpler. The downside is that there are problems where information leakage could occur with SMA. Option 2: Allow for a "default"/"inherit" value for the number of attempts to make show me another available. The upside is you can now allow each problem to have individual values if you want, but you can also set things up so that they get the default value. The downside is its more complex and means we have an extra problem parameter which may not be used much. |
I think the main reason we wanted SMA to be configured on a problem by I thought that I had coded a default value along the lines of the inherit PS: very happy to see it receiving some more attention! On Thursday, September 3, 2015, Geoff Goehle notifications@github.com
|
@cmhughes I think that you had coded that way. More specifically, I think that you had it so that database entries for the threshold for each problem were left blank when there was nothing in the .def file to use. And so then it all relied on the global parameter. Over the past year, I could tell faculty to add a line to their course.conf to generally change all of their SMA numbers, as long as none had already been written to the database. But now that I have pulled develop, this is no longer the case. It appears that now when you import a .def where the SMA thresholds are blank, then it is taking the global value and writing it to the database for each problem. So at that point if you change the global value, it's too late. And if you export the set, the resulting .def will have the global threshold for each problem instead of blanks. I think this may have to do with implementing the new "V2" format for .def files. |
Its not really problem list v2 or v1. I think you will have the same behavior with both. Its the line
This is the line that is setting $showMeAnother to be the default value. If you really want a NULL database entry to mean the default then you just delete this. However, if you do that then users will never be able to get back to the default if they enter a value. |
This line is in develop, and not in master. So that explains why I am seeing a behavior change. |
Would reverting the behaviour back to the way it is in master be appropriate for 2.11? |
Hard to say. I'm not a great software engineer, but it feels wrong to I'd rather get some more opinions first. In any case, I can volunteer to On Fri, Sep 4, 2015 at 1:47 PM, Geoff Goehle notifications@github.com
Alex Jordan |
…o smaref Conflicts: lib/WeBWorK/ContentGenerator/Problem.pm
…fault setting for show me another.
Made changes suggested by Alex, there is now a "showMeAnotherDefault" option in the configuration menu and if the show me another value for a problem is -2 then this default is used. The -2 is also used as the default value for newly created problems. Things to test:
|
on this problem: Library/ma117DB/set1b/srw1_3_77.pg show me another button is shown but I get the response: WeBWorK was unable to generate a different version of this problem; close this tab, and return to the original problem. https://hosted2.webwork.rochester.edu/webwork2/gage_test/showMeAnother/3/ |
when I go to the show me another button I see that I have attempted the problem 1,001 times. |
this seems to work correctly with minor caveats. Is there someway to detect in advance whether a "show me another" problem can be created? It's a little frustrating if there are several problems that display a "show me another button" but then give the message that the problem can't be created when you press it. For the instructor it might not be clear as to why a different problem can't be created. (see examples above) |
Addressing the easy ones first:
|
The way it works is the HTML for the potential new version of the problem If there is any difference (even if the two problems have the same answer) Looking for this ahead of time is problematic because each load of a We wanted it to work this way because:
I can't look at that problem right now, but are you sure that even though It's perhaps tedious, but if you know SMA will fail like this on a problem, I'd like to make the filled-out answer blanks go away. That is a definite Agreed on 1001. On Tue, Oct 20, 2015 at 5:42 PM, Michael Gage notifications@github.com
Alex Jordan |
Let’s fix the autofill and leave the other two as is. Neither is fatal and you get used to it Could we just turn this part off on the show_me_another_page? I’m not sure that info is necessary on the practice page. Take care, Mike
|
- Changed ShowMeAnother so that show old answers is always false.
I made the two requested changes. |
OK. This looks good. I'm pulling it. |
This refactors the Show Me Another to be its own content generator page inheriting the elements of the Problem content generator page. In particular most of the Show Me Another elements have been removed from Problem and put into their own perl module. Test by checking to see that show me another still works as intended.