Skip to content

Conversation

@schloerke
Copy link
Collaborator

@schloerke schloerke commented Sep 4, 2020

PR task list:

  • Update NEWS
  • [NA] Add tests (if possible)
  • Update documentation with devtools::document()
remotes::install_github("rstudio/learnr#429")
rmarkdown::run("learnr_429.Rmd")
learnr_429.Rmd
---
title: "Hello, Tutorial!"
author: "J.J. Allaire"
date: "March 1st, 2017"
output: learnr::tutorial
runtime: shiny_prerendered
# Do not index/display tutorial by setting `private: true`
# private: true
description: >
  This is a demo tutorial.
---

```{r setup, include=FALSE}
library(learnr)
library(gradethis)
gradethis::gradethis_setup()
```

The following code computes the answer to 1+1. Change it so it computes 2 + 2:

```{r addition, exercise=TRUE}
1 + 1
```




```{r test, exercise=TRUE}
2+2
```

```{r test-solution}
#solution
2 + 2
```

```{r test-hint-1}
#hint1
```


```{r test-hint-2}
#hint2
```

```{r test-check}
#solution
gradethis::grade_code()
```


### unknown (`awk`)
```{awk awk-chunk, exercise=TRUE}

```


### custom
```{R addition-custom, exercise=TRUE, exercise.cap = "My Caption Here"}

```
### custom #2
```{R addition-custom-2, exercise=TRUE, exercise.cap = "<div style='color:green;'>My Green Caption</div>"}

```

### bash
```{bash bash-chunk, exercise = TRUE}

```

### c
```{c c-chunk, exercise = TRUE}

```

### cc
```{cc cc-chunk, exercise = TRUE}

```

### coffee
```{coffee coffee-chunk, exercise = TRUE}

```

### css
```{css css-chunk, exercise = TRUE}

```

### go
```{go go-chunk, exercise = TRUE}

```

### groovy
```{groovy groovy-chunk, exercise = TRUE}

```

### haskell
```{haskell haskell-chunk, exercise = TRUE}

```

### js
```{js js-chunk, exercise = TRUE}

```

### mysql
```{mysql mysql-chunk, exercise = TRUE}

```

### node
```{node node-chunk, exercise = TRUE}

```

### octave
```{octave octave-chunk, exercise = TRUE}

```

### perl
```{perl perl-chunk, exercise = TRUE}

```

### psql
```{psql psql-chunk, exercise = TRUE}

```

### python
```{python python-chunk, exercise = TRUE}

```

### r
```{r r-chunk, exercise = TRUE}

```

### rcpp
```{rcpp rcpp-chunk, exercise = TRUE}

```

### rscript
```{rscript rscript-chunk, exercise = TRUE}

```

### ruby
```{ruby ruby-chunk, exercise = TRUE}

```

### sass
```{sass sass-chunk, exercise = TRUE}

```

### scala
```{scala scala-chunk, exercise = TRUE}

```

### scss
```{scss scss-chunk, exercise = TRUE}

```

### sql
```{sql sql-chunk, exercise = TRUE}

```

Should look like:
Screen Shot 2020-09-15 at 10 56 19 AM
Screen Shot 2020-09-15 at 10 56 24 AM
Screen Shot 2020-09-15 at 10 56 27 AM

@schloerke schloerke marked this pull request as ready for review September 4, 2020 16:12
@schloerke schloerke requested a review from cpsievert September 4, 2020 16:12
@cpsievert
Copy link
Contributor

cpsievert commented Sep 4, 2020

Some other icons that might be worth adding: psql (postgresql), node, scala, ruby, sass, perl

Remove mariadb and sqlite as they are not engines.
Update mysql to be mysql
@schloerke
Copy link
Collaborator Author

@cpsievert Added a line for each knitr engine, even if there is no icon. This way, they are at least accounted for.

@cpsievert cpsievert self-requested a review September 4, 2020 17:37
Copy link
Contributor

@cpsievert cpsievert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮 🎉 🌮

@schloerke schloerke changed the title Display an engine svg in the exercise Display an engine images in the exercise Sep 8, 2020
@cpsievert cpsievert self-requested a review September 15, 2020 14:20
@schloerke schloerke changed the title Display an engine images in the exercise Display engine images in the exercise caption Sep 16, 2020
@schloerke schloerke merged commit fc071ed into master Sep 16, 2020
@schloerke schloerke deleted the exercise_engine_img branch September 16, 2020 16:23
@schloerke schloerke mentioned this pull request Sep 29, 2020
sjgknight pushed a commit to sjgknight/learnr that referenced this pull request Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants