Skip to content

Commit c868905

Browse files
committed
user_id correct in Posit Connect
1 parent b1fb010 commit c868905

File tree

14 files changed

+94
-10
lines changed

14 files changed

+94
-10
lines changed

inst/tutorials/C00La_refresh/C00La_refresh.Rmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ BioDataScience3::learnr_banner()
6060
```
6161

6262
```{r, context="server"}
63+
if (Sys.info()["user"] == "rstudio-connect") {
64+
options(learnr_user_id = session$user)
65+
assignInNamespace("default_user_id", function() {
66+
getOption("learnr_user_id", unname(Sys.info()["user"]))
67+
}, ns = "learnr")
68+
}
6369
BioDataScience3::learnr_server(input, output, session)
6470
```
6571

inst/tutorials/C01La_confusion/C01La_confusion.Rmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ BioDataScience3::learnr_banner()
4949
```
5050

5151
```{r, context="server"}
52+
if (Sys.info()["user"] == "rstudio-connect") {
53+
options(learnr_user_id = session$user)
54+
assignInNamespace("default_user_id", function() {
55+
getOption("learnr_user_id", unname(Sys.info()["user"]))
56+
}, ns = "learnr")
57+
}
5258
BioDataScience3::learnr_server(input, output, session)
5359
```
5460

inst/tutorials/C01Lb_ml1/C01Lb_ml1.Rmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ BioDataScience3::learnr_banner()
7474
```
7575

7676
```{r, context="server"}
77+
if (Sys.info()["user"] == "rstudio-connect") {
78+
options(learnr_user_id = session$user)
79+
assignInNamespace("default_user_id", function() {
80+
getOption("learnr_user_id", unname(Sys.info()["user"]))
81+
}, ns = "learnr")
82+
}
7783
BioDataScience3::learnr_server(input, output, session)
7884
```
7985

inst/tutorials/C02La_cv/C02La_cv.Rmd.inactivated

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD III Module 2** Utilisation de la validation croisée sur une ADL."
55
tutorial:
66
id: "C02La_cv"
7-
version: 2.1.0/8
7+
version: 3.0.0/8
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -38,6 +38,12 @@ BioDataScience3::learnr_banner()
3838
```
3939

4040
```{r, context="server"}
41+
if (Sys.info()["user"] == "rstudio-connect") {
42+
options(learnr_user_id = session$user)
43+
assignInNamespace("default_user_id", function() {
44+
getOption("learnr_user_id", unname(Sys.info()["user"]))
45+
}, ns = "learnr")
46+
}
4147
BioDataScience3::learnr_server(input, output, session)
4248
```
4349

inst/tutorials/C02Lb_ml2/C02Lb_ml2.Rmd.inactivated

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD III Module 2** K plus proches voisins, méthodes par arbres, forêt aléatoire."
55
tutorial:
66
id: "C02Lb_ml2"
7-
version: 2.0.0/5
7+
version: 3.0.0/5
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -51,6 +51,12 @@ BioDataScience3::learnr_banner()
5151
```
5252

5353
```{r, context="server"}
54+
if (Sys.info()["user"] == "rstudio-connect") {
55+
options(learnr_user_id = session$user)
56+
assignInNamespace("default_user_id", function() {
57+
getOption("learnr_user_id", unname(Sys.info()["user"]))
58+
}, ns = "learnr")
59+
}
5460
BioDataScience3::learnr_server(input, output, session)
5561
```
5662

inst/tutorials/C03La_roc/C03La_roc.Rmd.inactivated

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD III Module 3** Effet des proportions sur les métriques et courbes ROC."
55
tutorial:
66
id: "C03La_roc"
7-
version: 2.0.0/9
7+
version: 3.0.0/9
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -74,6 +74,12 @@ BioDataScience3::learnr_banner()
7474
```
7575

7676
```{r, context="server"}
77+
if (Sys.info()["user"] == "rstudio-connect") {
78+
options(learnr_user_id = session$user)
79+
assignInNamespace("default_user_id", function() {
80+
getOption("learnr_user_id", unname(Sys.info()["user"]))
81+
}, ns = "learnr")
82+
}
7783
BioDataScience3::learnr_server(input, output, session)
7884
```
7985

inst/tutorials/C03Lb_ml3/C03Lb_ml3.Rmd.inactivated

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD III Module 3** Machines à vecteurs supports et réseaux de neurones."
55
tutorial:
66
id: "C03Lb_ml3"
7-
version: 2.1.1/5
7+
version: 3.0.0/5
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -47,6 +47,12 @@ BioDataScience3::learnr_banner()
4747
```
4848

4949
```{r, context="server"}
50+
if (Sys.info()["user"] == "rstudio-connect") {
51+
options(learnr_user_id = session$user)
52+
assignInNamespace("default_user_id", function() {
53+
getOption("learnr_user_id", unname(Sys.info()["user"]))
54+
}, ns = "learnr")
55+
}
5056
BioDataScience3::learnr_server(input, output, session)
5157
```
5258

inst/tutorials/C04La_ts_intro/C04La_ts_intro.Rmd.inactivated

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD III Module 4** Statistiques glissantes, création et manipulation d'objets ts."
55
tutorial:
66
id: "C04La_ts_intro"
7-
version: 2.0.1/9
7+
version: 3.0.0/9
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -27,6 +27,12 @@ BioDataScience3::learnr_banner()
2727
```
2828

2929
```{r, context="server"}
30+
if (Sys.info()["user"] == "rstudio-connect") {
31+
options(learnr_user_id = session$user)
32+
assignInNamespace("default_user_id", function() {
33+
getOption("learnr_user_id", unname(Sys.info()["user"]))
34+
}, ns = "learnr")
35+
}
3036
BioDataScience3::learnr_server(input, output, session)
3137
```
3238

inst/tutorials/C04Lb_ts_analysis/C04Lb_ts_analysis.Rmd.towrite

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD III Module 4** Autocorrélation, analyse spectrale et tendance."
55
tutorial:
66
id: "C04Lb_ts_analysis"
7-
version: 2.0.0/0
7+
version: 3.0.0/0
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -24,6 +24,12 @@ BioDataScience3::learnr_banner()
2424
```
2525

2626
```{r, context="server"}
27+
if (Sys.info()["user"] == "rstudio-connect") {
28+
options(learnr_user_id = session$user)
29+
assignInNamespace("default_user_id", function() {
30+
getOption("learnr_user_id", unname(Sys.info()["user"]))
31+
}, ns = "learnr")
32+
}
2733
BioDataScience3::learnr_server(input, output, session)
2834
```
2935

inst/tutorials/C05La_ts_filter/C05La_ts_filter.Rmd.inactivated

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Guyliann Engels & Philippe Grosjean"
44
description: "**SDD III Module 5** Filtrage de séries spatio-termporelles."
55
tutorial:
66
id: "C05La_ts_filter"
7-
version: 2.0.0/6
7+
version: 3.0.0/6
88
output:
99
learnr::tutorial:
1010
progressive: true
@@ -29,6 +29,12 @@ BioDataScience3::learnr_banner()
2929
```
3030

3131
```{r, context="server"}
32+
if (Sys.info()["user"] == "rstudio-connect") {
33+
options(learnr_user_id = session$user)
34+
assignInNamespace("default_user_id", function() {
35+
getOption("learnr_user_id", unname(Sys.info()["user"]))
36+
}, ns = "learnr")
37+
}
3238
BioDataScience3::learnr_server(input, output, session)
3339
```
3440

0 commit comments

Comments
 (0)