Diff for /loncom/homework/default_homework.lcpm between versions 1.21 and 1.22

version 1.21, 2001/05/28 21:47:48 version 1.22, 2001/05/30 15:24:53
Line 3 Line 3
 #   # 
 #  #
 #init some globals  #init some globals
 #use Math::Trig;  
 #  #
 # Guy Albertelli  # Guy Albertelli
 #  #
 # 05/25/2001 H. K. Ng  # 05/25/2001 H. K. Ng
 #  #
 $RANDOMINIT=0;  $RANDOMINIT=0;
 #$pi=atan2(1,1)*4;  $pi=atan2(1,1)*4;
   $rad2deg=180.0/$pi;
   $deg2rad=$pi/180.0;
   
 sub caparesponse_check {  sub caparesponse_check {
   my $answer='';  #done    my $answer='';  #done
Line 154  sub tan  { sin($_[0]) / cos($_[0]) } Line 155  sub tan  { sin($_[0]) / cos($_[0]) }
 #sub atan { atan2($_[0], 1); }  #sub atan { atan2($_[0], 1); }
 #sub acos { atan2(sqrt(1 - $_[0] * $_[0]), $_[0] ); }  #sub acos { atan2(sqrt(1 - $_[0] * $_[0]), $_[0] ); }
 #sub asin { atan2($_[0], sqrt(1- $_[0] * $_[0]) );  }  #sub asin { atan2($_[0], sqrt(1- $_[0] * $_[0]) );  }
   
 sub log10 { log($_[0])/log(10); }  sub log10 { log($_[0])/log(10); }
   
 sub factorial {  sub factorial {
     my $input = int(shift);      my $input = int(shift);
     return "Error - unable to take factorial of an negative number ($input)" if $input < 0;      return "Error - unable to take factorial of an negative number ($input)" if $input < 0;
Line 230  sub map { Line 233  sub map {
   }    }
 }  }
   
   sub name{
     my $fullname = &EXT('environment.lastname').', '.&EXT('environment.firstname').' '.&EXT('environment.middlename');
     $fullname = "" if $fullname eq ",  ";
     return $fullname;
   }
   
   sub student_number { 
     my $id = &EXT('environment.id');
     $id = '' if $id eq "";
     return $id;
   }
   
   sub class {
     my $course = &EXT('course.description');
     $course = '' if $course eq "";
     return $course;
   }
   
   sub sec { 
     my $sec = &EXT('request.course.sec');
     $sec = '' if $sec eq '';
     return $sec;
   }
   
   sub open_date { &EXT('resource.0.opendate') }
   sub due_date { &EXT('resource.0.duedate') }
   sub answer_date { &EXT('resource.0.answerdate') }
   
 sub choose {  sub choose {
   my $num = $_[0];    my $num = $_[0];
   return $_[$num];    return $_[$num];

Removed from v.1.21  
changed lines
  Added in v.1.22


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>