Skip to content

Commit b291402

Browse files
committed
New addin to create a course issue
1 parent 55c9af8 commit b291402

File tree

6 files changed

+31
-2
lines changed

6 files changed

+31
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Authors@R: c(
99
email = "guyliann.engels@umons.ac.be"))
1010
Maintainer: Philippe Grosjean <phgrosjean@sciviews.org>
1111
Depends: R (>= 4.2.0)
12-
Imports: learnitdown, BioDataScience, shiny, miniUI
12+
Imports: learnitdown, BioDataScience, shiny, miniUI, rstudioapi
1313
Suggests: SciViews, ggpubr, data.io, svMisc, svBase, svFlow, covr, knitr, rmarkdown, testthat, gradethis
1414
Remotes: BioDataScience-Course/BioDataScience, rstudio/gradethis, SciViews/learnitdown, SciViews/data.io, SciViews/flow, SciViews/chart, SciViews/SciViews
1515
License: MIT + file LICENSE

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ importFrom(miniUI,miniContentPanel)
1717
importFrom(miniUI,miniPage)
1818
importFrom(miniUI,miniTitleBarButton)
1919
importFrom(miniUI,miniTitleBarCancelButton)
20+
importFrom(rstudioapi,showDialog)
2021
importFrom(shiny,dialogViewer)
2122
importFrom(shiny,observeEvent)
2223
importFrom(shiny,runGadget)

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- The addin to select learnrs or Shiny apps now detects inactivated items and takes them out of the list.
66

7+
- A new addin to create a course issue is added.
8+
79
- The code to plot distribution objects is moved to the {inferit} package.
810

911
# BioDataScience 2022.9.0

R/BioDataScience1-package.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#' @importFrom BioDataScience config sign_in sign_out
1010
#' @importFrom shiny dialogViewer observeEvent selectInput stopApp runGadget
1111
#' @importFrom miniUI gadgetTitleBar miniContentPanel miniPage miniTitleBarButton miniTitleBarCancelButton
12+
#' @importFrom rstudioapi showDialog
1213
NULL
1314

1415
#@importFrom BioDataScience config sign_in sign_out run run_app update_pkg

R/addins.R

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,23 @@ run_addin <- function() {
6666
if (!is.null(item) && !inherits(item, "try-error"))
6767
message("Running item ", item)
6868
}
69+
70+
sdd1_issue <- function() {
71+
# Get year (two digits)
72+
# We shift the academic year (starting mid-september) by 250 days
73+
# and get the year using two last digits
74+
acad_year <- format(Sys.Date() - 250, "%y")
75+
new_issue_url <- paste0("https://github.com/BioDataScience-Course/a00qa_",
76+
acad_year, "m_issues-a", acad_year, "/issues/new")
77+
# Display a message with short instructions + url
78+
rstudioapi::showDialog(title = "Nouvelle issue du cours BioDataScience1",
79+
url = new_issue_url,
80+
message = paste0(
81+
"Cliquez sur le lien ci-dessous pour cr\u00e9er l'issue. ",
82+
"Indiquez un titre et commencez le message par ",
83+
"@BioDataScience-Course/teachers pour notifier ",
84+
"imm\u00e9diatement vos enseignants de votre question. ",
85+
"Ajoutez \u00e9ventuellement une capture d'\u00e9cran explicite."))
86+
invisible(TRUE)
87+
88+
}

inst/rstudio/addins.dcf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
Name: Run BioDataScience1 tutorial or app
1+
Name: Run sdd I tutorial or app
22
Description: Run one of the learnr tutorials or Shiny applications in this package
33
Binding: run_addin
44
Interactive: true
5+
6+
Name: New sdd I issue
7+
Description: Create a new issue in the course GitHub repository
8+
Binding: sdd1_issue
9+
Interactive: true

0 commit comments

Comments
 (0)