package_workflow.Rmd
library(sugar)
The following workflow should be considered for the web application’s smooth set up and operation.
Set the Google Cloud Platform credentials as mentioned in “How to set up Google Cloud Platform credentials”. Set aside the Client ID and Client secret for the app.
An R Shiny app skeleton with the following structure is created.
├── ETCXXXX.Rproj
├── app
│ ├── server
│ │ ├── view_as_student.R
│ │ ├── student_server.R
│ │ └── staff_server.R
│ ├── www
│ │ ├── blc.png
│ ├── userinput.R
│ ├── tabs.R
│ ├── app.R
│ ├── Global.R
│ └── googlesheets.R
setup_info <- setup_info(unit_details,
client_id="xxxxxxx.apps.googleusercontent.com",
client_secret="xxxxxx-xxxxxx",
maintainer="xxxxx@.monash.edu")
Initialize the authentication for creating Google sheets for storing information on students with their attendance and grades as well as authorized staff members
initiate_auth(setup_info)
The information on the assessment should be in a dataframe as per the format below with the same column names and data types.
assessment <- readr::read_csv("assessment.csv")
#> Assessment Weightage Total.Marks
#> 1 ASSESS 1 25 100
#> 2 ASSESS 2 25 100
#> 3 ASSESS 3 25 100
#> 4 ASSESS 4 25 100
#> [1] "Lecture A" "Lecture B" "Tutorial A" "Tutorial B"
create_attendance_sheet(unit_details,schedule)
The created google sheet would contain the separate sheets for the classes mentioned. The dates should be entered horizontally as per the schedule of each classes.
create_grade_sheet(unit_details,assessment)
create_student_sheet(unit_details)
user_input(setup_info)
The function writes the user specific input onto the userinput.R
file for the functioning of the app.
Contact Emi Tanaka to get the application maintainer’s email added to use the Monash EBS shiny account.
For the log out from the app to be smooth, the shinyapps.io link should be supplied in the app.R
file at the end. Replace the link “https://ebsmonash.shinyapps.io/sugar-demo-app/” with the newly created one.