Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to community solutions after submitting when in Independent Mode #672

Open
kytrinyx opened this issue Jul 24, 2018 · 0 comments
Open

Comments

@kytrinyx
Copy link
Member

kytrinyx commented Jul 24, 2018

We should print the link for people to browse the community solutions if they're not in mentored mode.

At the bottom of the submit command, we can add something like this:

 	fmt.Fprintf(Out, "    %s\n\n", solution.URL)
+
+	siteURL := config.InferSiteURL(usrCfg.GetString("apibaseurl"))
+	msg = `
+    View other solutions to this exercise at:
+    %s/tracks/%s/exercises/%s/solutions
+
+`
+	fmt.Fprintf(Err, msg, siteURL, solution.Track, solution.Exercise)

However, we will need to get the API to tell us which mode a solution is being solved in so that we can check for that before printing it, either as part of the solution metadata when downloading, or as part of the response when submitting. See also #673

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant