[system] / trunk / pg / macros / parserCustomization.pl Repository:
ViewVC logotype

Annotation of /trunk/pg/macros/parserCustomization.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3588 - (view) (download) (as text)

1 : dpvc 3588 sub _parserCustomization_init {}
2 :    
3 :     #
4 :     # Copy this file to your course templates directory and put any
5 :     # customization for the Parser that you want for your course
6 :     # here. For example, you can make vectors display using
7 :     # ijk notation (and force students to use it for entering
8 :     # vectors) by uncommenting:
9 :     #
10 :     # $context{Vector} = $Parser::Context::Default::context{Vector}->copy;
11 :     # $context{Vector}->flags->set(ijk=>1);
12 :     # $context{Vector}->parens->remove('<');
13 :     #
14 :     # To allow vectors to be entered with parens (and displayed with
15 :     # parens) rather than angle-brakets, uncomment
16 :     #
17 :     # $context{Vector} = $Parser::Context::Default::context{Vector}->copy;
18 :     # $context{Vector}->{cmpDefaults}{Vector} = {promotePoints => 1};
19 :     # $context{Vector}->lists->set(Vector=>{open=>'(', close=>')'});
20 :     #
21 :     # (This actually just turns points into vectors in the answer checker
22 :     # for vectors, and displays vectors using parens rather than angle
23 :     # brakets. The student is really still entering what the Parser
24 :     # thinks is a point, but since points get promoted automatically
25 :     # in the Value package, that should work. But if a problem checks
26 :     # if a student's value is actually a Vector, that will not be true.)
27 :     #
28 :    
29 :    
30 :     1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9