diff --git a/Handler/ShowChallenge.hs b/Handler/ShowChallenge.hs index 0e634d2..09da88f 100644 --- a/Handler/ShowChallenge.hs +++ b/Handler/ShowChallenge.hs @@ -53,7 +53,12 @@ getShowChallengeR name = do challengeRepo <- runDB $ get404 $ challengePublicRepo challenge - challengeLayout True challenge (showChallengeWidget muserId challenge scheme challengeRepo mainTest repo leaderboard) + challengeLayout True challenge (showChallengeWidget muserId + challenge scheme + challengeRepo + mainTest + repo + leaderboard) getChallengeReadmeR :: Text -> Handler Html getChallengeReadmeR name = do @@ -70,7 +75,14 @@ challengeReadme name = do contents <- liftIO $ System.IO.readFile readmeFilePath return $ markdown def $ TL.pack contents -showChallengeWidget :: Maybe UserId -> Challenge -> RepoScheme -> Repo -> Test -> Repo -> [LeaderboardEntry] -> WidgetFor App () +showChallengeWidget :: Maybe UserId + -> Challenge + -> RepoScheme + -> Repo + -> Test + -> Repo + -> [LeaderboardEntry] + -> WidgetFor App () showChallengeWidget muserId challenge scheme challengeRepo test repo leaderboard = $(widgetFile "show-challenge") where leaderboardWithRanks = zip [1..] leaderboard maybeRepoLink = getRepoLink repo @@ -139,7 +151,7 @@ defaultBranch :: IsString a => RepoScheme -> Maybe a defaultBranch SelfHosted = Just "master" defaultBranch Branches = Nothing -challengeHowTo challenge settings repo idToBeShown isIDSet isSSHUploaded mToken = $(widgetFile "challenge-how-to") +challengeHowTo challenge settings repo shownId isIDSet isSSHUploaded mToken = $(widgetFile "challenge-how-to") getChallengeSubmissionR :: Text -> Handler Html getChallengeSubmissionR name = do diff --git a/templates/challenge-how-to.hamlet b/templates/challenge-how-to.hamlet index f884fab..800a33d 100644 --- a/templates/challenge-how-to.hamlet +++ b/templates/challenge-how-to.hamlet @@ -42,7 +42,7 @@ $case (appRepoScheme settings) \ (see your account) if you want to have a repo hosted on Gonito.net, then:
-    git clone #{appRepoHost settings}#{idToBeShown}/#{challengeName challenge}
+    git clone #{appRepoHost settings}#{shownId}/#{challengeName challenge}
 
   

(Warning about empty repository is expected, don't worry about it.) @@ -86,14 +86,14 @@ $case (appRepoScheme settings) cd #{challengeName challenge} git add foo.py build.sh # add your source codes -$maybe gitAnnexRemote <- (repoGitAnnexRemote repo) +$if isJust (repoGitAnnexRemote repo)

     # if your output files are large or if they should not pushed to the regular repo (e.g. contain sensitive information):
     git annex add dev-0/out.tsv test-A/out.tsv
     git annex copy --to storage
     # otherwise (e.g. they are just class labels), add the output files in a regular manner:
     git add dev-0/out.tsv test-A/out.tsv
-$nothing
+$else
   
     git add dev-0/out.tsv test-A/out.tsv # add your output files