webshot_shiny()
now also accepts the path to a PNG file (the screenshot of the app) instead of the url to the Shiny application. This allows to create the webshot image in case the app cannot be accessed directly (for instance, a login in Posit Connect is required). The corresponding RStudio addin is modified to ask for a PNG screenshot if no suitable code is selected.Argument idurl=
added in h5p()
to allow including exercises from h5p.org or h5p.com.
Default directory for assignments is now docs
instead of _book
with subdirectory being ex
an which is now created by clean_ex_doc()
.
Small adaptations due to a transfer into the learnitr GitHub organization.
License changed to MIT.
More robust checking of password.
Do not drop Shinylogs records dir, only eliminate each file when it is processed. This allows for recording of several simultaneous sessions.
Do not record Shinylogs events whose label starts with ".clientdata_output_".
In launch_shiny()
and webshot_shiny()
, default width is increased from 780 to 790, otherwise shiny::sidepanelLayout()
wrap the side panel on the top of the Shiny app.
learnitdown_init()
an h5pxapikatchu js file is not need any more (commented out).assignation()
and assignation2()
are renamed assignment()
and assignment2()
which are more correct names.
Assignments and challenge functions get new arguments. clone=
indicates if we want to generate an entry in a file to clone corresponding repositories automatically. level=
indicates the difficulty level, n=
indicates the number of students per assignment (default to 1 for individual assignments/challenges and to 2 for group assignments/challenges). type=
indicates the type of exercise. acad_year=
is the academic year, and term=
is the term where the exercise has to be done. course.starts=
and course.ends=
indicate starting and ending dates for the exercises for each course (or students groups).
Assignments now create two additional files. An HTML file routes to the correct URL given the context (GitHub Classroom assignment, template GitHub repository if the user is not logged in, or pages indicating it is too soon or too late for these assignments). A CSV file collects assignments information that can be used to clone corresponding repositories and to grade more easily these assignments.
While recording learnr events, the procedure to check if the computer is connected to the Internet sometimes failed without good reasons. Now, check the access to two sites that should be more reliable.
For run_app()
, a better code is now used to display the app running in a job inside the RStudio viewer pane. A new argument max.wait =
indicates the number of seconds to wait for the Shiny app to start.
launch_shiny()
, allow to include a search string in the url.config()
and record_learnr()
.Package renamed {learnitdown} to avoid conflicts with http://learndown.com.
New functions lock()
/unlock()
, using an application (e.g., course) password to lock or unlock sensitive data like students' personal information, or database password.
New obfuscation functions obfuscate()
, ._()
and O()
to hide {learnr} answers in the original .Rmd file. The function ans()
could be used to replace learnr::answer()
for a cleaner obfuscation mechanism for quizzes.
There are now more GitHub assignation types : assign2()
for group assignations and challenge()
/challenge2()
for assignations linked to challenges (individual or in groups).
Images related to exercise blocks and suggested style0.css
and preamble.tex
to be used for {learndown}-enabled {bookdown}s are also provided now.
upgrade=
added to run()
, run_app()
and update_pkg()
. By default, it is "never", which is a good value inside the SciViews Box, but "ask" may be more appropriate elsewhere.assignation()
, links now have target = "_blank"
so that these links are now functional, even inside an iframe.run_app()
now opens the Shiny application in the default browser (but it is still the Viewer pane in RStudio).
In learndown_init()
, links with target=
attributes were retargeted to _parent
, but it is those without target=
that had to be changed (corrected).
In learn()
and launch_shiny()
, the link now have target="_blank"
meaning that RStudio is opened in a different tab.
run()
now tries harder to display a tutorial in the Tutorial tab in RStudio.run()
and run_app()
when nothing is selected in the list.webshot_shiny()
refused to work when it sees the toc =
argument. Solved.Anchors now include part
for assignation()
, so that different anchors are used if different parts of the same assignation are proposed in the same section/module of the bookdown.
Anchor now includes both the image and the iframe for launch_shiny()
.
An error message is now displayed in Shiny applications and learnr tutorials if the database is not accessible.
In learnr tutorials, access to database is tested only once. If it fails, no further attempt is done in this process in order to avoid too much slow down in systematically trying to connect to a non responding database for each event.
Internet access and configuration checking in Shiny applications, with a message displayed in case of error.
Addition of learnr()
and assignation()
functions to create tutorial and GitHub assignation blocks. They use two new blocks: tuto
and assign
blocks with specific icons.
Addition of toc
arguments in h5p()
, launch_shiny()
, 'learnr()
and assignation()
and a function to generate the exercises table of content with show_ex_toc()
. Anchors are added in the respective items, so that the toc can link to them. The four types of items are also associated with specific icons that link to help pages when the user clicks them.
Links to start Shiny applications and learnr tutorials directly in RStudio server in the SciViews Box are added.
trackSubmit()
is now customizable, and a much more complete default is provided in check_shiny_solution()
.delay =
for webshot_shiny()
now at 10 sec in order to catch more correct case with default value.run()
function now runs a tutorial in the RStudio tab if possible.fingerprint()
is renames sign_in()
: more explicit.max_score =
argument added to trackSubmit()
allows to redefine the maximum score for a Shiny application.encrypt()
and decrypt()
are now more versatile and accept more arguments to fine-tune their work.fingerprint()
function added to identify users in local learnr and shiny applications.fingerprint.fun =
in trackEvents()
so that locally run Shiny applications can also use user data stored in the fingerprint cache.learndownLearnrSetup()
to initialize easily learndown learnr apps.config()
function added.LEARNDOWN_LOCAL_STORAGE
and LEARNDOWN_DEBUG
environment variables everywhere (Shiny and learnr applications).trackEvents()
to determine the causes of errors when recording Shiny apps events in a MongoDB database.Shiny apps: do not track events when no login and fallback to temporary directory if path =
is not writable in trackEvents()
.
The number of opened sessions is tracked in a Shiny app and stopApp()
is only invoked if there is no other opened session.
For Shiny applications, trackEvents()
only tracks events in a MongoDB database for logged users. A message appears briefly (5sec) to indicate the status of the recording when the session is started.