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.10.0 |
Built: | 2024-11-22 05:38:07 UTC |
Source: | https://github.com/learnitr/learnitprogress |
Check if a GitHub user profile exists by checking its homepage.
Get the list of required parameters to identify a student from the URL.
check_profile(profile, url_profile) query_params_list() is_correct_query(query) profile_from_query(query)
check_profile(profile, url_profile) query_params_list() is_correct_query(query) profile_from_query(query)
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¶m2=2). The query is a character string with each value, named with the parameters names. |
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
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
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"))
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
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"))
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"))
class |
The short identifier of the class |
url |
The URL of the MongoDB database (LRS) |
as.json |
If |
aa |
The short identifier of the activity |
module |
The module to restrict too, or |
email |
The email of the student |
A character vector with the results
Get data from exercises or projects for one student
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)
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)
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 |
icourse |
The course identifier |
module |
The module, or |
root_dir |
The root directory where the grades are stored. |
acad_year |
The academic year to use, or |
A data frame or a list with the data
Progression in learnrs, H5P and Shiny apps
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") )
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") )
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 |
A data frame with all the progression data for the user and the class
Visualize details about the grade for one student
plot_grade(data, show.name = TRUE, give.note = TRUE)
plot_grade(data, show.name = TRUE, give.note = TRUE)
data |
Grading data |
show.name |
Indicate the name of the student in the title |
give.note |
Indicate the final note in the title |
A ggplot object
Progression plot for one student (exercises H5P, Shiny & Learnr)
plot_progression(user, data)
plot_progression(user, data)
user |
The user login |
data |
The data for this user |
A ggplot object
Show the progress report for one student
report_progress( email, second.course = FALSE, course = NULL, module = NULL, browse = TRUE, url = getOption("learnitr.lrs_url"), port = 3260 ) run_progress_report(port = 3260)
report_progress( email, second.course = FALSE, course = NULL, module = NULL, browse = TRUE, url = getOption("learnitr.lrs_url"), port = 3260 ) run_progress_report(port = 3260)
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 |
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. |
The URL to the progress report
## 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)
## 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)