The goal of this evaluation is to gauge your current knowledge of Drupal and related technologies as a web developer. There are no right or correct solutions for this evaluation. Just be sure to do your best and ask questions if you are unsure or stuck on something. The resulting module will go through a code review where choices and implementation details can be discussed.
The development portion of this evaluation is expected to take approx. 3-4 hours to complete. Times to completion will vary widely depending on experience. You will be able to get your development environment set up prior to beginning this evaluation.
You are also encouraged to ask questions and interact with the other developers
during this evaluation. At the end of the evaluation you will turn in your
completed filtered_videos
module for review.
This evaluation requires a working development environment with Web Server, PHP & MySQL installed. In order to complete this evaluation, you will need to have the following setup on your local development environment:
- a web server running:
- PHP
- MYSQL
- Drush installed globally
Below is the development environment we currently are running. You do not need to have the same environment for your local development machine, just ensure you can set up a new PHP/MYSQL website and it meets the minimum requirements needed to run Drupal 7.
- nginx version: nginx/1.10.1
- MySQL Server version: 5.7.14 Homebrew
- Drush Version: 8.1.3
- PHP: 5.6.24
During the evaluation, we will be using Slack to communicate. You will be given an invite to the Slack channel before the evaluation. If you do not have Slack, it can be downloaded here: https://slack.com/downloads
Use the instructions below to get a standard Drupal install running on your development machine:
- Fork this repository to make your own copy.
- Clone the Fork to ~/src/drupal-test.dev/
- Create a new Virtual Host for your web server to run this evaluation.
- Set the domain as drupal-test.dev or something similar.
- Set the root directory to
~/src/drupal-test.dev/htdocs
- Create a new mysql database.
- Name the new database
drupal_test_dev
- Run the Drush make file
pac12.make
to install drupal and required modules.
- The destination for the make file should be
~/src/drupal-test.dev/htdocs
- Using Drush, run a standard install Drupal. Specify the Database URL, User & Password to ensure a settings.php file is generated for you.
- Enable modules
- Features
- jQuery Update
- Navigate to the site to ensure that everything is running.
Now that Drupal is up and running and the required modules have been installed, we will outline the requirements to be completed for this evaluation. We will be creating a new content type, modifying the node edit form for the content type and adding some front end functionality to it.
- Create a content type,
Filtered Videos
- Make sure the machine name is
filtered_videos
- Add the following fields:
Auto Fetch
- Field Type:
Boolean
- Widget:
Single On/Off checkbox
- Field Type:
School
-
Field Type:
List (Integer)
-
Widget:
Select List
-
Allowed Values:
9|Arizona 15|Arizona State 10|California 16|Colorado 17|Oregon 18|Oregon State 19|Stanford 20|UCLA 21|USC 22|Utah 23|Washington 34|Washington State
-
- Sport
-
Field Type:
List (Integer)
-
Widget:
Select List
-
Allowed Values:
6|Baseball 7|Men's Basketball 36|Women's Basketball 8|Football
-
- Featurize Content Type
Filtered Videos
- Name:
Filtered Videos
- Description: Filtered Videos Drupal Evaluation Module
- Package: Drupal Test
- Version: 7.x-1.0
- Either generate or download the feature so that you can further extend it.
- Place the new feature into the
sites/all/modules
folder of your Drupal install. - Enable the
filtered_videos
module using drush.
- Create a node override template for the
filtered_videos
content type.
- This template should replace the
node.tpl.php
template when viewing this content type.
- In the new node template, do the following:
- Remove the render calls and their surrounding elements for submitted metadata, contents, comments & links.
- Add an HTML button
- Give the button a unique identifier.
- Add an HTML div under the button
- Give the div a unique identifier.
- Create an empty javascript file inside of the module.
- Name the file
filtered-videos.js
- Attach the
filtered-videos.js
file to the page when viewing afiltered_videos
content type. - Attach javascript settings to the page when viewing a
filtered_videos
content type.
- In the settings, expose the following fields of the
filtered_videos
content type.Auto Fetch
,School
&Sport
- In the
filtered-videos.js
file, add a new Drupal behavior.
- Wrap the behavior in a javascript closure that passes a reference to jQuery.
- When the button in the template is clicked, display a list of videos, then hide the button.
- Use the VOD API to fetch a list of videos via AJAX.
- For each VOD display a thumbnail linked to its URL.
- Include an alt tag in the image with the VODs title.
- Include a title tag on the link with the VODs title.
- If
Auto Fetch
is set to true, automatically trigger the above logic and hide the button.
The below optional tasks are not required for this evaluation. If you complete the evaluation ahead of time and would like to try and implement these additional features, you are encouraged to do so.
- Provide next/previous links to navigate between the pages of VODs returned by the API.
- Display VOD titles and descriptions under linked thumbnails.
- Attach a CSS file to the
filtered_videos
content type and stylize the list of thumbnails.
- Once you have completed the evaluation, commit the entire htdocs directory into your repository.
- Push your commits up to your fork of the repository.
- You are encouraged to make incremental commits as you work through the evaluation outlining and describing the changes being committed.