1.0.11 • Published 4 years ago

codepost-embed v1.0.11

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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

NameDescriptionTypeRequired?
tokenauthentication tokenstringTrue
sourcethe name of the parent appstringTrue
routethe starting route for codePoststringFalse
assignmentA codePost assignment ID. If specified, codePost will open the student's upload window for this assignment.numberFalse
filesA 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
1.0.11

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago