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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6058 - (download) (as text) (annotate)
Thu Jun 25 23:28:44 2009 UTC (10 years, 6 months ago) by gage
File size: 2114 byte(s)
syncing pg HEAD with pg2.4.7 on 6/25/2009

    1 ################################################################################
    2 # WeBWorK Online Homework Delivery System
    3 # Copyright  2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
    4 # $CVSHeader$
    5 #
    6 # This program is free software; you can redistribute it and/or modify it under
    7 # the terms of either: (a) the GNU General Public License as published by the
    8 # Free Software Foundation; either version 2, or (at your option) any later
    9 # version, or (b) the "Artistic License" which comes with this package.
   10 #
   11 # This program is distributed in the hope that it will be useful, but WITHOUT
   12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   13 # FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
   14 # Artistic License for more details.
   15 ################################################################################
   16 
   17 =head1 NAME
   18 
   19 parserCustomization.pl - Placeholder for site/course-local customization file.
   20 
   21 =head1 DESCRIPTION
   22 
   23 Copy this file to your course templates directory and put any
   24 customization for the Parser that you want for your course
   25 here.  For example, you can make vectors display using
   26 ijk notation (and force students to use it for entering
   27 vectors) by uncommenting:
   28 
   29   $context{Vector} = Parser::Context->getCopy("Vector");
   30   $context{Vector}->flags->set(ijk=>1);
   31   $context{Vector}->parens->remove('<');
   32 
   33 To allow vectors to be entered with parens (and displayed with
   34 parens) rather than angle-brakets, uncomment
   35 
   36   $context{Vector} = Parser::Context->getCopy("Vector");
   37   $context{Vector}->{cmpDefaults}{Vector} = {promotePoints => 1};
   38   $context{Vector}->lists->set(Vector=>{open=>'(', close=>')'});
   39 
   40 (This actually just turns points into vectors in the answer checker
   41 for vectors, and displays vectors using parens rather than angle
   42 brakets.  The student is really still entering what the Parser
   43 thinks is a point, but since points get promoted automatically
   44 in the Value package, that should work.  But if a problem checks
   45 if a student's value is actually a Vector, that will not be true.)
   46 
   47 =cut
   48 
   49 sub _parserCustomization_init {}
   50 
   51 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9