Package 'learnitprogress'

Title: Report Student Progress in 'LearnIt::R' Courses
Description: A Shiny app that connects to you LRS ("Learning Record Store" database, as created and managed by the 'learnitdown' package) and displays a report showing the completion of exercices and projects. This report is intended for students to track their progress in the course.
Authors: Philippe Grosjean [aut, cre]
Maintainer: Philippe Grosjean <[email protected]>
License: MIT + file LICENSE
Version: 0.9.0
Built: 2024-08-29 05:58:14 UTC
Source: https://github.com/learnitr/learnitprogress

Help Index


Check student profile to identify it from URL's parameters

Description

# Get the list of required parameters to identify a student from the URL.

Usage

check_profile(profile, url_profile)

query_params_list()

is_correct_query(query)

profile_from_query(query)

Arguments

profile

Profile data gathered from the LRS

url_profile

Profile data gathered from the URL

query

The query part of the URL (text after ?, like in https://mysite.org?params1=1&param2=2). The query is a character string with each value, named with the parameters names.

Details

In Moodle, the URL variables must be set as follows:

  • iemail = Student's email

  • iid = Student' ID ("Nom d'utilisateur" in French in Moodle)

  • ifirstname = First name of the student

  • ilastname = Last name of the student

  • institution = Institution

  • icourse = Identifier for the course

  • ictitle = Title of the course

  • iurl = URL of the Moodle server

  • iref = Moodle ID

Value

TRUE if the profile is correct, FALSE otherwise.

A character vector with the list of parameters

TRUE if all required parameters are in the query, FALSE otherwise.

A list with the required parameters

Examples

query_params_list()
is_correct_query(c(iemail = "[email protected]", iid = "1234",
  ifirstname = "John", ilastname = "Doe", institution = "University",
  icourse = "123", ictitle = "Course title", iurl = "https://moodle.uni.edu",
  iref = "2FAB3EE8-42B5-4B61-DA23-2167FACD7B569"))
is_correct_query(c(iemail = "[email protected]"))
profile_from_query(c(iemail = "[email protected]", iid = "1234", other = "a"))

Get a list of all user logins in a given class

Description

Get a list of all user logins in a given class

Usage

class_logins(class, url = getOption("learnitr.lrs_url"), as.json = FALSE)

class_aa(
  aa,
  url = getOption("learnitr.lrs_url"),
  as.json = FALSE,
  module = NULL
)

user_login(email, url = getOption("learnitr.lrs_url"))

Arguments

class

The short identifier of the class

url

The URL of the MongoDB database (LRS)

as.json

If TRUE, return the result as a JSON string

aa

The short identifier of the activity

module

The module to restrict too, or NULL for all modules

email

The email of the student

Value

A character vector with the results


Get data from exercises or projects for one student

Description

Get data from exercises or projects for one student

Usage

get_data(
  collection,
  query,
  fields = "{}",
  url = getOption("learnitr.lrs_url"),
  count = FALSE
)

get_profile(email, login = NULL)

get_all_data(email, icourse, module = NULL)

get_github_data(email)

get_grid_data(email, icourse, module = NULL)

get_grade_data(email, icourse)

get_grade_dir(root_dir = "/data1/grades", acad_year = NULL)

Arguments

collection

The collection in the MongoDB database

query

The JSON query on the MongoDB database

fields

The fields to return

url

The url to access the MongoDB database

count

Do we count items instead of getting them?

email

The email of the student

login

The GitHub login of the student as alternate way to get its profile (when it is not NULL)

icourse

The course identifier

module

The module, or NULL for exercises in all modules

root_dir

The root directory where the grades are stored.

acad_year

The academic year to use, or NULL to use the latest one.

Value

A data frame or a list with the data


Progression in learnrs, H5P and Shiny apps

Description

Progression in learnrs, H5P and Shiny apps

Usage

learnr_prog(
  user_login,
  class_logins,
  class_aa,
  class_data = NULL,
  url = getOption("learnitr.lrs_url")
)

h5p_prog(
  user_login,
  class_logins,
  class_aa,
  class_data = NULL,
  url = getOption("learnitr.lrs_url")
)

shiny_prog(
  user_login,
  class_logins,
  class_aa,
  class_data = NULL,
  url = getOption("learnitr.lrs_url")
)

Arguments

user_login

The GitHub login of one student

class_logins

All the logins for the class

class_aa

The AA identifier for this class

class_data

The data for this class

url

The url of the MongoDB data base

Value

A data frame with all the progression data for the user and the class


Visualize details about the grade for one student

Description

Visualize details about the grade for one student

Usage

plot_grade(data, show.name = TRUE, give.note = TRUE)

Arguments

data

Grading data

show.name

Indicate the name of the student in the title

give.note

Indicate the final note in the title

Value

A ggplot object


Progression plot for one student (exercises H5P, Shiny & Learnr)

Description

Progression plot for one student (exercises H5P, Shiny & Learnr)

Usage

plot_progression(user, data)

Arguments

user

The user login

data

The data for this user

Value

A ggplot object


Show the progress report for one student

Description

Show the progress report for one student

Usage

report_progress(
  email,
  second.course = FALSE,
  course = NULL,
  module = NULL,
  browse = TRUE,
  url = getOption("learnitr.lrs_url"),
  port = 3260
)

run_progress_report(port = 3260)

Arguments

email

The email address of the student

second.course

Should we display data for a secondary course that the student follows?

course

The primary course

module

Should we restrict data for one module, (or all with NULL)?

browse

Should we browse to the provided URL?

url

The url to connect to the MongoDB database

port

The port where the Shiny application is serving. If 0, a version on a server (for instance, on Posit Connect) is used.

Value

The URL to the progress report

Examples

## Not run: 
# In a different R session, run the following line:
learnitprogress::run_progress_report()
# Then...
options(learnitr.lrs_url = "mongodb://127.0.0.1/sdd")
learnitprogress::report_progress("[email protected]")

## End(Not run)