Index: trunk/extensions/Contest/specials/SpecialMyContests.php |
— | — | @@ -303,9 +303,26 @@ |
304 | 304 | $form->setSubmitText( wfMsg( 'contest-submission-submit' ) ); |
305 | 305 | |
306 | 306 | $challengeId = $contestant->getField( 'challenge_id' ); |
307 | | - $challenge = ContestChallenge::getTitlesForIds( $challengeId ); |
308 | | - $output->addWikiMsg( 'contest-submission-challenge', $challenge[$challengeId] ); |
| 307 | + $challenges = $contest->getChallenges(); |
309 | 308 | |
| 309 | + /** |
| 310 | + * @var $challenge ContestChallenge |
| 311 | + */ |
| 312 | + $challenge = null; |
| 313 | + foreach( $challenges as $challenge ) { |
| 314 | + if ( $challenge->getId() == $challengeId ) { |
| 315 | + break; |
| 316 | + } |
| 317 | + } |
| 318 | + |
| 319 | + if ( $challenge !== null ) { |
| 320 | + $challengeName = $challenge->getField( 'title' ); |
| 321 | + $challengeDescription = $challenge->getField( 'text' ); |
| 322 | + |
| 323 | + $output->addWikiMsg( 'contest-submission-challenge', $challengeName ); |
| 324 | + $output->addWikiMsg( 'contest-submission-challenge-description', $challengeName, $challengeDescription ); |
| 325 | + } |
| 326 | + |
310 | 327 | if( $form->show() ) { |
311 | 328 | $query = is_null( $this->submissionState ) ? '' : $this->submissionState; |
312 | 329 | $output->redirect( $this->getTitle( $contest->getField( 'name' ) )->getLocalURL( $query ) ); |
Index: trunk/extensions/Contest/Contest.i18n.php |
— | — | @@ -207,7 +207,8 @@ |
208 | 208 | 'contest-submission-invalid-url' => 'This URL does not match one of the allowed formats.', |
209 | 209 | 'contest-submission-new-submission' => 'You still need to enter the URL to your submission. This needs to be done before the deadline.', |
210 | 210 | 'contest-submission-current-submission' => 'This is the URL to your submission, which you can modify untill the deadline.', |
211 | | - 'contest-submission-challenge' => 'You are currently on the $1 challenge', |
| 211 | + 'contest-submission-challenge' => 'You are currently participating in the $1 challenge.', |
| 212 | + 'contest-submission-challenge-description' => "'''Current challenge: $1''' -- $2", |
212 | 213 | |
213 | 214 | // TODO: how can this be done properly in JS? |
214 | 215 | 'contest-submission-domains' => 'Submissions are restricted to these sites: $1', |
— | — | @@ -288,6 +289,9 @@ |
289 | 290 | 'contest-mycontests-addition-success' => 'Message shown when a user has added a submission', |
290 | 291 | 'contest-mycontests-updated-success' => 'Message shown when a user has editied a submission', |
291 | 292 | 'contest-mycontests-sessionfail' => 'Session failure', |
| 293 | + |
| 294 | + 'contest-submission-challenge' => 'Tells the user which challenge they are part of. $1 is the challenge name', |
| 295 | + 'contest-submission-challenge-description' => 'Output of challenge name and description. $1 is the challenge name, $2 is the challenge description', |
292 | 296 | ); |
293 | 297 | |
294 | 298 | /** German (Deutsch) |