[system] / trunk / pg / lib / PGcore.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/PGcore.pm

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

Revision 6292 Revision 6296
28use PGrandom; 28use PGrandom;
29use PGalias; 29use PGalias;
30use PGloadfiles; 30use PGloadfiles;
31use WeBWorK::PG::IO(); # don't important any command directly 31use WeBWorK::PG::IO(); # don't important any command directly
32use Tie::IxHash; 32use Tie::IxHash;
33 33use MIME::Base64;
34################################## 34##################################
35# Utility macro 35# Utility macro
36################################## 36##################################
37 37
38=head2 Utility Macros 38=head2 Utility Macros
576# return $self->($name); #if no parameters just return the value 576# return $self->($name); #if no parameters just return the value
577# } 577# }
578# } 578# }
579 579
580 580
581# Sometimes a question author needs to code or decode base64 directly
582sub decode_base64 ($) {
583 my $self = shift;
584 my $str = shift;
585 MIME::Base64::decode_base64($str);
586}
581 587
588sub encode_base64 ($;$) {
589 my $self = shift;
590 my $str = shift;
591 my $option = shift;
592 MIME::Base64::encode_base64($str);
593}
582sub debug_message { 594sub debug_message {
583 my $self = shift; 595 my $self = shift;
584 my @str = @_; 596 my @str = @_;
585 push @{$self->{flags}->{DEBUG_messages}}, @str; 597 push @{$self->{flags}->{DEBUG_messages}}, @str;
586} 598}

Legend:
Removed from v.6292  
changed lines
  Added in v.6296

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9