| … | |
… | |
| 147 | }, |
147 | }, |
| 148 | version_time_limit => { |
148 | version_time_limit => { |
| 149 | name => "Test Time Limit (sec)", |
149 | name => "Test Time Limit (sec)", |
| 150 | type => "edit", |
150 | type => "edit", |
| 151 | size => "4", |
151 | size => "4", |
| 152 | override => "all", |
152 | override => "any", |
| 153 | labels => { "" => 0 }, # I'm not sure this is quite right |
153 | labels => { "" => 0 }, # I'm not sure this is quite right |
| 154 | }, |
154 | }, |
| 155 | time_interval => { |
155 | time_interval => { |
| 156 | name => "Time Interval for New Versions (sec)", |
156 | name => "Time Interval for New Versions (sec)", |
| 157 | type => "edit", |
157 | type => "edit", |
| … | |
… | |
| 162 | versions_per_interval => { |
162 | versions_per_interval => { |
| 163 | name => "Number of New Versions per Time Interval (0=infty)", |
163 | name => "Number of New Versions per Time Interval (0=infty)", |
| 164 | type => "edit", |
164 | type => "edit", |
| 165 | size => "3", |
165 | size => "3", |
| 166 | override => "all", |
166 | override => "all", |
|
|
167 | labels => { "" => 0 }, |
| 167 | # labels => { "" => 1 }, |
168 | # labels => { "" => 1 }, |
| 168 | }, |
169 | }, |
| 169 | problem_randorder => { |
170 | problem_randorder => { |
| 170 | name => "Order Problems Randomly", |
171 | name => "Order Problems Randomly", |
| 171 | type => "choose", |
172 | type => "choose", |
| … | |
… | |
| 258 | } else { |
259 | } else { |
| 259 | @fieldOrder = @{ SET_FIELD_ORDER() }; |
260 | @fieldOrder = @{ SET_FIELD_ORDER() }; |
| 260 | |
261 | |
| 261 | # gateway data fields are included only if the set is a gateway |
262 | # gateway data fields are included only if the set is a gateway |
| 262 | if ( $globalRecord->assignment_type() =~ /gateway/ ) { |
263 | if ( $globalRecord->assignment_type() =~ /gateway/ ) { |
| 263 | $gwoutput = "\n<!-- begin gwoutput table -->\n" . CGI::start_table({border => 0, cellpadding => 1}); |
264 | my $gwhdr = "\n<!-- begin gwoutput table -->\n"; |
|
|
265 | my $nF = 0; |
|
|
266 | |
| 264 | foreach my $gwfield ( @{ GATEWAY_SET_FIELD_ORDER() } ) { |
267 | foreach my $gwfield ( @{ GATEWAY_SET_FIELD_ORDER() } ) { |
| 265 | $gwoutput .= CGI::Tr({}, CGI::td({}, [$self->FieldHTML($userID, $setID, $problemID, $globalRecord, $userRecord, $gwfield)])); |
268 | my @fieldData = |
|
|
269 | ($self->FieldHTML($userID, $setID, $problemID, |
|
|
270 | $globalRecord, $userRecord, |
|
|
271 | $gwfield)); |
|
|
272 | if ( @fieldData && $fieldData[1] ne '' ) { |
|
|
273 | $nF = @fieldData if ( @fieldData > $nF ); |
|
|
274 | $gwoutput .= CGI::Tr({}, CGI::td({}, [@fieldData])); |
| 266 | } |
275 | } |
| 267 | $gwoutput .= CGI::end_table() . "\n<!-- end gwoutput table -->\n"; |
276 | } |
|
|
277 | $gwhdr .= CGI::Tr({},CGI::td({colspan=>$nF}, |
|
|
278 | CGI::em("Gateway parameters"))) |
|
|
279 | if ( $nF ); |
|
|
280 | $gwoutput = "$gwhdr$gwoutput\n" . |
|
|
281 | "<!-- end gwoutput table -->\n"; |
| 268 | } |
282 | } |
| 269 | } |
283 | } |
| 270 | |
284 | |
| 271 | my $output = CGI::start_table({border => 0, cellpadding => 1}); |
285 | my $output = CGI::start_table({border => 0, cellpadding => 1}); |
| 272 | if ($forUsers) { |
286 | if ($forUsers) { |
| … | |
… | |
| 282 | unless ($properties{type} eq "hidden") { |
296 | unless ($properties{type} eq "hidden") { |
| 283 | $output .= CGI::Tr({}, CGI::td({}, [$self->FieldHTML($userID, $setID, $problemID, $globalRecord, $userRecord, $field)])) . "\n"; |
297 | $output .= CGI::Tr({}, CGI::td({}, [$self->FieldHTML($userID, $setID, $problemID, $globalRecord, $userRecord, $field)])) . "\n"; |
| 284 | } |
298 | } |
| 285 | # this is a rather artifical addition to include gateway fields, which we |
299 | # this is a rather artifical addition to include gateway fields, which we |
| 286 | # only want to show for gateways |
300 | # only want to show for gateways |
| 287 | $output .= CGI::Tr({}, CGI::td({colspan => '4'}, $gwoutput)) . "\n" |
301 | $output .= "$gwoutput\n" |
| 288 | if ( $field eq 'assignment_type' && |
302 | if ( $field eq 'assignment_type' && |
| 289 | $globalRecord->assignment_type() =~ /gateway/ ); |
303 | $globalRecord->assignment_type() =~ /gateway/ ); |
| 290 | } |
304 | } |
| 291 | |
305 | |
| 292 | if (defined $problemID) { |
306 | if (defined $problemID) { |