R/assignment.R
assignment.Rd
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)
The name of the assignment or the challenge (usually the same as the name as the GitHub Classroom assignment).
The URL of the assignment or challenge (could be a named list for different courses).
An alternate URL to propose to external users not registered in
a course. If not provided, it is the same as url=
.
Named vector with the Classroom identifiers for the assignments for each course and also possibly, for each group.
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.
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.
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.
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.
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.
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
.
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.
The difficulty level (1 = easiest, 2 = more difficult, ...)
The number of students per project (by default, n = 1 for individual assignments and 2 for group assignments).
The type of exercise. By default, it is "ind. github"
or
"ind. challenge"
if n = 1, or "group github"
/"group challenge"
otherwise.
The academic year (e.g., 2021-2022).
The term (e.g., Q1, Q2, Q3).
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.
The relative path to the image to use before the label in the ex-toc.
The link to the assignment help page (when the user clicks on the image in the ex-toc).
The class of the div, or the LaTeX environment to use for the assignment block.
The template file to use for the URL redirection page (currently only assignment_en.html or assignment_fr.html).
The base URL for the web site.
The title of the block.
The word to use for "part".
The text to display for alternate access to the repository (for
non-registered users). Use a string following the glue()
syntax to replace
variables.
The text that appears at the bottom of the assignment block.
The text for items corresponding to courses.
The default ex-toc label (using glue()
syntax).
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(...)
.
If the URL contains several entries, names are used to create show/hide divs
according to the icourse
user information.