Skip to content

enable/coding-challenge

Repository files navigation

coding-challenge

Coding Challenge for Ecancer

Setting up

To setup this code base you will need to:

  1. checkout the develop branch
  2. install the composer dependencies
  3. setup your database credentials for migrations
  • this should be setup in the phinx.yml file
  1. setup your database credentials for the app/website
  • this will be in site/ini/database.ini
  1. ensure write permissions set on site/cache/
  • this should be 777 - chmod -R 777 site/cache
  1. create your blank/empty database
  • the system won't create it for you!
  1. run the migrations
  • we use phinx to keep our databases in-sync
  1. setup a virtual host in Apache
  • you will need AllowOverride All on to allow our .htaccess rules to take effect
  1. add the new domain name in to your /etc/hosts file
  • you will need to sudo to do this - sudo vim /etc/hosts

The Challenge

This challenge is based upon elements of the legacy codebase you will be working on from time to time.

The framework itself is quite big and complicated so we have only ported over a few of the bare essential classes.

We will be looking to see your approach to solving the problems and how confident you are working with the PHP code.

Ideally you should try and work within the constraints of the existing codebase and framework. But we are open-minded to other solutions and libraries that may compliment what we have already.

The Code & Layout

Majority of the logic should live in the includes/ directory.

From the includes/ directory you should see:

  • a core/ directory - this contains the core framework
  • a site-core/ directory - this contains your classes and user classes

In the migrations/ directory we have loaded in our test data using the phinx library. This library can be fetched using composer.

All configuration should live in the site/ini/ directory. You will need to add your database credentials to the site/ini/database.ini file - under the development heading.

The site/ directory also contains images and cache folders. The video thumbnails are in the site/cache/development/images/ directory. You will need to give write permissions to the site/cache/ directory.

All view/template logic should live in the includes/site-core/display/ directory. These templates should get called from their controller.

Bugs

As we said this is a legacy codebase, and we've tried to port across the bare essentials of the codebase.

If you receive lots of debug messages or error messages and you are sure your code is working, you can disable the custom error handler by setting Debug = 0 in site/ini/debug.ini.

If you do fix any bugs please let us know what you've fixed.

Tasks

Task 1

Make modifications to the existing Videos homepage.

Task 1a

Order the Videos in the table by the PublicationDate column.

See: includes/site-core/classes/controllers/class_controller_videos.php

Task 1b

Use your own judgement and add more Video data from the database to the HTML table on the Video Homepage.

Task 2

Create a new Video Gallery page that displays 5 of the most recent video's thumbnails.

To do this you will need to use the siteVideoToImage link table, this database query is already coded for you.

To create the thumbnail you'll need to look at the clsImage class. You should use the funFetch method.

Delivery

We don't mind how we get your code...

  • If you forked this repository you can send in a pull-request on github.
  • If we've sent you this challenge as a Zip file or directly:
    • you can send it back to us as a Zip via email.
    • you can send us a dropbox link.

If emailing your code please email technical@goramandvincent.com.

About

Coding Challenge for Ecancer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages