-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Handin loses language info on submit #17
Comments
Hi, I'm another user with the same problem. Can you share your rough patch, in case your work helps anybody? For instance, I'm currently taking a look at this problem, but I'm not a Racket expert so I need all the help I can get 😉 |
OK, I might have a better idea. I've found out how HTDP defines those lines: it overrides (in this code) the language's get-metadata method. By hacking my way around (and not even so much), I ended-up with the following stuff which seems to be working (enable BSL and run it in the interactions window). Instead of "fooXXX", one needs the module name (that is, the file name?). I'll next try and add this to the actual handin client. (require drracket/tool-lib)
(require framework/preferences)
(define pref (preferences:get (drracket:language-configuration:get-settings-preferences-symbol)))
(define lang (drracket:language-configuration:language-settings-language pref))
(define settings (drracket:language-configuration:language-settings-settings pref))
> (send lang get-metadata "fooXXX" settings)
";; The first three lines of this file were inserted by DrRacket. They record metadata\n;; about the language level of this file in a form that our tools can easily process.\n#reader(lib \"htdp-beginner-reader.ss\" \"lang\")((modname \"fooXXX\") (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))\n" |
Network transmission and editor concatenation are implemented following the specs (with question marks), but this is still untested, so there are zero chances it already works - take it as a prototype.
Network transmission and editor concatenation are implemented following the specs (with question marks), but this is still untested, so there are zero chances it already works - take it as a prototype.
I got this to work for me (at least for the first test). More testing is needed, but it's progress. I had to update a checker though, to accept the language annotation and specify the right language the same way it is sent. But the impact is limited:
|
Fix racket#17 by loading the language metadata from the DrRacket configuration and prepending it to a clone of the definitions editor before serializing this clone. Warning: This hard-codes the module name to `'handin`, which doesn't sound very good.
When a student submits a file, the language is reset - the three metadata lines that DrRacket inserts are not sent to the server. This is particularly annoying since our course sends out grading packages, and the graders currently have to manually set the language for each submission (we use the HTDP languages)
One potential fix that I've tested is to save the definitions text to a temporary file, then read from the temporary file. This is more of a workaround since there's no way to save to a byte string instead of a file.
I can submit a rough patch for this, but I suspect this might be a wontfix. Thoughts?
The text was updated successfully, but these errors were encountered: