{"id":13665790,"url":"https://github.com/rstudio/gradethis","last_synced_at":"2025-04-25T19:31:27.686Z","repository":{"id":39788773,"uuid":"126734088","full_name":"rstudio/gradethis","owner":"rstudio","description":"Tools for teachers to use with learnr","archived":false,"fork":false,"pushed_at":"2023-07-05T17:03:53.000Z","size":2204,"stargazers_count":163,"open_issues_count":40,"forks_count":41,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-22T19:03:42.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkgs.rstudio.com/gradethis/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rstudio.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-25T19:49:44.000Z","updated_at":"2025-03-03T06:37:53.000Z","dependencies_parsed_at":"2024-11-10T21:12:51.276Z","dependency_job_id":"9e35d71a-1e13-4008-a570-e63718b9a93e","html_url":"https://github.com/rstudio/gradethis","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fgradethis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fgradethis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fgradethis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fgradethis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstudio","download_url":"https://codeload.github.com/rstudio/gradethis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250882606,"owners_count":21502337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T06:00:50.716Z","updated_at":"2025-04-25T19:31:27.234Z","avatar_url":"https://github.com/rstudio.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# gradethis \u003ca href='https://pkgs.rstudio.com/gradethis'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"138\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/gradethis)](https://CRAN.R-project.org/package=gradethis)\n[![R build status](https://github.com/rstudio/gradethis/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/gradethis/actions)\n[![Codecov test coverage](https://codecov.io/gh/rstudio/gradethis/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rstudio/gradethis?branch=main)\n[![gradethis downloads per month](https://cranlogs.r-pkg.org/badges/gradethis)](http://www.rpackages.io/package/gradethis)\n[![DOI](https://zenodo.org/badge/126734088.svg)](https://zenodo.org/badge/latestdoi/126734088)\n\u003c!-- badges: end --\u003e\n\ngradethis helps scale feedback for [learnr] exercises. Instructors can use a model solution as a template or write highly customized testing logic to provide specific feedback for common mistakes.\n\ngradethis is designed for use in [learnr] tutorials. We recommend that you first be comfortable writing learnr tutorials before you begin incorporating exercise feedback with gradethis. You can learn more about learnr tutorials with the [learnr package documentation][learnr].\n\n\u003cimg src=\"man/figures/missing_sqrt.png\" alt=\"A screenshot of the gradethis package in action. An exercise starts with the following instructions: 'Here is a number. You can do great things with it, like this: Take the square root of the log of the number 2. Then click Submit Answer.' The student has entered the following code: '2'. The gradethis package generates the following message: 'I expected a call to sqrt() where you wrote 2. Try it again; next time's the charm!'\" style=\"border: 1px solid black; box-shadow: 5px 5px 5px #eee; max-width: 66%; display: block; margin: 1em auto;\"\u003e\n\n## Installation\n\ngradethis is still in development and not on [CRAN](https://CRAN.R-project.org) yet.\nThe development version of gradethis can be installed from GitHub with:\n\n```r\n# install.packages(\"remotes\")\nremotes::install_github(\"rstudio/gradethis\")\n```\n\n## Usage\n\nTo use gradethis in a learnr tutorial, start by loading gradethis after learnr in the `setup` chunk of your tutorial:\n\n````markdown\n```{r setup}\nlibrary(learnr)\nlibrary(gradethis)\n```\n````\n\ngradethis provides two grading modalities. You can:\n\n1. Compare student code to model solution code with `grade_this_code()`, or\n\n1. Write custom grading logic with `grade_this()`.\n\nLearn more about where and how to write exercise-checking code in `vignette(\"gradethis\")`.\n\n## Getting help\n\n[![RStudio Community: Teaching](https://img.shields.io/badge/Community%20Support-Teaching-75aadb.svg?style=popout\u0026logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgdmlld0JveD0iMCAwIDYyNS45IDYyNS45IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA2MjUuOSA2MjUuOTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM3NUFBREI7fQoJ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3LjEsNS42LDQyLjksNS42YzIzLjgsMCw0OC4xLTUuNiw3MS45LTUuNmM0Ni4yLDAsODkuMSwyMSw4OS4xLDcyLjNjMCwzOS43LTIzLjgsNjQuOS02MC43LDc1LjZMNDI0LjcsNDExLjh6CgkJCQkgTTI3Ni43LDI4NS4zbDI0LjMsMC41YzU5LjMsMC45LDgyLjEtMjEuOSw4Mi4xLTUyLjNjMC0zNS41LTI1LjctNDkuNS01OC4zLTQ5LjVjLTE1LjQsMC0zMS4zLDEuNC00OC4xLDMuM1YyODUuM3oiLz4KCQk8L2c+Cgk8L2c+CjwvZz4KPGcgaWQ9IldoaXRlX0xldHRlcnMiPgo8L2c+CjxnIGlkPSJSX0JhbGwiPgo8L2c+Cjwvc3ZnPg==)](https://community.rstudio.com/c/teaching/13)\n[![RStudio Ask a question: gradethis](https://img.shields.io/badge/Ask%20a%20question-gradethis-75aadb.svg?style=popout\u0026logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjI1LjkgNjI1LjkiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDYyNS45IDYyNS45OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6Izc1QUFEQjt9Cgkuc3Qxe2ZpbGw6IzRENEQ0RDt9Cgkuc3Qye2ZpbGw6I0ZGRkZGRjt9Cgkuc3Qze2ZpbGw6dXJsKCNTVkdJRF8xXyk7fQoJLnN0NHtmaWxsOnVybCgjU1ZHSURfMl8pO30KCS5zdDV7ZmlsbDp1cmwoI1NWR0lEXzNfKTt9Cgkuc3Q2e2ZpbGw6dXJsKCNTV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TIuM2MwLTM1LjUtMjUuNy00OS41LTU4LjMtNDkuNWMtMTUuNCwwLTMxLjMsMS40LTQ4LjEsMy4zVjI4NS4zeiIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8ZyBpZD0iV2hpdGVfTGV0dGVycyI+CjwvZz4KPGcgaWQ9IlJfQmFsbCI+CjwvZz4KPC9zdmc+)](https://community.rstudio.com/new-topic?title=\u0026category_id=13\u0026tags=gradethis\u0026body=%0A%0A%0A%20%20--------%0A%20%20%0A%20%20%3Csup%3EReferred%20here%20by%20%60gradethis%60%27s%20README%3C/sup%3E%0A)\n\nThere are two main places to get help:\n\n1. The [gradethis tag on RStudio Community](https://community.rstudio.com/tag/gradethis) is a friendly place to ask any questions about gradethis and the R Markdown family of packages. Additionally, we invite instructors to join the [Teaching Category on RStudio Community](https://community.rstudio.com/c/teaching/13), where any discussions about teaching are welcome.\n\n1. [Stack Overflow](https://stackoverflow.com/questions/tagged/gradethis) can be a source of answers to common gradethis questions. It is also a great place to get help, once you have created a [reproducible example](https://reprex.tidyverse.org) that illustrates your problem.\n\n## Code of Conduct\n\n\u003c!-- TODO FIX URL --\u003e\n\nPlease note that the gradethis project is released with a [Contributor Code of Conduct](https://friendly-golick-0771f8.netlify.app/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n\n\n[learnr]: https://rstudio.github.io/learnr/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio%2Fgradethis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstudio%2Fgradethis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio%2Fgradethis/lists"}