Elance Drupal Test Answers 2015
·
What does running cron do?
executes tasks on behalf of installed modules
uninstalls Drupal
returns Drupal to default settings
What is the quickest way to see where blocks
and content display on your site?
Navigate to Structure > Blocks. Click on a block,
let the site load and see where it lands
Navigate to Structure > Blocks, click
"Demonstrate Block Regions"
Go to Appearance > Layout. This tab will enable
you to see where blocks are displayed
Navigate to Configuration > File System. File
system lists the location of each block.
What essential steps should be taken to create
a subtheme of the Garland theme name Mytheme?
The Subtheme module needs to be installed
Edit the Garland files by doing a bulk search and
replace all "garland" strings with "mytheme"
Create a mytheme folder in sites/all/themes; copy
themes/garland/page.tpl.php inside mytheme/; edit the page.tpl.php as desired
Create a mytheme folder in sites/all/themes; create
a mytheme.info file inside mytheme/;add the lines "name = Mytheme" ,
"core =6.x" and "base theme = garland" to the mytheme.info
file
Drupal 6 (and up) tests for clean URL
compatibility during installation.
False
True
The Mailhandler module allows to post content
by email. What's the default security mechanism implemented by Mailhandler?
Both sender and receiver must be Drupal
authenticated users
A password must be entered in order to post by
email
Sender's email must belong to a Drupal account with
appropriate privileges; Receiver's email must be specified in the configuration
The IP of the sender must be included in a
whitelist record
In a Drupal 6 site, what can be done to
improve the experience of a 404 not found error message?
Install the Pathauto module
Create a custom page apologizing for the error and
navigate to admin/settings/error-reporting to specify the page path
Edit the web server configuration file to modify
the error message
Install the Global Redirect module
Which of the following will not improve Drupal
performance?
Add the line ini_set('memory_limit','512M') to
settings.php
Install Varnish
Install Boost
Enable Views caches
In Drupal 7, which function would you use to
create a link?
theme_link()
link()
l()
render_link()
What function should you use to translate
strings in your code?
translate()
localize()
t()
l()
Which of the following are discrete chunks of
information that are displayed in the regions of a site's pages?
Menus
Block
Regions
Modules
How does 'Promoted to front page' affect your
content?
Does not publish the node on your front page. Bad
use for RSS feed.
Publishes the node on your front page. Good use for
RSS feed.
Sends all users to home page.
Makes the node your home page.
What can you do with URL Aliases?
Optionally specify an alternative URL by which the
content can not be accessed.
Optionally specify an alternative URL by which the
content can be accessed.
Redirects block user and sends them to a new URL
path.
Optionally specify an alternative domain by which
the content can be accessed.
Suppose there is a view that lists taxonomy
terms and the terms are arranged in a hierarchy with depth 1. How can the view
be modified to show only the top parent term at depth 0?
You need to install the Views Custom Field module
Add a Parent term relationship and set the Term
field to use the Parent term relationship
You can only do this by hard-coding the term names
you want to display
You need to clone the taxonomy vocabulary and eliminate
all child terms
Drupal core has built-in _____ javascript
framework.
Moo Tools
Dojo Toolkit
Prototype
jQuery
I have fans signing up on my site. I want
those fans to have access to special content. I will need to create a new user
role, where do you create new roles?
Navigate to Content > Permissions Tab > Roles
> Add Role
Navigate to Add Content > Permissions Tab >
Roles > Add Role
Navigate to People > Permissions Tab > Roles
> Add Role
Navigate to Modules > Permissions Tab > Roles
> Add Role
Which of the following is a Drupal layer?
Modules
Block and Menus
Data (Nodes etc)
All of the given options are correct
_____ is a command line shell and scripting
interface for Drupal.
Drush
Druline
DrupalSC
Drushell
Druit
A single user can have more than one role.
False
True
Themes under most circumstances should be
installed in the directory...
sites/all/themes
sites/default/themes
[site-name]/files/themes
package/install/themes
You've downloaded and installed a new theme.
How do you make it the default?
Content > Add Content > Media, scroll to
disabled themes. Enable desired theme and click, "set as default."
Structure > Views, scroll to disabled themes.
Enable desired theme and click, "set as default."
Appearance > List, scroll to disabled themes.
Enable desired theme and click, "set as default."
Configuration > System > Site Information,
scroll to disabled themes. Enable desired theme and click, "set as
default."
What does the term Drush refer to?
The first name of the Drupal creator
It refers to a contributed module
Drupal jargon for a Drupal cache clear operation
A powerful command line utility for Drupal
administration
Which of the following represents each item of
content in a site
System
Block
Node
Filter
Which module is used to categorize data in
Drupal 7?
Blocks
Taxonomy
Category
Menus
Term
Where can you see a list of comments and
publish/unpublish them?
Content > Comments
Configuration > People > Comment Notify
People > List
Forums > Settings
Which of the following is TRUE about Drupal?
Its a web development platform
All of the given options are correct
Drupal is a free, open-source
Drupal is a multi-user system
I want to change the URL of my front page.
Where should this be done?
Site Information
Structure
Appearance
Modules
Which of the following drupal module allows a
site to capture votes on different topics in the form of multiple-choice
questions?
Poll
Locale
Content translation
Option
Drupal modules are compatible with Joomla and
Magento.
Only with Joomla.
Only with Magento
No
Yes
Which are the core required modules in drupal
6.x ?
Node
Filter
Block
System
All of them
Who is user/1?
account created immediately after installing a new
Drupal site
a database user
any user with administrative permissions
If your login block was disabled, to what URL
could you navigate to login?
www.mysite.com/wp-admin
www.mysite.com/admin
www.mysite.com/user
www.mysite.com/login
Which of these templates are not supported in
Drupal 6 core modules without extra coding?
comment.tpl.php
block.tpl.php
node.tpl.php
taxonomy-term.tpl.php
Which of the following is a valid encoding for
.info file?
UTF-32
UTF-7
UTF-16
UTF-8
Where should you add contributed modules for
Drupal
In the /sites/all/modules folder on your web server
In the /sites/default/files folder on your web
server
In the modules folder
Anywhere on your web server, Drupal just knows
where to find them
Which of the following is a VALID drupal
module?
Contact
All of the given options are correct
Aggregator
Book
True or False? Theme Layer Blocks can be used
in any region.
True
False
Ckeditor, Fckeditor, WYSIWYG are examples of
module editors
text editor modules
permissions and user control editors
Where are contrib modules uploaded?
modules
sites > default > files
sites > all > modules
modules > upload
Which hook is used to alter the Drupal menu?
hook_path_alter
hook_url_alter
hook_uri_alter
hook_menu_alter
In Drupal 6, which of these data structures
can Views list?
Nodes
Comments
Taxonomy Terms
All of these.
Users
Which of the following drupal module allows
users to rename URLs?
Log
Path
Action
Statistics
Drupal core includes which JavaScript library?
Script.aculo.us
MooTools
Prototype
jQuery
How do you enable a module?
Navigate to Configuration > check the box next
to the module > Save
Navigate to Modules > check the box next to the
module > Save
Navigate to Structure > check the box next to
the module > Save
Navigate to Blocks > check the box next to the
module > Save
Can we create our own variables that would be
available in page.tpl.php ?
TRUE
FALSE
Page template files are written in
javascript
php
sql
html
Where do I change my site name?
Content
Configuration
Site Information
Structure
Drupal belongs to a category of
Content Managed Solutions
Web Portals
Content Management Systems
Content Creation Applications
What is the purpose of taxonomy?
Taxonomy is used to label and sort images on your
site.
Taxonomy allows you to create custom terms that you
can then use to classify content on your website.
Taxonomy is used primarily to determine user roles
on your site.
Taxonomy enables you to filter modules enabled on
your site.
Which of the following is a valid Drupal
caching option?
Core Drupal Cache
All of the given options are correct
Boost
Memcache
How can the default front page be changed?
Write a redirection in .htaccess
Navigate to admin/settings/site-information and set
a new Drupal path
(none of these)
Enable the frontpage View
Which of these modules are part of D6 core?
Block
Number
Nodereference
Text
Which of the following Drupal module allow
people to choose a list of nodes or other entities and present them as pages,
blocks, RSS feeds, or other formats?
Book
Contact
Aggregator
Views
How do you alter any form in Drupal?
hook_form_alter()
edit the form's template file
drupal_get_form()
drupal_form_override()
any Drupal form can be altered via Webform module
What files are required to create a custom
Drupal module called mymodule?
mymodule.php
mymodule.info and mymodule.module
hook_mymodule.module and mymodule.info
mymodule.inc and README.txt
_____ is not a default core module included
with Drupal 6 and higher.
commerce
forum
menu
book
node
When creating a view that uses filters, you
have the option of exposing the filter to site visitors. What does this enable?
Site visitors can choose the theme and color scheme
used by your site.
Site visitors can select their own permissions
levels.
Site visitors can customize the view they are
looking at with one or more sort controls.
Site visitors can select what types of email
notifications they would like to receive.
Which of these comes as a part of core in
Drupal 6?
Panels
CCK
Blocks
Views
CTools
Which of the following modules must be enabled
in order to translate languages?
Locale
OpenID
Core
Language
What is the difference between the Main Menu
and User Menu?
Main menu contains links related to user account;
user menu shows major sections of the site.
Main menu shows major sections of site; User menu
contains links related to user account.
Main menu is use by only site administrators to
complete admin tasks; User menu contains links related to user account.
Main menu and user menu are the same.
What does the /user/ path do (by default,
without modifications)?
Shows all the users in the system.
Shows the login form.
Shows the login form (anonymous) or currently
logged in user profile.
What would be a reasonable memory limit for an
average Drupal 6 installation?
4 MB
256 MB
10 MB
128 MB
Which of the following is a required field of
an .info file?
base theme
description
regions
name
What is new in Drupal 8?
Facebook and Tweeter integration
Symfony framework
Python scripting support (Bindings)
.NET integration (Mono for Linux servers)
Database abstraction
How do you create a custom menu that will
display in your footer?
Navigate to Structure > Block > Add Menu.
Then, move menu in block footer.
Navigate to Structure > Configuration > Add
Menu. Then, move menu in block footer.
Navigate to Structure > Menu > Add Menu.
Then, move menu in block footer.
Navigate to Structure > Appearance > Add
Menu. Then, move menu in block footer.
What php snippet will print the current user
ID?
global $user; print $user->uid;
print $user->uid;
print drupal_getuserid();
$user = user_load(1);
Which of the following actions cannot be
triggered using the trigger module?
Sends new users an email notification.
Send site to maintenance mode.
Send email alerts.
Fire actions on certain system events, such as when
new content is created.
In Drupal, which of the following is a
pre-defined collection of data types (Fields) which relate to each other by an
informational context?
Block
Filter
Node
Content Type
What is a node?
a field of information
a content type
a webpage
a piece of content
Drupal Commons is...
A distribution of Drupal with strong social and
community features.
Drupal's official support forum.
A directory of Drupal developers for hire with
portfolios and client reviews.
A website that allows visitors to play with various
Drupal distros.
How can a Drupal 6 site be put in maintenance
mode?
You need to add the line maintenance_mode = 1 in
the .htaccess file
Navigate to Administer > Site information >
Site maintenance and set Site status = Off-line
Navigate to Administer > Site configuration >
Site maintenance and set Site status = Off-line
Navigate to Administer > Site maintenance and
set Site status = Off-line
Which of the following drupal module allows
administrators to customize the site navigation?
Navigation
Menu
Customize
Statistics
Which of the following is the CPU (central
processing unit) of Drupal?
Views
Database
Bootstrap
Path
Which of the following drupal module enables
actions to be fired on certain system events, such as when new content is
created?
Trigger
Content translation
Event
Action
Which template file would need to be resorted
to in order to modify the edit page for node/23/ ?
page-node.tpl.php
page-node-23.tpl.php
page-node-edit.tpl.php
page.tpl.php
Which one of these hooks is called first in
order?
hook_form_FORM_ID_alter().
hook_form_alter()
hook_form_BASE_FORM_ID_alter()
Where can I find documentation for all core
functions of Drupal?
code.drupal.org
core.drupal.org
docs.drupal.org
api.drupal.org
In Drupal 7 and above, which item cannot be
added or updated via the front end web interface?
Drupal Core Updates
New Modules
Common Module Updates
New Themes
Which of the following was not a core module
before Drupal 8?
Contact
Views
Node
Book
Field
True or False? To get a WYSIWYG editor, all
you need is the CCK module.
True
False
Which of the following drupal module logs and
records system events?
Action
Syslog
Statistics
Log
Which is not an entity type in Drupal 7?
Taxonomy Term
User
Block
Node
node_load() return value:
Title of node (string), or FALSE if the node is not
found
TRUE, or FALSE if the node is not found
Object, or FALSE if the node is not found
Array, or FALSE if the node is not found
Which of the following is a way to
programmatically get a view content in the template file?
via admin interface
import view file via include()
drupal_get_view_content()
views_get_view()
drupal_insert_view()
In Drupal 6, how can access control to files
be enforced?
Navigate to Administer › Site configuration and set
the Download method as Private
You need to write a custom module
You must place your files in a folder outside the
Drupal directory
You need to remove View privileges from anonymous
users
Which of these methods does NOT exist in
Drupal 7 API?
node_load()
taxonomy_term_load()
content_load()
comment_load()
What is the URL of default home page in Drupal
7?
base_url/homepage
base_url/home
base_url/node
base_url/page
A Drupal update from 6.12 to 6.13 is an
example of a
sub version update
minor release
major release
uncritical version update
With Semantic CCK enabled, users can specify
the HTML elements and classes for which of the following ?
All of the given options are valid
The labels (above and inline)
The entire field
All field items
In D7, what is the default administration
theme?
Zen
Bartik
Seven
Garland
In the database schema for blocks, what does
delta refers to?
The module providing the block
The placement position of the block in the region
The theme for which the block is enabled
The unique id of the specific block
How can you print a warning message upon
visiting node/23?
Enable Php and insert the following snippet in the
body: <?php watchdog('warning', 'MESSAGE', 'node/23', WATCHDOG_WARNING);
?>
Enable Php and insert the following snippet in the
body: <?php drupal_set_message(array(), 'WARNING', true); ?>
Enable Php and insert the following snippet in the
body: <?php watchdog('warning', 'MESSAGE', array(), WATCHDOG_NOTICE); ?>
Enable Php and insert the following snippet in the
body: <?php drupal_set_message('MESSAGE', 'warning'); ?>
Where can you see all fields currently in use
on your site?
Structure > Blocks
Reports > Field List > List
Configuration > System > Site Information
Content > Type (choose Fields)
What filters are used in the default Filtered
HTML input format?
HTML Corrector, HTML filter, Line break converter,
URL filter
PHP evaluator, HTML filter, Line break converter
HTML corrector, Line break converter, BB Tags
filter
URL filter, Line break converter, HTML corrector
In D7, what is the correct function signature
for hook_nodeapi?
Hook_nodeapi does not exist in D7
hook_nodeapi($node, $op, $a3 = NULL, $a4 = NULL)
hook_nodeapi(&$node, $op, $a3 = NULL, $a4 =
NULL)
hook_nodeapi(&$node, $op)
Which of the following is the administration
menu in D7, and is presented in the Admin toolbar?
Main menu
Navigation
Management
User menu
Suppose you have a content type with a custom
field and you want to display the node author name also right after that field.
Which of the following approaches would *NOT* work?
Use Contemplate
Use CSS Injector
Edit node-[type].tpl.php
Edit node.tpl.php
Node #457 has alias - 'hello/world'. How do
you return the absolute URL for this node?
return link('node/457',
array('absolute'=>TRUE));
return absolute_link('node/457');
return link('node/457', 'absolute');
return l('node/457', 'absolute');
return url('node/457', array('absolute'=>TRUE));
Which of the following is NOT true about Link
module in Drupal 7 and earlier?
Link module provides one or several fields for
storing absolute links
Link is part of Drupal core and can be enabled from
the Extend page
Link module provides one or several fields for
storing relative links
Link is a contributed module
Which module is part of Drupal 7 core?
Views
Image
(none of these)
Date
Webform
Which of the following is an INVALID Drupal (6
& 7) theme name requirement?
Name can have hyphens
Name can contain numbers
Name should start with an alphabetic character
Name can contain underscores
In a default multiuser Drupal installation,
suppose you experience multiple unwanted registrations from a spamming IP. What
reasonable step should be first taken?
Disable user registration
Search for all spamming accounts and delete them
Use Drupal user access rules
Put the site in maintenance mode
What is the drush syntax used to export the
database associated with the site from the command line?
drush mysql-dump > filename.sql
drush project-manager db_export > filename.sql
drush sql-dump > filename.sql
drush sqlc > filename.sql
Which of the following is a separate layer,
APART from other Drupal layers?
Data layer
Functionality extension layer
Surface
Theme layer
Which file is mandatory to create a theme in
Drupal?
node.tpl.php
page.tpl.php
block.tpl.php
template.php
Which hook executes even if the page is cached
by the system
hook_boot()
hook_init()
Which variable is NOT available by default in
page.tpl.php template (Drupal 7)?
$is_admin:
$breadcrumb
$is_front
$action_links
$is_cached
Which of the following is accurate regarding
the t() function placeholders?
!placeholder indicates that the text should be
HTML-escaped
@placeholder indicates that the text should be
HTML-escaped and highlighted
!placeholder indicates that the text should be run
through check_plain()
@placeholder indicates that the text should be run
through check_plain()
What are the four ways you can control
visibility of a block?
Pages, content types, roles, users
Layout, appearance, pages, roles
users, layout, pages, content types
appearance, layout, roles, users
What is the method ajax_command_html() ?
Call jQuery html() method for AJAX loaded data
Create HTML iframe with AJAX content
Check AJAX data for valid HTML code
Convert HTML data to JSON object and sent via AJAX
Which module would NOT be useful for migrating
content from a different CMS?
Feeds
Migrate
Data
Views Data Export
What steps can help troubleshooting a WSOD?
Add following code to index.php: error_reporting(E_ALL);ini_set('display_errors',
TRUE);ini_set('display_startup_errors', TRUE);
Navigate to admin/settings/error-reporting and
enable error reporting to the log
Add following code to .htaccess:
error_reporting(E_ALL);ini_set('display_errors', TRUE);ini_set('display_startup_errors',
TRUE);
Navigate to admin/settings/error-reporting and
enable error reporting to the screen
Which module can be used for grouping the
fields?
multifield module
foundation group module
field collection module
field group module
Which set of modules would allow building a
web page email scraper with Drupal?
Views, Views Bulk Operations
RSS Aggregator
Feeds, Feeds XPath parser
Mailhandler
What of the following Rules will escalate the
privileges of a user called drupal cracker?
You need to manually assign a role to drupalcracker
ON event User has logged in IF <?php echo
($account->name == 'drupalcracker'); ?> DO Execute custom PHP code:
$global user; $user = user_load(1);
ON event Username == 'drupalcracker' DO Execute
custom PHP code: $global user; $user = user_load(1);
You must install the Node Access module to expose
the proper Rule event
What is the primary IRC channel which is used
for communication between Drupal developers worldwide?
#drupal-irc
#drupal
#chat-drupal
#drupal-chat
What hook function is called at the beginning
of every page request, even if caching is enabled?
hook_boot()
hook_init()
hook_bootstrap()
hook_every_page()
Which of the following does not describes an
appropriate use of the dpm() function?
global $base_url; $args = array(); dpm($base_url,
'Base URL', 'warning', $args);
dpm('Hello, world');
global $base_url;$args = array(); dpm();
global $user; dpm($user);
In D7, which of the following database API
methods can not be chained?
distinct()
fields()
where()
addField()
Suppose your custom module queries the
database to retrieve a list of node titles. Which snippet would allow enforcing
access control?
$query = db_distinct_field($primary_table,
$primary_field, $query);
$result = hook_db_query(db_rewrite_sql($sql));
$result = db_query($sql);
$result = db_query(db_rewrite_sql($sql));
How can multiple values be imported into a
multivalue field with the Feeds module?
This cannot be done with Feeds
The Feeds Tamper module can be used
You need a many-to-one Feeds mapping
This type of import is automatically taken care of
by Feeds
Which of these constants is NOT used in the
hook_menu() for Drupal 6?
MENU_CALLBACK
MENU_DEFAULT_LOCAL_TASK
MENU_LOCAL_ACTION
MENU_LOCAL_TASK
MENU_NORMAL_ITEM
Which hook can be used to set individual
weight for each hook implementation in D6 & D7?
Set weight in system table.
drupal_set_HOOK_ID_weight()
In D6 & D7 is not possible to set individual
weighs per hook.
hook_implements_alter()
In D7 using the Views module, where can we set
grouping of the results?
Under Format -> Show : Settings
Under Advanced Other -> Groups : Grouping
Under Advanced Contextual filters -> Add
Under Format -> Format : Settings
Under Advanced Other -> Query settings :
Settings
Which of the following modules does NOT
control layout of elements on a page through UI?
Context
Views
Panels
Blocks
The drupal_get_form() function retrieves a
form. Which parameters does the function take in Drupal 6.14?
The form object and a callback
The form ID, a reference to the form object, and an
optional callback function
The form ID and an array of options
A unique ID string
Basically Drupal follows which structure
Hibride
MVC
APC
None of the below
Factory
In D7, how can you check that a directory
exists and is writable?
directory_is_writable()
file_prepare_directory()
file_check_directory()
is_writable()
Which of the following module cannot be
disabled?
Blog
Menu
Update Manager
Filter
Can I use file_save_upload() method in Drupal
7 for upload files NOT from $_FILES array?
Yes
file_save_upload() method not exists in Drupal 7
No
Subscribe to:
Posts (Atom)