Create Course Schedule HTML Table Using R
Referenced in steps below: Course Schedule Instructions.
- Save a copy of the original Excel file to come back to later for the Notes sections.
- Open up the original Excel file, merge multiple faculty into one row, then delete all the empty rows.
- Make sure columns are identical to the column names in script (do not include Room Number or First Name of Instructor). Delete hidden columns (Room Number, First Name of Instructor, etc.). Make sure column names match these: CRN#, CRS#, SEC, Course Title, Instructor, Cr Hr, Days, Time, Room, Exam Date, Exam Time
- Make sure footnotes are standardized, e.g., (E) and not (E ) with a space (Update: script has been updated to account for this)
- Remove all rows that are not the table header (first row) or the courses.
- Save DAY and EVE sheets each as two new csvs by highlighting all cells with data and copying/pasting them into a new file/save as csv (to avoid extra blank columns that may be present by saving entire sheet). Do not open them (especially in Excel) once they are saved, because this may change how the Section numbers are interpreted and may cause 001 to be 1, and so forth.
- The R code below covers Steps 2 – 6 in Course Schedule Instructions to create the HTML table.
- In R code, update the “dayNotes” variable to match the number of Day Notes. Update the file paths/names for input files and output file.
- Paste output into an HTML editor. Copy and paste notes from the copy of the original Excel file to the bottom of the HTML page.
- Once everything looks good, paste into MODX.
Adding a New Gravity Form in WordPress
Steps for adding a new Gravity Form in WordPress:
- In WordPress nav bar, choose Forms (with Gravity Forms logo), then choose New Form
- Add Fields and update Field Settings (e.g., make a field required). Save Form and Preview it (top right)
- At the top of the Form Editor are Settings and Entries. Completed form submissions are located in Entries. In Settings are Form Settings, Confirmations, and Notifications:
- Form Settings may be adjusted as needed
- Confirmations are what the user sees after submitting the form. Defaults to Text and may be updated to Text, Page, or Redirect (use Redirect to send user to an external page after submitting the form). Conditional logic is also possible
- Notifications are sent to admin by default when a form has been submitted (this includes tests in Preview). In Admin Notification, update ‘Send to Email’ field to update email address that will receive a notification when a form is submitted. Update other fields if needed. If needed, Configure Routing to send notifications conditionally based on form Field responses (be sure to update the ‘Any/All’ dropdown to reflect the desired logic)
- Create a Page for the form by clicking Pages, then Add New in left nav bar
- In the new page, add a title, which will autogenerate a permalink (editable)
- In the new page, add a shortcode to the Paragraph section to display the Gravity Form on the page. Copy shortcode from an existing page, replacing “ID” with the ID of the new Gravity Form (found in Forms area; see #1 above)
- Preview, then Publish page when ready. Share form via permalink (see #5 above)