Skip to content

Commit 6478bce

Browse files
authored
Merge pull request #844 from ucfopen/dev/v3-3-0
Release 3.3.0
2 parents 710f082 + f249cea commit 6478bce

File tree

110 files changed

+2905
-4004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+2905
-4004
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
.vscode/
3+
.idea/
4+
.git/
5+
tests/
6+
fixtures/
7+
coverage/
8+
coverage.xml
9+
images/
10+
node_modules/

.env

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ APP_LTI_REDIRECT_PATH="/lti/authorize/check"
4040
APP_LTI_NAME="UDOIT 3"
4141
ADMIN_LTI_NAME="UDOIT 3 Admin"
4242
USE_DEVELOPMENT_AUTH="no"
43+
VERSION_NUMBER="3.3.0"
4344

4445

4546
###> symfony/messenger ###
@@ -64,7 +65,9 @@ PHPALLY_SUGGESTION_RULES="
6465
ObjectTagDetected,
6566
ParagraphNotUsedAsHeader,
6667
PreShouldNotBeUsedForTabularValues,
67-
RedirectedLink
68+
RedirectedLink,
69+
EmbedTagDetected,
70+
IframeNotHandled,
6871
"
6972
# Rules that are easiest to tackle when using UDOIT. Comma-separated list of rule IDs.
7073
EASY_FIX_RULES="
@@ -150,6 +153,8 @@ DATE_FORMAT="Y-m-d"
150153
###> base url ###
151154
# Base URL for client callbacks
152155
BASE_URL=""
156+
# Webpack public path
157+
WEBPACK_PUBLIC_PATH="/build"
153158
###> base url ###
154159

155160
###> user name storage ###

.env.local.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ DATABASE_URL=mysql://root:root@db:3306/udoit3
66

77
###> base url ###
88
# Base URL for client callbacks
9-
BASE_URL="https://127.0.0.1:8000"
9+
BASE_URL="http://127.0.0.1:8000/udoit3"
10+
# Webpack public path
11+
WEBPACK_PUBLIC_PATH="/udoit3/build"
1012
###> base url ###
1113

1214
APP_LMS=canvas

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build UDOIT 3 Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'dev/*'
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: ${{ github.repository }}
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
20+
- name: Log in to the Container registry
21+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Change String Case
28+
id: case
29+
uses: ASzc/change-string-case-action@v2
30+
with:
31+
string: ${{ github.repository }}
32+
33+
- name: Display repository name
34+
run: echo ${{ steps.case.outputs.lowercase }}
35+
36+
- name: Find-and-replace strings
37+
id: slash
38+
uses: mad9000/actions-find-and-replace-string@2
39+
with:
40+
source: ${{ github.ref_name }}
41+
find: '/'
42+
replace: '-'
43+
44+
- name: Display issue name
45+
run: echo ${{ steps.slash.outputs.value }}
46+
47+
- name: Build Image
48+
run: |
49+
cp .env.local.example .env.local
50+
docker-compose -f docker-compose.nginx.yml build
51+
docker-compose -f docker-compose.nginx.yml run composer composer install --no-dev --no-interaction --no-progress --optimize-autoloader
52+
docker-compose -f docker-compose.nginx.yml run yarn bash -c 'cd /app && yarn install && yarn build'
53+
docker build . -t udoit:latest -f build/nginx/Dockerfile.build
54+
docker tag udoit:latest ${{ env.REGISTRY }}/${{ steps.case.outputs.lowercase }}:${{ steps.slash.outputs.value }}
55+
56+
docker push ${{ env.REGISTRY }}/${{ steps.case.outputs.lowercase }}:${{ steps.slash.outputs.value }}
57+
58+

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-fpm
1+
FROM php:8.1-fpm
22
ARG ENVIRONMENT_TYPE
33

44
#Install dependencies and php extensions

HEROKU.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Heroku Deploy
2-
## Heroku Button
3-
If you wish to install Heroku using the one-click deployment process, please click the purple "Deploy to Heroku" button in the [repository home page](https://github.com/ucfopen/UDOIT/tree/main#installing-udoit-on-heroku).
2+
3+
**Warning:** There is a known issue with hosting UDOIT on Heroku. Courses with large amounts of content can cause UDOIT to scan for longer than Heroku allows, resulting in a failed scan appears to never complete. We do not recommend using Heroku for hosting your production instance of UDOIT at this time. The instructions below are left here for reference.
44

55
## Installation Instructions
6-
Installing UDOIT using the Heroku button is very easy, but still requires some setup.
6+
Installing UDOIT on Heroku requires some technical knowledge. We recommend that you have an IT staff member perform the steps below.
77

88
### Step 1: Setting up Heroku
99
Click the Heroku button and follow the instructions below:
@@ -50,7 +50,7 @@ Install the app following the instructions described in INSTALL_\<LMS\>.md.
5050
### (Optional) Step 4: Clone UDOIT and Push to Heroku
5151
If you make changes to the source code of UDOIT, and you'd like to deploy those changes to your Heroku instance, follow these instructions.
5252

53-
1. Follow the instruction under the ['Source Code' section of INSTALL.md](https://github.com/ucfopen/UDOIT/blob/main/INSTALL.md#source-code).
53+
1. Follow the instructions under the ['Source Code' section of INSTALL.md](https://github.com/ucfopen/UDOIT/blob/main/INSTALL.md#source-code).
5454
2. Install and log in to the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
5555
3. Next, from within your UDOIT's root folder on your machine, connect your local repository to Heroku:
5656
```

INSTALL.md

Lines changed: 65 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2,97 +2,99 @@
22
UDOIT can be installed on your own existing servers with the following instructions. UDOIT is also available as a hosted and maintained product by [Cidi Labs](https://cidilabs.com). UDOIT is built using the [PHP Symfony Framework](https://symfony.com).
33

44
## System Requirements
5+
The system requirements depend on how you install UDOIT. If you use Docker, the host system doesn't require any additional software.
6+
7+
### Docker Method
8+
* Docker
9+
* Docker Compose
10+
11+
### Manual Installation Method
512
* Apache or Nginx webserver
6-
* PHP 7.4, 8.0
13+
* PHP 8.1+
714
* MySQL, MariaDB or PostgreSQL
815
* Git (If you are using The Git Method below) or if you plan on contributing to UDOIT
9-
* Node v14+
16+
* Node v16 is supported; other versions may work
1017
* Yarn
1118

12-
## Source Code
13-
We strongly recommend source code should be managed through Git. The benefit of this method is that you can update an existing installation of UDOIT by simply using git pull. It also lets you roll back to previous versions if needed. Follow these steps:
19+
## Download the Code
20+
### Option 1: Git
21+
We strongly recommend managing the source code through Git. The benefit of this method is that you can update an existing installation of UDOIT by simply using `git pull`. It also lets you roll back to previous versions if needed. Follow these steps:
1422

15-
* Install Git on your server
16-
* Navigate to the directory on your server where UDOIT will live
17-
* Run `git clone git@github.com:ucfopen/UDOIT.git . ` (The . is important. It tells Git to download the files to the current directory.)
23+
1. Install Git on your server
24+
2. Navigate to the directory on your server where UDOIT will live
25+
3. Run `git clone git@github.com:ucfopen/UDOIT.git . ` (The . is important. It tells Git to download the files to the current directory.)
1826

19-
## Docker
20-
We provide a fast and simple way of setting up a local UDOIT instance through the use of docker containers. To set up the docker containers, you must first install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/). Then, simply run the following command from within the UDOIT directory:
27+
### Option 2: Zip File
28+
If you prefer not to use Git, you can download a zip file of the latest release from the [Releases Page](https://github.com/ucfopen/UDOIT/releases). Unzip it in the directory on your server where UDOIT will live.
2129

22-
docker-compose up -d
30+
## .ENV Setup
31+
UDOIT uses a `.env.local` file for storing configuration variables. To create it:
2332

24-
Once the containers are up and running, you can access the php container by calling the command:
33+
1. Copy the file `.env.local.example` to `.env.local` by running
34+
```
35+
cp .env.local.example .env.local
36+
```
37+
2. Leave `APP_ENV` set to `prod`
38+
> If you are setting up a development environment, set this to `dev` and follow the steps in [Installing Composer Dependencies](#installing-composer-dependencies) without the `--no-dev` flag to obtain all of the development packages.
39+
3. Add your database information to thie `DATABASE_URL` variable. (The default value of `mysql://root:root@db:3306/udoit3` is suitable for running it on your local computer using Docker.)
40+
4. Modify the `BASE_URL` to match the URL of your instance of UDOIT. (The default value of `http://127.0.0.1:8000/udoit3` is suitable for running it on your local computer using Docker.)
41+
5. Modify the `WEBPACK_PUBLIC_PATH` to match the `BASE_URL` you set. (The default value of `/udoit3/build` is suitable for running it on your local computer usind Docker. Example: If your `BASE_URL` is set to `http://127.0.0.1:8000`, your `WEBPACK_PUBLIC_PATH` should be `/build`.)
42+
6. Set `APP_LMS` to the name of your LMS.
43+
* `canvas` if you are using the Canvas LMS.
44+
* `d2l` if you are using the D2l Brightspace LMS.
45+
7. (Optional) You can change the default language for your entire UDOIT instance by adding the `DEFAULT_LANG` variable. Currently supported languages are English (`en`) and Spanish (`es`).
46+
8. (Optional) If you are using UDOIT with a self-hosted instance of Canvas, you can add the `JWK_BASE_URL` variable and set it to the URL of your instance of Canvas. (Example: `JWK_BASE_URL="https://canvas.dev.myschool.edu"`)
2547

26-
docker exec -it udoit_php_1 /bin/bash
48+
## Docker
49+
We provide a fast and simple way of setting up a local UDOIT instance through the use of Docker containers.
2750

28-
By default the application is set up to create a MySQL database container, but if you wish to create a postgres container instead you can do so by modifying the file `docker-compose.yml`. The credentials required to access this database depend on the database type and can be found in this same file. You can access the database container by calling the command:
51+
### 1. Install Docker
52+
To set up the docker containers, you must first install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).
2953

30-
docker exec -it udoit_db_1 /bin/bash
54+
### 2. Build the Containers
55+
If you prefer to build the containers yourself, or you are actively developing UDOIT and need to rebuild the containers to test your cahnges, run the following command from within the UDOIT directory:
3156

32-
If you ever want to take down the containers, you can do so with the following command:
57+
docker-compose -f docker-compose.nginx.yml up
3358

34-
docker-compose down
59+
### 3. Wait
60+
Wait for all of the containers to finish initializing. This can take over 15 minutes. You will know you are ready to proceed with the next step when you haven't seen any output in your terminal for a few minutes.
3561

36-
Once you have set up the containers in this way, you will still need to follow the rest of the instructions in this document.
62+
### 4. Set up the Database
63+
The first time you start the containers, you will need to set up the database to handle all the information UDOIT generates as it runs. Run the following command:
3764

38-
## Configuring your Web Server
39-
The details of configuring a web server with PHP are out of the scope of this README. You should configure your web server to point to UDOIT's "public" folder as the web root folder. Doing this will hide the configuration and source files so that they are not web accessible. It will also clean up your URL structure so that you don't need to include the "public" folder in any of the URLs to UDOIT.
65+
docker-compose -f docker-compose.nginx.yml run php php bin/console doctrine:migrations:migrate
4066

41-
If you are setting up a local UDOIT instance through Docker, you can simplify this step and quickly setup a server by calling the following commands from within the php container:
67+
> You will also need to run that command whenever you update to a new version of UDOIT.
4268
43-
docker exec -it udoit_php_1 /bin/bash
44-
symfony server:ca:install
45-
symfony serve -d
69+
### 5. Next steps
70+
Skip to [Testing your Setup](#testing-your-setup) to continue.
4671

47-
Security Note: Do not use the commands above for production installations. Use software such as [Apache](https://httpd.apache.org) or [NGINX](https://nginx.org).
72+
### 6. Stopping the Containers
73+
If you ever want to stop the containers, you can do so with the following command:
4874

49-
SSL Issues: It is important to note that most browsers will automatically block unsigned certificates, and the tool might fail to load with the message that the website might be down or have moved to a new location. If this happens to you after going through the rest of the instructions, you can bypass this warning by opening the specified url in a new tab, granting the browser permission to access the webpage, and then going back to where the UDOIT tool has been integrated and refreshing the page.
75+
docker-compose -f docker-compose.nginx.yml down
5076

51-
> If you are running UDOIT in Docker, you will need do this each time you start the docker container.
5277

53-
## Installing Composer Dependencies
54-
UDOIT uses Composer to install PHP dependencies. If you are using Docker, it will already be installed inside the PHP container. To install the required PHP dependencies, enter the PHP container with:
5578

56-
docker exec -it udoit_php_1 /bin/bash
79+
## Manual Installation
80+
If you prefer not to use Docker, the process is more complicated:
5781

58-
Then, install the dependencies:
82+
### Configuring your Web Server
83+
The details of configuring a web server with PHP are out of the scope of this README. You should configure your web server to point to UDOIT's "public" folder as the web root folder. Doing this will hide the configuration and source files so that they are not web accessible. It will also clean up your URL structure so that you don't need to include the "public" folder in any of the URLs to UDOIT.
5984

60-
composer install --no-dev
85+
If you are using NGINX as your web server, you can use the `build/nginx/nginx.conf` file as a starting point.
6186

62-
If you're not using Docker, follow the upstream documentation on [Composer Installation](https://getcomposer.org/download/) to install `composer.phar` into the project root, then run the following:
87+
### Installing Composer Dependencies
88+
UDOIT uses Composer to install PHP dependencies. Follow the upstream documentation on [Composer Installation](https://getcomposer.org/download/) to install `composer.phar` into the project root, then run the following:
6389

6490
php composer.phar install --no-dev
6591

66-
> Remove the `--no-dev` flag if you wish to use `APP_ENV=dev` below.
92+
> Remove the `--no-dev` flag if you set `APP_ENV=dev` in your `.env.local` file.
6793
68-
## .ENV Setup
69-
UDOIT uses a `.env` file for storing configuration. Local configuration such as database information and URLs should be stored in a `.env.local` file that is NOT tracked in Git.
70-
71-
> These changes should be made outside any of the Docker containers.
72-
73-
1. Copy the file `.env.local.example` to `.env.local`.
74-
```
75-
cp .env.local.example .env.local
76-
```
77-
2. Leave `APP_ENV` set to `prod`
78-
> If you are setting up a development environment, set this to `dev` and follow the steps in [Installing Composer Dependencies](#installing-composer-dependencies) without the `--no-dev` flag to obtain all of the development packages.
79-
3. Add your database information to this `DATABASE_URL` variable.
80-
4. Add the `BASE_URL`, which is the full URL to reach the `public` folder of UDOIT. (i.e. https://udoit3.ciditools.com) WITHOUT the trailing slash.
81-
5. Set `APP_LMS` to the name of your LMS.
82-
* `canvas` if you are using the Canvas LMS.
83-
* `d2l` if you are using the D2l Brightspace LMS.
84-
6. (Optional) You can change the default language for your entire UDOIT instance by overriding the `DEFAULT_LANG` variable. Currently supported languages are English (`en`) and Spanish (`es`).
85-
86-
## Database Setup
94+
### Database Setup
8795
While UDOIT is configured to use MySQL or MariaDB by default, Symfony can be configured to work with other databases as well. See the Symfony documentation for details.
8896

89-
> If you are running UDOIT in Docker, you don't need to install PHP on your system. You can run
90-
>
91-
> docker exec -it udoit_php_1 /bin/bash
92-
>
93-
> and then run the commands below inside the Docker container.
94-
95-
You can create your database manually, or use `Symfony` to create the database with this command:
97+
Use Symfony to create the database with this command:
9698

9799
php bin/console doctrine:database:create
98100

@@ -108,16 +110,8 @@ If you are operating in a production environment you will need to generate the d
108110

109111
php bin/console cache:warmup --env=prod
110112

111-
## JavaScript
112-
UDOIT uses [node](https://nodejs.org) and [yarn](https://yarnpkg.com/) to compile the JavaScript. Instructions for installing Node and Yarn are out of the scope of this README.
113-
114-
> If you are running UDOIT in Docker, you don't need to install Node or Yarn on your system. Run
115-
>
116-
> docker exec -it udoit_php_1 /bin/bash
117-
>
118-
> and then run the following commands inside the Docker container.
119-
120-
To install the JavaScript dependencies run the command:
113+
### JavaScript
114+
UDOIT uses [node](https://nodejs.org) and [yarn](https://yarnpkg.com/) to compile the JavaScript. Install Node and Yarn on your system, then run:
121115

122116
yarn install
123117

@@ -126,15 +120,15 @@ To build the JavaScript files for production, run the command:
126120
yarn build
127121

128122
## Testing Your Setup
129-
Once you have completed the steps above you will want to test your setup. Unfortunately, UDOIT is an LTI tool that can only fully run within the LMS. You will need to complete the steps in the INSTALL_CANVAS.md or INSTALL_D2L.md to test UDOIT fully.
123+
Once you have completed the steps above you will want to test your setup. Unfortunately, UDOIT is an LTI tool that can only fully run within the LMS. You will need to complete the steps in the [INSTALL_CANVAS.md](INSTALL_CANVAS.md) or [INSTALL_D2L.md](INSTALL_D2L.md) to test UDOIT fully.
130124

131125
However, UDOIT does have one URL that is publicly available outside of the LMS. To test your server setup point your browser to:
132126

133127
<BASE_URL>/lti/config
134128

135129
For example, if you are setting this up on your local computer via Docker, it may look like:
136130

137-
https://localhost:8000/lti/config
131+
http://127.0.0.1:8000/udoit3/lti/config
138132

139133
## Configuring Your LMS
140134
You will need to complete the steps in the [INSTALL_CANVAS.md](INSTALL_CANVAS.md) or [INSTALL_D2L.md](INSTALL_D2L.md) to configure UDOIT to work within your LMS.

0 commit comments

Comments
 (0)