loading...

Insert a block of class assign, assign2, challenge or challenge2 with data related to a GitHub (Classroom) assignment.

assignment(
  name,
  url,
  alturl = url,
  course.ids = NULL,
  course.urls = NULL,
  course.starts = NULL,
  course.ends = NULL,
  part = NULL,
  course.names = c(course1 = "Data Science"),
  toc = "",
  clone = TRUE,
  level = 3,
  n = 1,
  type = if (n == 1) "ind. github" else "group github",
  acad_year = "",
  term = "",
  texts = assignment_en(),
  assign.img = "images/list-assign.png",
  assign.link = "github_assignment",
  block = "assign",
  template = "assignment_en.html",
  baseurl = "/"
)

assignment2(
  name,
  url,
  alturl = url,
  course.ids = NULL,
  course.urls = NULL,
  course.starts = NULL,
  course.ends = NULL,
  part = NULL,
  course.names = c(course1 = "Data Science"),
  toc = "",
  clone = TRUE,
  level = 3,
  n = 1,
  type = if (n == 1) "ind. github" else "group github",
  acad_year = "",
  term = "",
  texts = assignment2_en(),
  assign.img = "images/list-assign2.png",
  assign.link = "github_assignment",
  block = "assign2",
  template = "assignment_en.html",
  baseurl = "/"
)

challenge(
  name,
  url,
  alturl = url,
  course.ids = NULL,
  course.urls = NULL,
  course.starts = NULL,
  course.ends = NULL,
  part = NULL,
  course.names = c(course1 = "Data Science"),
  toc = "",
  clone = TRUE,
  level = 3,
  n = 1,
  type = if (n == 1) "ind. challenge" else "group challenge",
  acad_year = "",
  term = "",
  texts = challenge_en(),
  assign.img = "images/list-challenge.png",
  assign.link = "github_challenge",
  block = "challenge",
  template = "assignment_en.html",
  baseurl = "/"
)

challenge2(
  name,
  url,
  alturl = url,
  course.ids = NULL,
  course.urls = NULL,
  course.starts = NULL,
  course.ends = NULL,
  part = NULL,
  course.names = c(course1 = "Data Science"),
  toc = "",
  clone = TRUE,
  level = 3,
  n = 1,
  type = if (n == 1) "ind. challenge" else "group challenge",
  acad_year = "",
  term = "",
  texts = challenge2_en(),
  assign.img = "images/list-challenge2.png",
  assign.link = "github_challenge",
  block = "challenge2",
  template = "assignment_en.html",
  baseurl = "/"
)

assignment_en(title, part.name, alt, sub, course, toc.def)

assignment_fr(title, part.name, alt, sub, course, toc.def)

assignment2_en(title, part.name, alt, sub, course, toc.def)

assignment2_fr(title, part.name, alt, sub, course, toc.def)

challenge_en(title, part.name, alt, sub, course, toc.def)

challenge_fr(title, part.name, alt, sub, course, toc.def)

challenge2_en(title, part.name, alt, sub, course, toc.def)

challenge2_fr(title, part.name, alt, sub, course, toc.def)

Arguments

name

The name of the assignment or the challenge (usually the same as the name as the GitHub Classroom assignment).

url

The URL of the assignment or challenge (could be a named list for different courses).

alturl

An alternate URL to propose to external users not registered in a course. If not provided, it is the same as url=.

course.ids

Named vector with the Classroom identifiers for the assignments for each course and also possibly, for each group.

course.urls

Named vector with the Classroom URLS for each course, and also possibly for groups. Names are the course identifiers in Moodle, or the groups defined for the users. If NULL, no course-specific sections are added.

course.starts

Named vector (same logic as for course.urls=) with starting dates (characters like "YYYY-mm-dd HH:MM:SS"). A corresponding entry in course.urls= is required, or the dates will be ignored.

course.ends

Named vector (same logic as for course.urls=) with ending dates (characters like "YYYY-mm-dd HH:MM:SS"). A corresponding entry in course.urls= is required, or the dates will be ignored.

part

If the assignment presents several parts in the README.md file (because the same assignment is used at different places), indicate the part here. Otherwise, leave the default value NULL if there are no parts.

course.names

A named character vector with the name of the course. Names used must be the same as for course.urls, but there may be more here, and not necessarily in the same order.

toc

The exercise table of content (ex-toc) label. If toc = "" (default), a generic label is calculated using toc.def from texts. To not display the exercise in the table of content, use toc = NULL.

clone

Should the exercise be listed for cloning the repositories (TRUE by default)? If TRUE, an entry is added in the list of assignments whose repositories should be cloned.

level

The difficulty level (1 = easiest, 2 = more difficult, ...)

n

The number of students per project (by default, n = 1 for individual assignments and 2 for group assignments).

type

The type of exercise. By default, it is "ind. github" or "ind. challenge" if n = 1, or "group github"/"group challenge" otherwise.

acad_year

The academic year (e.g., 2021-2022).

term

The term (e.g., Q1, Q2, Q3).

texts

Various sentences used to construct the assignment bloc. You can make a call to assignment_en() or assignment_fr() as a basis and modify only the sentences you want.

assign.img

The relative path to the image to use before the label in the ex-toc.

assign.link

The link to the assignment help page (when the user clicks on the image in the ex-toc).

block

The class of the div, or the LaTeX environment to use for the assignment block.

template

The template file to use for the URL redirection page (currently only assignment_en.html or assignment_fr.html).

baseurl

The base URL for the web site.

title

The title of the block.

part.name

The word to use for "part".

alt

The text to display for alternate access to the repository (for non-registered users). Use a string following the glue() syntax to replace variables.

sub

The text that appears at the bottom of the assignment block.

course

The text for items corresponding to courses.

toc.def

The default ex-toc label (using glue() syntax).

Value

Markdown code that generates the GitHub Classroom assignment block. It is most conveniently used inside an R chunk in your R Markdown document. If you do not want to break your code chunks inside RStudio, you may use something like if (exists("assignment")) assignment(...).

Details

If the URL contains several entries, names are used to create show/hide divs according to the icourse user information.