MonthDayYear
Jump to navigation
Jump to search
Comments (for Instructors) Visible in the Library Browser: PG Code Snippet
This code snippet shows the essential PG code to include comments for instructors that are visible only when the PG file is viewed in the Library Browser. Note that this is an insertion, not a complete PG file. This code will have to be incorporated into the problem file on which you are working.
PG problem file | Explanation |
---|---|
$date = $formattedOpenDate; # Built-in WeBWorK variable $date =~s/ .*//; # Prune off the detailed starting time @parts = split('/',$date); # Break apart month, day and year which are separated by / $month = $parts[0]; $day = $parts[1]; $year = $parts[2]; BEGIN_TEXT For the given problem set, $PAR $PAR the Open Date Month is $month $PAR the Open Date Day is $day $PAR the Open Date Year is $year END_TEXT |
Use this code fragment to obtain variables dependent upon the open month, day and/or year. |