WeBWorK Main Forum

events that cause entry in answer.log

Re: events that cause entry in answer.log

by Michael Gage -
Number of replies: 0
One place from the Problem page (actually ProblemUtil.pm)

if ( defined($answer_log ) and defined($pureProblem)) {
if ($submitAnswers && !$authz->hasPermissions($effectiveUser, "dont_log_past_answers")) {
...
writeCourseLog(....)

}

and when a GatewayQuiz is graded. (line 1699 in GatewayQuiz.pm)

Those are the only places where writeCourseLog( is called to enter results into answer_log()
----------------------------
the activity_log is another story:

# We only write to the activity log if it has been defined and if
# we are in a specific course. The latter check is to prevent attempts
# to write to a course log file when viewing the top-level list of
# courses page.
WeBWorK::Utils::writeCourseLog($ce, 'activity_log',
$self->prepare_activity_entry) if ( $r->urlpath->arg("courseID") and
$r->ce->{courseFiles}->{logs}->{activity_log});

it is written to with every course page displayed if it is turned on . By default it is turned off. From defaults.config:

# Log for almost every click. By default it is the empty string, which
# turns this log off. If you want it turned on, we suggest
# "$courseDirs{logs}/activity.log"
# When turned on, this log can get quite large.
$courseFiles{logs}{activity_log} = '';