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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.4855  
changed lines
  Added in v.4856

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9