Sharing project with students as read-only

Hi,
As a teacher I would like to share C code with students in read-only option to show them possible solution. Did some searches, but couldn’t find how to do it.

Hi. You can just share the link to your repl, so they can see the code and run it, but cannot edit it. Is this what you were looking for?

1 Like

Hey @janeksz! Welcome to the formus!

If you want just want to display code without the ability of running them, you can use websites like Pastebin to upload your files there.

Otherwise, you can just share by copying the URL when you go into the cover page of your Repl like what @Nicolello has mentioned.

1 Like

yes, that’s what i want. I see just going through the Publish sequence does the job. However it doesn’t come always with an option of Show Files. Where is it hidden?

1 Like

It works with Firefox browser, doesn’t work with Chrome, where the Show Files is not displayed. It is actually displayed for a sec and then disappear for good. It’s a problem as our students have only Chrome installed on their workshop computers. Can it be fixed?
Chrome_problem_with_sharing

OK on Firefox (doesn’t work on Chrome)
OK_on_Firefox

With the new Replit UI, the show files button has been moved.

1 Like

I would like people I’m sharing with to be able to see the C source code, but not edit it. Can can that be achieved then? Only the terminal output is shown. Is there a way to do it? if not, is there another option for sharing read-only C source

Yes, your students can click the “Show Code” button, and see your files.

There is no “Show Code” button in a new version as I was just inform, so is it or not or is it hidden somewhere?

The button looks like this: < >

1 Like

ok well … this is kinda of a hush hush thing but I will link a solution

idk how to do a button in markdown but if u could do it @bigminiboss with: < > that might help lol

EDIT: you totallyyyyyyy hearted this before you read the whole thing.

1 Like

I have a very fast reading speed so I finished it and hearted… :confused:

  1. get your replit sid
  2. here you have to run this python code:
import os
os.system("pip install replit-bot") # cheap fix but lol

from replit_bot import gql

sid = "YOUR_SID_HERE"
x = gql("", "repl", {"url": "YOUR_REPL_URL"})
id = x["repl"]["id"]

gql(
    sid,
    "addMultiplayer",
    vars={"username": USERNAME_OF_STUDENT, "replId": id, "type": "r"},
)
1 Like

aint no wayyyyy that works. Imma try it rn lol :nerd_face:

1 Like

well, does it work out? I never tested the code lol

have i filled it out correctly?:

import os
os.system("pip install replit-bot")

from replit_bot import gql

sid = "my sid"
x = gql("", "repl", {"url": "https://replit.com/@JayAySeaOhBee14/Day-16100-Days"})
id = x["repl"]["id"]

gql(
    sid,
    "addMultiplayer",
    vars={"username": bigminiboss, "replId": id, "type": "r"},
)
1 Like

I am literally crying rn bc I just put my SID in here :sob:
@not-ethan could you please ban my post into the shadow realm?

EDIT: or anyone who can

1 Like

image
it doesnt work :skull: