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

Diff of /trunk/pg/macros/PGanswermacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1462 Revision 1463
129 $functVarDefault , 129 $functVarDefault ,
130 $functLLimitDefault , 130 $functLLimitDefault ,
131 $functULimitDefault , 131 $functULimitDefault ,
132 $functMaxConstantOfIntegration , 132 $functMaxConstantOfIntegration ,
133 $CA , 133 $CA ,
134 $rh_envir , 134 $rh_envir ,
135); 135);
136 136
137 137
138 138
139 139
159 $functULimitDefault = main::PG_restricted_eval(q!$main::functULimitDefault!); 159 $functULimitDefault = main::PG_restricted_eval(q!$main::functULimitDefault!);
160 $functMaxConstantOfIntegration = main::PG_restricted_eval(q!$main::functMaxConstantOfIntegration!); 160 $functMaxConstantOfIntegration = main::PG_restricted_eval(q!$main::functMaxConstantOfIntegration!);
161 $rh_envir = main::PG_restricted_eval(q!\%main::envir!); 161 $rh_envir = main::PG_restricted_eval(q!\%main::envir!);
162} 162}
163 163
164
165
164########################################################################## 166##########################################################################
167
168#Note use $rh_envir to read environment variables
169
165########################################################################## 170##########################################################################
166## Number answer evaluators 171## Number answer evaluators
167 172
168=head2 Number Answer Evaluators 173=head2 Number Answer Evaluators
169 174
2492 $ans_eval; 2497 $ans_eval;
2493} 2498}
2494 2499
2495sub anstext_non_anonymous { 2500sub anstext_non_anonymous {
2496 ## this emails identifying information 2501 ## this emails identifying information
2497 my $num = shift; 2502 my $num = shift;
2498 my $psvnNumber = PG_restricted_eval(q!$main::psvnNumber!); 2503 my $psvnNumber = PG_restricted_eval(q!$main::psvnNumber!);
2499 my $probNum = PG_restricted_eval(q!$main::probNum!); 2504 my $probNum = PG_restricted_eval(q!$main::probNum!);
2500 my $studentLogin = PG_restricted_eval(q!$main::studentLogin!); 2505 my $studentLogin = PG_restricted_eval(q!$main::studentLogin!);
2501 my $studentID = PG_restricted_eval(q!$main::studentID!); 2506 my $studentID = PG_restricted_eval(q!$main::studentID!);
2502 my $studentName = PG_restricted_eval(q!$main::studentName!); 2507 my $studentName = PG_restricted_eval(q!$main::studentName!);
2503 2508
2504 2509
2505 my $ans_eval_template = store_ans_at(\$QUESTIONNAIRE_ANSWERS); 2510 my $ans_eval_template = store_ans_at(\$QUESTIONNAIRE_ANSWERS);
2506 my $ans_eval = sub { 2511 my $ans_eval = sub {
2533 # then mail out all of the answers, including this last one. 2538 # then mail out all of the answers, including this last one.
2534 2539
2535 send_mail_to( $user_address, 2540 send_mail_to( $user_address,
2536 'subject' => "$main::courseName WeBWorK questionnaire", 2541 'subject' => "$main::courseName WeBWorK questionnaire",
2537 'body' => $QUESTIONNAIRE_ANSWERS, 2542 'body' => $QUESTIONNAIRE_ANSWERS,
2538 'ALLOW_MAIL_TO' => PG_restricted_eval(q!$main::rh_envir->{ALLOW_MAIL_TO}!) 2543 'ALLOW_MAIL_TO' => $rh_envir->{ALLOW_MAIL_TO}
2539 ); 2544 );
2540 2545
2541 my $ans_hash = new AnswerHash( 'score' => 1, 2546 my $ans_hash = new AnswerHash( 'score' => 1,
2542 'correct_ans' => '', 2547 'correct_ans' => '',
2543 'student_ans' => 'Answer recorded', 2548 'student_ans' => 'Answer recorded',
2587 my $ra_allow_mail_to = shift; 2592 my $ra_allow_mail_to = shift;
2588 $subject = "$main::courseName WeBWorK questionnaire" unless defined $subject; 2593 $subject = "$main::courseName WeBWorK questionnaire" unless defined $subject;
2589 send_mail_to($user_address, 2594 send_mail_to($user_address,
2590 'subject' => $subject, 2595 'subject' => $subject,
2591 'body' => $QUESTIONNAIRE_ANSWERS, 2596 'body' => $QUESTIONNAIRE_ANSWERS,
2592 'ALLOW_MAIL_TO' => $ra_allow_mail_to, 2597 'ALLOW_MAIL_TO' => $rh_envir->{ALLOW_MAIL_TO},
2593 ); 2598 );
2594} 2599}
2595 2600
2596########################################################################## 2601##########################################################################
2597########################################################################## 2602##########################################################################

Legend:
Removed from v.1462  
changed lines
  Added in v.1463

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9