Package 'learnitdashboard'

Title: Shiny Dashboard for 'learnitr' Data
Description: A dashboard to explore data generated by 'learnitr' code, such as the 'learnitdown', or the 'learnitgrid' R package. This is a lightweight learning analytics solution for the 'learnitr' ecosystem.
Authors: Martin Lecocq [aut], Philippe Grosjean [aut, cre]
Maintainer: Philippe Grosjean <[email protected]>
License: MIT + file LICENSE
Version: 1.0.1
Built: 2024-10-28 05:06:01 UTC
Source: https://github.com/learnitr/learnitdashboard

Help Index


Get Modules

Description

Get a vector of module named by module and title from a selected course

Usage

get_modules(selected_course, modules_init, acad_year)

Arguments

selected_course

Selected course, can be "All" or specific.

modules_init

The table from which it gets the modules.

acad_year

The academic year of the users.

Value

A vector of module name by module and title

Examples

# Need a reactive context and a MongoDB database

Get Users

Description

Get a vector of users_id named by logins and lastnames from a selected course and with enrolled only or everyone

Usage

get_users(selected_course, only_enrolled, users2_init, acad_year)

Arguments

selected_course

Selected course, can be "All" or specific.

only_enrolled

Only the enrolled users or everyone.

users2_init

The table from which it gets the users.

acad_year

The academic year of the users.

Value

A vector of users_id name by logins and lastnames

Examples

# Need a reactive context and a MongoDB database

is_request function

Description

is_request function

Usage

is_request(input)

Arguments

input

The input to check if there is a request

Value

TRUE if there is a request about this input, FALSE if not

Examples

# Need a reactive context

Prepare Content

Description

Prepare a given dataframe's content with html tags, such as links or images, to be rendered in a timeline.

Usage

prepare_content(data_frame)

Arguments

data_frame

data.frame on which prepare the content.

Value

A vector of html links.

Examples

# Need special data frame

Prepare Request

Description

Prepare the request to get data from MongoDB from chosen arguments and a vector containing different ones.

Usage

prepare_request(request_vector, args, type = NULL)

Arguments

request_vector

Vector of prepared arguments from selected choices.

args

Vector of selected arguments to use in the request.

type

Type of table to query. Can be h5p, learnr or shiny.

Value

A string request with the chosen arguments.

Examples

rv <- c("color" = "red", "type" = "flower")
prepare_request(rv, "color")

Prepare Style

Description

Prepare a given data frame's css style, such as background-color, to be rendered in a timeline.

Usage

prepare_style(data_frame)

Arguments

data_frame

data.frame on which prepare the content.

Value

A vector of css styles

Examples

# Need special data frame

Prepare Url and Alt_Url

Description

Prepare the url and alt_url of a given dataframe, making them an html link.

Usage

prepare_url_alr_url(data_table)

Arguments

data_table

The data frame from which the url and alt_url are prepared.

Value

The given data frame with the url and alt_url prepared as html link.

Examples

# Need a special data frame

Plot the Progression of the Students in the Data Science Exercises

Description

Plot the Progression of the Students in the Data Science Exercises

Usage

progression_plot(login, course, module = NULL, sdd_url)

Arguments

login

The student (GitHub) login.

course

The institutional identifier of the course, e.g., "S-BIOG-015".

module

The module to restrict to, or NULL for all modules in the course.

sdd_url

The URL to the SDD MongoDB database.

Value

This function is used for its side-effect of plotting a chart comparing the student and the class progression.

Author(s)

: Philippe Grosjean (phgrosjean\@sciviews.org)

Examples

#progression_plot(<insert_login_here, "S-BIOG-015",
#  module = NULL, sdd_url = "mongodb://127.0.0.1:27017/sdd")

Run the Shiny Application

Description

Run the Shiny Application

Usage

run_app(
  onStart = NULL,
  options = list(),
  enableBookmarking = NULL,
  uiPattern = "/",
  ...
)

Arguments

onStart

A function that will be called before the app is actually run. This is only needed for shinyAppObj, since in the shinyAppDir case, a global.R file can be used for this purpose.

options

Named options that should be passed to the runApp call (these can be any of the following: "port", "launch.browser", "host", "quiet", "display.mode" and "test.mode"). You can also specify width and height parameters which provide a hint to the embedding environment about the ideal height/width for the app.

enableBookmarking

Can be one of "url", "server", or "disable". The default value, NULL, will respect the setting from any previous calls to enableBookmarking(). See enableBookmarking() for more information on bookmarking your app.

uiPattern

A regular expression that will be applied to each GET request to determine whether the ui should be used to handle the request. Note that the entire request path must match the regular expression in order for the match to be considered successful.

...

arguments to pass to golem_opts. See ?golem::get_golem_options for more details.