WeBWorK Main Forum

comment for instructors

comment for instructors

by Nandor Sieben -
Number of replies: 3
It would be nice to have the ability to write a comment into a pg file that is only displayed for instructors but not for students. Perhaps only in the library browser.

Here is a possible use. Suppose we write an optimization problem for which the
optimal value is always at the boundary of the domain and not at a point where the derivative is zero. This information is not immediately clear by looking at the problem but it may influence whether we want to assign the problem or not.
In reply to Nandor Sieben

Re: comment for instructors

by Michael Gage -
Try using

COMMENT("This only appears in the Library Browser (and in Library Browser 2) -- it is how the MathObjects announcement appears in the library browser");

COMMENT will also accept a list:

COMMENT("line one", "line two", "line three");

Apparently you can only have one COMMENT() per problem -- only the
contents of the last COMMENT() appears in the library.

I believe that COMMENT() has been around for a long time but
I can't recall seeing it used until I started labeling problems
which used MathObjects. So effectively it is "young" command and
its behavior is not yet set in stone.

What suggestions are there for how it should be have -- in addition to the
mechanism it uses now.
In reply to Michael Gage

Re: comment for instructors

by Nandor Sieben -
This is exactly what I had in mind.

It only works for me after loadMacros( ) so I am guessing it's defined in PGstandrad.pl.
In reply to Nandor Sieben

Re: comment for instructors

by Michael Gage -
It's defined in PGbasicmacros.pl which is the largest of the macro files loaded by PGstandard.pl.

Few PG functions will work before loadMacros();

I'm used to placing the COMMENT() as the last item in the problem, just
above ENDDOCUMENT(); but that isn't necessary.