WeBWorKdocs

sq_webwork:


Home
Current UR
courses
Visitor
page
Intro to
WeBWorK
WeBWorK 2
Twiki
WW
Community
Grant Support
& awards
Discussion
group
Problem
library
Write/modify
problems
Create &
manage course
Tutorial on
running a course
HowTos
FAQ
WeBWorK2
FAQ
Software
Download
How to
Install WW server
Feedback
Site Map
Change
preferences
Change
password





Prev | Next | manpages

Description

Filter for checking that an answer has (or doesn't have) a certain string in it. This can be used to screen answers where you want them in a particular form (e.g., if you allow most functions, but not trig functions in the answer, or if the answer must include some string).

Syntax

must_have_filter(str, yes_no, error_msg)

Params

First argument is the string to have, or not have
Second argument is optional, and tells us whether yes or no
Third argument is the error message to produce (if any).

Returns

a filter ( a subroutine suitable for use in answer evaluators)

Examples

$new_eval->install_pre_filter(must_have_filter("sin", 'no', "can't use sin() in this answer));

Macro Definition File

PGasu.pl

<| Post or View Comments |>


Prev | Next | manpages

Last update: Wednesday, January 10, 2007 at 10:28:47 PM.
This site maintained using Manila and Frontier software.