| … | |
… | |
| 89 | ### Content-generating functions that should probably not be overridden |
89 | ### Content-generating functions that should probably not be overridden |
| 90 | ### by most subclasses |
90 | ### by most subclasses |
| 91 | |
91 | |
| 92 | sub logo { |
92 | sub logo { |
| 93 | my $self = shift; |
93 | my $self = shift; |
| 94 | return $self->{courseEnvironment}->{urls}->{logo}; |
94 | return $self->{courseEnvironment}->{webworkUrls}->{logo}; |
| 95 | } |
95 | } |
| 96 | |
96 | |
| 97 | sub htdocs_base { |
97 | sub htdocs_base { |
| 98 | my $self = shift; |
98 | my $self = shift; |
| 99 | return $self->{courseEnvironment}->{urls}->{base}; |
99 | return $self->{courseEnvironment}->{webworkUrls}->{base}; |
| 100 | } |
100 | } |
| 101 | |
101 | |
| 102 | sub test_args { |
102 | sub test_args { |
| 103 | my %args = %{$_[-1]}; |
103 | my %args = %{$_[-1]}; |
| 104 | |
104 | |
| … | |
… | |
| 108 | ""; |
108 | ""; |
| 109 | } |
109 | } |
| 110 | |
110 | |
| 111 | # Used by &go to parse the argument fields of the template escapes |
111 | # Used by &go to parse the argument fields of the template escapes |
| 112 | sub cook_args($) { |
112 | sub cook_args($) { |
|
|
113 | # There are a bunch of commented-out lines that I am using to remind myself |
|
|
114 | # That I want to write a better regex sometime. |
| 113 | my ($raw_args) = @_; |
115 | my ($raw_args) = @_; |
| 114 | my $args = {}; |
116 | my $args = {}; |
| 115 | #my $quotable_string = qr/(?:".*?(?<*\\)"|\W*)/; |
117 | #my $quotable_string = qr/(?:".*?(?<*\\)"|\W*)/; |
| 116 | #my $quotable_string = qr/(?:".*?(?<!\\)"|\W*)/; |
118 | #my $quotable_string = qr/(?:".*?(?<!\\)"|\W*)/; |
| 117 | #my $test_string = '"hel \" lo" hello'; |
119 | #my $test_string = '"hel \" lo" hello'; |