codepost-embed

1.0.11 • Public • Published

codepost-embed

Travis npm package Coveralls

codepost-embed is a React component to conveniently embed codePost on your site.

codePost https://codepost.io is a programming teaching tool used for autograding, code commenting, plagiarism detection, course management, and more. codePost is free for higher ed use.

Please contact team@codepost.io if you are interested in building an integration.

Installation

$ npm install codepost-embed --save

Usage

import CodePostEmbed from 'codepost-embed';

// The starting url route from https://codepost.io
// Examples:
//      route = "/student"
//      route = "/grader"
//      route = "/code/100"
const route = "/"

// The user authentication token
const token = "..."

// The name of your app
const source = "Code in Place"


return (
  <div
    style={{
      height: "80vh",
      width: "80vw",
      margin: "0 auto",
      border: "6px inset gray",
      borderRadius: "8px",
    }}
  >
    <CodePostEmbed route={route} token={token} source={source} />
  </div>
);

Props

Name Description Type Required?
token authentication token string True
source the name of the parent app string True
route the starting route for codePost string False
assignment A codePost assignment ID. If specified, codePost will open the student's upload window for this assignment. number False
files A list of files. If specified along with an assignment, codePost will pre-set the files to be uploaded for the student. [{name: string, data: string}, ...] False

Package Sidebar

Install

npm i codepost-embed

Homepage

codepost.io

Weekly Downloads

2

Version

1.0.11

License

MIT

Unpacked Size

11.5 kB

Total Files

5

Last publish

Collaborators

  • rfre