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

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

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

Revision 6850 Revision 6851
21 21
22sub new { 22sub new {
23 my $class = shift; 23 my $class = shift;
24 my $aux_file_name = shift; #pointer to auxiliary fle 24 my $aux_file_name = shift; #pointer to auxiliary fle
25 my $self = { 25 my $self = {
26 type => 'png', # gif eps pdf html pg (macro: pl) (applets: java js fla geogebra ) 26 type => 'png', # gif eps pdf html pg (macro: pl) (applets: java js fla geogebra (ggb) )
27 path => { content => undef, 27 path => { content => undef, # file path to resource
28 is_complete=>0, 28 is_complete=>0,
29 is_accessible => 0, 29 is_accessible => 0,
30 }, 30 },
31 url => { content => undef, 31 url => { content => undef, # url path to resource
32 is_complete=>0, 32 is_complete=>0,
33 is_accessible => 0, 33 is_accessible => 0,
34 }, 34 },
35 return_uri => '', 35 return_uri => '',
36 recorded_uri => '', 36 recorded_uri => '',
59use PGcore; 59use PGcore;
60#use WeBWorK::PG::IO; 60#use WeBWorK::PG::IO;
61 61
62our @ISA = qw ( PGcore ); # look up features in PGcore -- in this case we want the environment. 62our @ISA = qw ( PGcore ); # look up features in PGcore -- in this case we want the environment.
63 63
64=head2
65
64# new 66# new
65# Create one alias object per question (and per PGcore object) 67# Create one alias object per question (and per PGcore object)
66# Check that information is intact 68# Check that information is intact
67# Construct unique id stubs 69# Construct unique id stubs -- the id stub is for this PGalias object which is
70# attached to all the resource files (except equations) for this question.
68# Keep list of external links 71# Keep list of external links
72
73=cut
74
69sub new { 75sub new {
70 my $class = shift; 76 my $class = shift;
71 my $envir = shift; #pointer to environment hash 77 my $envir = shift; #pointer to environment hash
72 warn "PGlias must be called with an environment" unless ref($envir) eq 'HASH'; 78 warn "PGlias must be called with an environment" unless ref($envir) eq 'HASH';
73 my $self = { 79 my $self = {
88# search directories for item 94# search directories for item
89# make_links -- in those cases where links need to be made 95# make_links -- in those cases where links need to be made
90# create_files -- e.g. when printing hardcopy 96# create_files -- e.g. when printing hardcopy
91# dispatcher -- decides what needs to be done based on displayMode and file type 97# dispatcher -- decides what needs to be done based on displayMode and file type
92# alias_for_html 98# alias_for_html
93# alias_for_image_in_html image includes gif, png, jpg, swf, svg, flv?? ogg?? 99# alias_for_image_in_html image includes gif, png, jpg, swf, svg, flv?? ogg??, js
94# alias_for_image_in_tex 100# alias_for_image_in_tex
95 101
96 102
97sub initialize { 103sub initialize {
98 my $self = shift; 104 my $self = shift;
194 # $adr_output is a url in HTML and Latex2HTML modes 200 # $adr_output is a url in HTML and Latex2HTML modes
195 # and a complete path in TEX mode. 201 # and a complete path in TEX mode.
196 my $adr_output; 202 my $adr_output;
197 my $ext; 203 my $ext;
198 204
205#######################################################################
199 # determine file type 206 # determine file type
200 # determine display mode 207 # determine display mode
201 # dispatch 208 # dispatch
202 209#######################################################################
203 # determine extension, if there is one 210 # determine extension, if there is one
204 # if extension exists, strip and use the value for $ext 211 # if extension exists, strip and use the value for $ext
205 # files without extensions are considered to be picture files: 212 # files without extensions are considered to be picture files:
206 213
207 214

Legend:
Removed from v.6850  
changed lines
  Added in v.6851

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9