Skip to content
Snippets Groups Projects

Requirements:

  1. CoSign : You will need to update your cosign .conf file to include the following:

     <LocationMatch "/commencement/register">
       CosignProtected On
       CosignAllowPublicAccess Off
       AuthType Cosign
       Require valid-user
     </LocationMatch>
     
     <DirectoryMatch "/Cerebro/(?!cron.php|!public-index.php|!ajax|!files|!templates)">
       CosignProtected On
       CosignAllowPublicAccess Off
       AuthType Cosign
       Require valid-user
     </DirectoryMatch>
  2. WkHTMLToPDF plugin is required to be installed on your server. Visit http://wkhtmltopdf.org/ and download the binary from the downloads page.

  3. public-index.php is for public facing, for Students.

  4. Add files and template folder simon's note: need to add base structure to git and make sure they are all setup as sudo chmod 775

  5. Mod_rewrite required

  6. Session folder must be writable

  7. Case Sensitive URL. You can make it case insensitive but I recommend leaving it alone and just make sure to access the website via Capital C.

  8. short_open_tag PHP is required.

Instructions for Front Facing page: (Difficulty=easy)

If you need to setup a way for a front-facing page without the url saying "CEREBRO", then this requires you to edit the .htaccess . This should not be hard if you have access to edit the .htaccess file.

You should have within your htaccess file a section that says the following:

	<IfModule mod_rewrite.c>
	  RewriteEngine on
	  RewriteBase /
	  
	  #other code in between the two tags.
	  
	</IfModule>

then you will need to add the following (ONLY IF IT DOES NOT EXIST)

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_URI} ^/Cerebro/(.*)
	RewriteRule ^(.*)/(.*)/?$ /Cerebro/public-index.php?circuit=$2 [L,QSA]

to make it look somewhat like this:

	<IfModule mod_rewrite.c>
	  RewriteEngine on
	  RewriteBase /
	  
	  #other code in between the two tags.
	  
	  RewriteCond %{REQUEST_FILENAME} !-f
	  RewriteCond %{REQUEST_FILENAME} !-d
	  RewriteCond %{REQUEST_URI} ^/commencement/register/(.*)
	  RewriteRule ^(.*)/(.*)/?$ /Cerebro/public-index.php?circuit=$2 [L,QSA]
	  
	  RewriteRule ^/?commencement/register$	/commencement/register/ [R=301,L]  
	</IfModule>

CEREBRO setup as ROOT DIRECTORY then remove the word CEREBRO/.

What this will do is that the students will be given a URL to https://your-website.com/commencement/ and they will proceed from there. That is it!

CRON

You will need to setup a cron job for cron.php (this file will periodically update the header and footer for an event so that the visuals are up-to-date. This is best suited when a website compress and caches their CSS/JS files).

  1. SSH as root (sudo)

  2. Enter Commands-line: vi /etc/crontab or if you have crontab editor, sudo crontab -e

  3. insert the values

    */30 * * * * /usr/bin/php /var/www/html/Cerebro/cron.php >/dev/null 2>&1

    OR

    */30 * * * * curl --silent --compressed https://yourwebsite.edu/Cerebro/cron.php >/dev/null 2>&1

    adjust as needed for file location and frequency.

  4. Verify Cron job is working with meta tag last modified on the register page.

  5. Also verify permissions level on the file. Especially the cosign part. (see Requirements #1)

DEV NOTES

  1. After an import of an excel file, you can reorder the weights of the DEGREES, UNITS, and MAJORS/MINOR with the script called (reorder-weights.php)