Хотите пройти тесты на Upwork на хороший результат?
Подавайте заявку и мы поможем Вам это сделать!

Do You want to pass tests on Upwork with good scores?
Leave the request and we will help You to do that!

Drupal Test 2017

Share on RedditPin on PinterestEmail this to someoneShare on TumblrShare on LinkedInShare on Google+Tweet about this on TwitterShare on FacebookShare on VK

Мы не гарантируем правильность всех предоставленных ответов.


112 Test Questions:

1. The following are advantages of using Drupal Views vs. custom module development EXCEPT:

Answers:

• Development speed — creating a View will be faster than creating a custom module most of the time
• Performance — Views offer increased performance over custom modules
• Maintenance — Views is a Drupal standard, as opposed to using custom modules, which gives your site’s maintenance an unnecessary learning curve
• Upgrading — Views provide an upgrade path to future versions of Drupal, which custom modules don’t provide out-of-the-box

2. Which of the following is the correct way to restrict users, with an email address ending in example.org (user@example.org, test@example.org, etc), from registering an account?

Answers:

• By adding «%@example.org» as an email restriction in the Access Rules administration settings
• By installing a Captcha module and its required modules
• By creating a custom module and implementing the hook_user_restrictions hook
• By installing the Domain Access module and its dependencies

3. How can a Drupal site be taken offline or in maintenance mode using Drush?

Answers:

• drush vset site_offline 1
• drush vdel site_offline
• drush vset maintenance_mode 0
• drush setoffline 1

4. Which of the following is the correct way to add a user’s first and last name in Drupal?

Answers:

• By enabling Profile module. This module allows for fields to be added to users like first-name and last-name.
• Must enable the User Details module.
• Can not do this for Drupal users.
• A and B

5. Suppose the user is on the folllowing URL:
http://example.com/blog/odesk-skills-test?page=1#comment-123
The above URL path is an alias of the following URL path:
http://example.com/node/8
What would be the output of the following code? (Assume it’s placed in the node.tpl.php file)
$arg_0 = arg(0);
var_export($arg_0);

Answers:

• ‘1’
• ‘node’
• ‘blog’
• ‘blog/odesk-skills-test’

6. Which of the following is the correct way to install another Drupal that shares the same modules, themes, libraries and core code of an existing site, while using a new database?

Answers:

• By creating a new folder in the ‘sites’ folder with the new domain name as folder name. Then, copy the sites/default/default.settings.php file to the new folder. Run the install.php script from the browser afterwards.
• By installing the Subdomain module and its required modules.
• By adding the new site domain name as a key in the ‘$db_url’ associative array in the settings.php file.
• A single Drupal code base cannot be used to host multiple sites.

7. Which of the following will not change the value of a CCK field automatically as soon as the user creates a new node?

Answers:

• By using the Rules module and adding and configuring a new Triggered Rule.
• By installing the Computed Field module and creating a Computed Field as the changing field.
• By implementing the hook_nodeapi hook in a custom module.
• By implementing the hook_node_info hook in a custom module.

8. Which of the following is not a desired way to create a custom page with custom layout in Drupal?

Answers:

• Using panels
• Using a .tpl.php file specificially for that page
• Build page with exact HTML structure you want
• None of above

9. «hook_js_alter» overrides JavaSript in Drupal. Which of the following statements are true?

Answers:

• It performs the necessary alterations to the JavaScript code before it is presented on the page.
• It performs the necessary alterations to the JavaScript code after it is presented on the page.
• It performs the necessary alterations to the JavaScript code before the page is loaded by browser.
• It performs the necessary alterations to the JavaScript code after the page is loaded by browser.

10. Which of the following is the correct way to control the maximum character length in views, while displaying field content?

Answers:

• Select «exclude from display» and use token values to display fields
• Select «Trim this field to a maximum length» and put the number of characters
• Select «rewrite output» and write a PHP function for the maximum length
• Use the maximum field formatter to restrict the character length

11. function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
array_shift($breadcrumb);
return ‘<div class=»breadcrumb»>’. implode(‘ › ‘, $breadcrumb) .'</div>’;
}
}
Which of the statement(s) about the code above is/are true?

Answers:

• The code will add one item to the breadcrumbs
• The code will remove the home item from the breadcrumbs
• The code will add one item at the end of the breadcrumbs
• The code will add a separator to the breadcrumbs

12. How can a Drupal site be brought out of maintenance mode?

Answers:

• By changing the $maintance_mode variable in the settings.php file to FALSE.
• By changing the «Site status» configuration in admin settings to «online».
• By removing the maintenance-lock.php file from the root of the Drupal installation folder.
• By granting «access site» permissions to anonymous users.

13. Which one of the following is correct way to list all routes?

Answers:

• drupal router:debug
• drupal router:all
• drupal router:list-all
• drupal route:all

14. Which of the following formats are supported by default in Views?
Note: There may be more than one right answer.

Answers:

• Grid
• HTML List
• Table
• Slideshow

15. Use the CCK module to add fields to your ____.

Answers:

• Nodes
• Pages
• Files
• Modulars

16. Default location of the configuration sync directory is?

Answers:

• DRUPALROOT/sites/all/config/config_LONG_HASH
• DRUPALROOT/sites/default/config_LONG_HASH
• DRUPALROOT/sites/default/files/private/config_LONG_HASH
• DRUPALROOT/sites/default/files/config_LONG_HASH

17. Which of the following statements is valid for Field SQL Storage?
Note: There may be more than one right answer.

Answers:

• Field UI—allow you to create fields and attach them to content types, comments
• Fields can be stored in different formats and formatted in different ways
• Fields can not be stored in different formats and formatted in different pages
• None of the above

18. To create our own Controller we need to extend it from the following Controller Class:

Answers:

• BaseController
• ControllerBase
• Controller
• ControlController

19. Which of the following is correct way to translate string in Twig?

Answers:

• {{ ‘String to translate’ | translate() }}
• {{ ‘String to translate’ | t() }}
• {{ ‘String to translate’ | t }}
• {{ t(‘String to translate’) }}

20. In Drupal 8, CacheCollector has the same internal logic as CacheArray but uses public methods for get and set instead of __.

Answers:

• ArrayAccess
• CacheArray
• RenderArray
• 2DArray

21. Which of the following APIs are provided by Drupal?
Note: There may be more than one right answer.

Answers:

• Authentication API
• Block API
• RESTful Web Services API
• Tour API

22. Which one of the following is true with respect to JQuery loading in Drupal?

Answers:

• jQuery loads on every page
• jQuery only loads where required
• jQuery does not load on any page
• jQuery is not bundled with Drupal Core

23. Which of the following code you can use and can change date_popup date format in form?

Answers:

• $form[‘mymodule_end_date’] = array(
‘#type’ => ‘date_popup’,
‘#title’ => t(‘Start date’),
‘#date_format’ => ‘d-m-Y’,
‘#datepicker_options’ => array(
‘maxDate’ => 0,
‘dateFormat’ => date_popup_format_to_popup(‘d-m-Y’),
),
‘#date_year_range’ => ‘-3:+0’,
‘#date_label_position’ => ‘above’,
‘#theme_wrappers’ => array(‘date_popup’),
‘#required’ => TRUE,
);

• $form[‘mymodule_start_date’] = array(
‘#type’ => ‘date_popup’,
‘#title’ => t(‘Start date’),
‘#date_format’ => ‘d-m-Y’,
‘#datepicker_options’ => array(
‘maxDate’ => 0,
‘dateFormat’ => date_popup_format_to_popup(‘d-m-Y’),
),
‘#date_year_range’ => ‘-3:+0’,
‘#date_label_position’ => ‘above’,
‘#theme_wrappers’ => array(‘date_popup’),
‘#required’ => TRUE,
);

• $form[‘mymodule_start_date’] = array(
‘#type’ => ‘date_popup’,
‘#title’ => t(‘Start date’),
‘#date_format’ => ‘d-m-Y’,
‘#datepicker_options’ => array(
‘maxDate’ => ‘0’,
‘dateFormat’ => date_popup_format_to_popup(‘d-m-Y’),
),
‘#date_year_range’ => ‘-3:+0’,
‘#date_label_position’ => ‘above’,
‘#theme_wrappers’ => array(‘date_popup’),
‘#required’ => TRUE,
);

24. Drupal has over _____ plug-ins to boost your website?

Answers:

• 1000
• 2000
• 4000
• 5000
• 7000

25. In module.routing.yml file ‘requirements’ can have following properties defined?
Note: There may be more than one right answer.

Answers:

• _permission
• _role
• _csrf_token
• _form

26. Which of the following are required properties for route definition in module.routing.yml?
Note: There may be more than one right answer.

Answers:

• path
• defaults
• requirements
• options

27. Which of the following is correct to attach a library in a Drupal Module?

Answers:

• use [‘#attached’] property
• drupal_add_js() and drupal_add_library()
• both of the above
• none of the above

28. Configuration Management in Drupal provides following data storage types?

Answers:

• Content
Session
State
Configuration

• Session
State
Configuration

• Views
Session
State
Configuration

• Permissions
Session
State
Configuration

29. Drupal core ships with a rich caching API, defaulting to ___ caching.(Which of the following is used by default by Drupal’s caching API?)

Answers:

• Database
• PHP
• Server
• Local

30. Which of the following is correct to include CSS or JS files in a Drupal Module?

Answers:

• Save the CSS or JS to a file.
Define a «library», which can contain both CSS and JS files.
«Attach» the library to a render array in a hook.
• Use add_js and add_cs function in module file
• Use hook_library_info() in module file

31. If a custom module is listed on admin/modules but its checkbox is disabled, which of the following will fix it?

Answers:

• Make sure that the core compatibility is set to 7.x in module_name.info.yml file
core: 7.x
• Make sure that the core compatibility is set to 8.x n module_name.info.yml file
core: 8.x
• create another file named module_name.module
• create another file named module_name.routing.yml

32. require ‘./includes/bootstrap.inc’;
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$db_result = db_query(‘SELECT * FROM {users}’);
while($user_object = db_fetch_object($db_result)){
// .. code here
}
Which of the following statement(s) about the above code is/are true?

Answers:

• The code can be written in the theme template.php file to fetch all users
• The code won’t run correctly; drupal_bootstrap can’t run from an external script file
• The code can be used in a custom module script to fetch all users
• The code can be used in an external PHP file to fetch all users

33. By default, does Drupal Filefield allow uploading of javascript files?

Answers:

• Yes, just like any other files.
• No, it would be a security risk if it is allowed, what is does is change the type of the file to .txt
• No, can not upload files in Drupal.
• A and B are correct.

34. What is the best way to create multiple blocks from a single module?

Answers:

• Using module_hook_block hook with $delta
• Setting an option from the Drupal admin block page for any module
• Creating a separate module for blocks
• Manually updating drupal_block table to the number of blocks

35. Suppose there is a new version for a module that is installed on a Drupal 6 site. This new version contains some database updates. Do those database updates need to be applied manually? If so, how can those updates be applied?

Answers:

• It’s not necessary to apply database updates manually. Database updates will be applied during automatic maintenance (cron).
• Run the update.php script as soon as the previous version is replaced with the new version.
• Disable the module and enable it again. New database updates will be applied when the module is being enabled.
• Run the db-updates.php file.

36. Which one of following makes use of the Features module in Drupal?

Answers:

• Migrating content from one Drupal website to another
• Exporting modules’ functionality in a single feature module
• Exporting website settings
• Backing up of website and database

37. Which of following statements are true about Drupal?

Answers:

• Drupal uses object-oriented programming under an MVC pattern.
• Drupal uses procedural programming under an event-driven pattern.
• Drupal has a service oriented architecture.
• None of the above.

38. By using the auto-complete field for a CCK nodereference, nodereference gives node id as [nid: node id]; which Drupal hook can be used to remove the bracket from the auto-complete list?

Answers:

• menu_alter()
• form_alter()
• A & B both
• None of above

39. Which of the following is the correct way to display recent nodes/posts created by a user on their profile page?

Answers:

• By using views module to create a block, and configuring a view to take an argument as user ID and set that block to show only on profile pages — макерис
• By enabling the node created by users options from the admin panel
• By installing & configuring the related posts module of drupal
• It is a default feature of Drupal to show recent posts created by the user on their profile

40. Which of the following is the correct way to organize your content?

Answers:

• Admin
• Taxonomy
• Theme Files
• Backend

41. You have a view of teasers of a content type containing a referenced ID to a taxonomy term. You want each node in the view to show several fields of that taxonomy term. Which of the following would be best practice if you would do it programmatically?

Answers:

• In the node—teaser template use the referenced ID to load the taxonomy term as an entity and render the wanted fields.
• In the views row template use the referenced ID to load the taxonomy term as an entity and render the wanted fields.
• In the views field template use the referenced ID to load the taxonomy term as an entity and render the wanted fields.
• In the template.php file through the hook_preprocess_node() function load the needed fields and put them in a variable.

42. What Drupal features are activated when a trigger is enabled?

Answers:

• Blocks
• Hooks
• Modules
• Actions

43. What are Triggers?

Answers:

• Triggers are special Drupal variables that display content in the theme.
• Triggers are programs that fire on certain events.
• Triggers are special HTML tags in the Drupal theme.
• None of the above

44. Which one of the following is correct way to discover valid theme hook suggestions?

Answers:

• Install and enable Devel module
• Enable Twig debugging mode
• Write custom module
• Enable Webprofiler module

45. What from listed below is used for organizing content?

Answers:

• Term
• Category
• Theme
• Taxonomy

46. In custom module routes are defined in:

Answers:

• MODULENAME.routing.yml
• MODULENAME.info.yml
• MODULENAME.routes.yml
• MODULENAME.module

47. In Drupal, the highest level of taxonomy description is _____?

Answers:

• Vocabulary
• Blog
• Breadcrumbs
• Modular

48. Which of the following code show all Notices and Errors?

Answers:

• error_reporting(-1);
$conf[‘error_level’] = 1;
ini_set(‘display_errors’, TRUE);
ini_set(‘display_startup_errors’, TRUE);

• error_reporting(0);
$conf[‘error_level’] = 2;
ini_set(‘display_errors’, TRUE);
ini_set(‘display_startup_errors’, TRUE);

• error_reporting(-1);
$conf[‘error_level’] = 2;
ini_set(‘display_errors’, TRUE);
ini_set(‘display_startup_errors’, TRUE);

• error_reporting(1);
$conf[‘error_level’] = 2;
ini_set(‘display_errors’, 0);
ini_set(‘display_startup_errors’, TRUE);

49. Which of the following codes can be used to remove the strange text of Taxonomy Term?

Answers:

• function THEME_preprocess_page(&$vars) {
if(isset($vars[‘page’][‘content’][‘system_main’][‘no_content’])) {
unset($vars[‘page’][‘content’][‘system_main’][‘no_content’]);
}
}

• function THEME_preprocess_page(&$vars) {
if(isset($vars[‘module’][‘content’][‘system_main’][‘no_content’])) {
unset($vars[‘module’][‘content’][‘system_main’][‘no_content’]);
}
}

• function THEME_preprocess_page(&$vars) {
if(!isset($vars[‘page’][‘content’][‘system_main’][‘no_content’])) {
unset($vars[‘page’][‘content’][‘system_main’][‘no_content’]);
}
}

• function THEME_preprocess_page(&$vars) {
if(isset($var[‘page’][‘content’][‘system_main’][‘no_content’])) {
unset($vars[‘page’][‘content’][‘system_main’][‘no_content’]);
}
}

50. Which of the following notifications about the new versions of Drupal and contributions?

Answers:

• Update status
• Status Update
• Update
• Status

51. By default Drupal provides following roles?
Note: There may be more than one right answer.

Answers:

• Anonymous User
• Authenticated User
• Administrator
• Content Manager

52. Which of the following is the correct way to alter existing routes?

Answers:

• Existing routes can not be altered
• Use hook_menu
• Use hook_menu_alter
• By implementing the alterRoutes(RouteCollection $collection) method of class \Drupal\Core\Routing\RouteSubscriberBase

53. Which one of the following is correct way to attach Libraries in THEME.info.yml?

Answers:

• name: custom_theme
type: theme
description: Amazing Custom Theme
package: Other
core: 8.x
libraries:
— custom_theme/global-styling
— custom_theme/views
— custom_theme/header_footer

• name: custom_theme
type: theme
description: Amazing Custom Theme
package: Other
core: 8.x
libraries:
custom_theme/global-styling
custom_theme/views
custom_theme/header_footer

• name: custom_theme
type: theme
description: Amazing Custom Theme
package: Other
core: 8.x
libraries: custom_theme/global-styling, custom_theme/views, custom_theme/header_footer

54. On which PHP framework is Drupal 8 built?

Answers:

• Symfony
• Zend
• Laravel
• Yii 2

55. Which of the following is not secure for SQL queries?

Answers:

• db_query(«SELECT foo FROM {table} t WHERE t.name = :name», [‘:name’ => $_GET[‘user’]]);
• db_query(‘SELECT foo FROM {table} t WHERE t.name = ‘. $_GET[‘user’]);
• $users = [‘joe’, ‘poe’, $_GET[‘user’]];
db_query(«SELECT t.s FROM {table} t WHERE t.field IN (:users)», [‘:users’ => $users]);

56. Fields for content types can be presented and changed using which tool?

Answers:

• Blocks
• Display Types
• Content Types
• None of the above

57. Which of the following options apply to change Public file base URL?

Answers:

• Drupal provides User Interface to change Public file base URL
• Public file base URL can be changed using settings.php
• It can not be changed
• Public file base URL can be changed using template.php

58. Drupal core is __ defining a system of __ and __?

Answers:

• hooks, Modular, callbacks
• modular, hooks, callbacks
• backend, hooks, callbacks

59. Drupal users are grouped into what?

Answers:

• User Groups
• Ranks
• Roles
• Teams

60. Which of the following can be used to check Drupal and its contrib modules updates?

Answers:

• drush up
• drush ups
• drupal up
• drupal check:update

61. What is Drupal’s main container to hold content in its themes?

Answers:

• Modules
• Blocks
• Positions
• None of the above

62. Which of the following is input formats for the user content?

Answers:

• Taxonomy
• Hooks
• Filter
• Admin

63. In Drupal 8, the Internal Page Cache module which caches pages for anonymous users is enabled by default?

Answers:

• True
• False

64. Which of the following files are required for creating a Drupal theme?
Note: There may be more than one right answer.

Answers:

• .info
• page.tpl.php
• settings.php
• themes.php

65. Which of the following file defines routes in a module?

Answers:

• module.routing
• routing.module
• module.routing.yml
• module.info.yml

66. Which of the following can be used to attach a library in twig template?

Answers:

• attach_library()
• drupal_add_js()
• drupal_add_library()
• None of the above

67. True or False:-
«Drupal 6.x modules are not compatible with Drupal 7.x»

Answers:

• True
• False

68. Which of the following is a DRUSH command?

Answers:

• cache-clear
• updatedb
• pm-disable
• config-export
• All of the above

69. Blocks can contain which of the following Drupal data features?

Answers:

• Information from .info files
• Themes, hooks, and template suggestions
• Blocks, views, and modules
• None of the above

70. PDO(PHP Data Object), it is a lean and consistent way to access databases and It allows developers to re-write portable code with ease?

Answers:

• True
• False

71. Which of the following modules are included in Drupal Core?
Note: There may be more than one right answer.

Answers:

• Views
• Superfish
• CKEditor
• Breakpoint

72. True or False:-
«Drupal is an open source CMS, you can create your own plugins.»

Answers:

• True
• False

73. Which of the following minimum PHP version is required to run Drupal 8.2?

Answers:

• PHP 5.3
• PHP 5.4
• PHP 5.5
• PHP 5.6

74. Which of the following is not a correct way to insert function in Twig?

Answers:

• {{ random() }}
• {% if random(10) < 5 %}
• {% sqrt(9) %}
• {{ sqrt(9) }}

75. In module.routing.yml all keys under the defaults section which do not start with an underscore will be passed in as arguments to the controller?

Answers:

• True
• False

76. Which one of the following statement is true?

Answers:

• Asset libraries are simple collection of CSS or JavaScript files
• Asset libraries are simple collection of CSS files
• Asset libraries are simple collection of JavaScript files
• Asset libraries are simple collection of images

77. What will be the output of following in Twig?
<div> {{ pi | round(2) }} </div>

Answers:

• <div></div>
• Error!
• 3.14
• <div>3.14</div>

78. Which of the following is correct to export view in YAML format inside module?

Answers:

• drupal view:export [arguments] [options]
• drush config:export:view [arguments] [options]
• View can not be exported inside module
• drupal config:export:view [arguments] [options]

79. Which of the following options are provided by Drupal to increase performance?
Note: There may be more than one right answer.

Answers:

• Aggregate JavaScript files
• Aggregate CSS files
• Views Caching
• Load jQuery only when it is needed

80. array_key_exist() function that tells you if an array key exists regardless of the value?

Answers:

• True
• False

81. Which one of the following is true?

Answers:

• Variables set in settings.php will override the variables set in settings.local.php
• Variables set in settings.local.php are different than variables set in settings.php
• Variables set in settings.local.php will override the settings.php file

82. Which of the following loop variables are available in twig?
Note: There may be more than one right answer.

Answers:

• loop.index
• loop.revindex
• loop.index0
• loop.length

83. Which of the following is the correct syntax to loop through items in a list in Twig template?

Answers:

• <ul class=»links field__items»>
{ for item in items }
<li {{ item.attributes }} > {{ item.content }} </li>
{ endfor }
</ul>

• <ul class=»links field__items»>
{% for item in items %}
<li {{ item.attributes }} > {{ item.content }} </li>
{% endfor %}
</ul>

• <ul class=»links field__items»>
{- for item in items -}
<li {{ item.attributes }} > {{ item.content }} </li>
{- endfor -}
</ul>

• <ul class=»links field__items»>
{{ for item in items }}
<li {{% item.attributes %}} > {{% item.content %}} </li>
{{ endfor }}
</ul>

84. What is the best way to add category fields to a Drupal content type?

Answers:

• Tags
• Categories
• Taxonomy
• Modules

85. CacheArray is in the process of being replaced by CacheCollector in ____?

Answers:

• Drupal 5
• Drupal 6
• Drupal 7
• Drupal 8

86. Which of the following file is required to create a Drupal 8 Module?

Answers:

• MODULE_NAME.module
• MODULE_NAME.info
• MODULE_NAME.info.yml file (aka, «info yaml file») is required and ensure file has type: module

87. Which of the following shows helpful toolbar at the bottom of every page?

Answers:

• Devel
• Webprofiler
• Drupal console
• Watchdog

88. In Drupal 8 custom modules can be placed inside which of the following directories?
Note: There may be more than one right answer.

Answers:

• /sites/all/modules
• /modules
• /core/modules/

89. In Drupal theming, what is a theme suggestion?

Answers:

• Theme suggestions suggest to the Drupal admin how a theme will best look and it offers HTML, CSS, and Jquery.
• Theme suggestions change the look of a specific node and they re-style views, blocks, and pages.
• Theme suggestions suggest the best way to present a theme to the user.
• Theme suggestions suggest which Drupal theme to download from Drupal.org

90. The minimum requirements for a custom module are:

Answers:

• A folder [CUSTOM_MODULE] in the module directory with the file [CUSTOM_MODULE].info in it.
• A folder [CUSTOM_MODULE] in the module directory with the files [CUSTOM_MODULE].info and [CUSTOM_MODULE].install in it.
• A folder [CUSTOM_MODULE] in the module directory with the files [CUSTOM_MODULE].info and [CUSTOM_MODULE].module in it.
• A folder [CUSTOM_MODULE] in the module directory with the files [CUSTOM_MODULE].module and [CUSTOM_MODULE].install

91. Which of the following is a correct way to print a variable in Twig

Answers:

• {{ name_of_variable }}
• { name_of_variable }
• {% name_of_vairable %}
• {%% name_of_variable %%}

92. Which of the following can be used to inspect variables in twig?
Note: There may be more than one right answer.

Answers:

• {{ dump() }}
• {{ kint() }}
• {{ dpm() }}
• {{ dsm() }}

93. Which of the following is correct way to remove whitespace between HTML tags in Twig template?

Answers:

• {% removespace %}
<div class=»code»>
<strong>foo</strong>
</div>
{% endremovespace %}

• {%- removeblanks -%}
<div class=»code»>
<strong>foo</strong>
</div>
{%- endremoveblanks -%}

• {%- removespace -%}
<div class=»code»>
<strong>foo</strong>
</div>
{%- endremovespace -%}

• {% spaceless %}
<div class=»code»>
<strong>foo</strong>
</div>
{% endspaceless %}

94. Which of the following can be used to fetch values sent programmatically to the view?

Answers:

• Filter Criteria
• Contextual Filter
• Exposed Form
• None of the above

95. Which of the following is correct to output configuration items that are different in active configuration compared with a directory?

Answers:

• drupal setting:compare
• drupal setting:diff
• drupal config:diff [arguments] [options]
• drupal config:compare

96. In Drupal, how to slide content title?

Answers:

• Using Module and Slick_views controller
• Using Slick and Slick_views Views
• Using Slick and Slick_views module
• None of the above

97. Which of the following is a blog for every user?

Answers:

• Blog
• Page
• Post
• Modular

98. Which of the following options are provided by Views Debugging settings?

Answers:

• Add Views signature to all SQL queries
• Show SQL in preview
• Disable views data caching
• All of the above

99. Which of the following codes can be used to set the regions in a Drupal theme?

Answers:

• regions[header] = Header
regions[content_header] = Content Header
regions[content] = Content
regions[sidebar_second] = Content sidebar

• regions[header] = Header
regions[content_header] = Content Header
regions[content] = Content
regions[sidebar_second] = Right sidebar

• regions[header] = Header
regions[content_header] = Content Header
regions[content] = Content
regions[sidebar_second] = sidebar

100. In Drupal, __ arrays provide you a structured way to __ change the content __ it is displayed.

Answers:

• Render, Programmatically, before
• 2D, Programmatically, after
• 2D, Programmatically, before
• Render, manually, before

101. You want to add a custom JavaScript file to be loaded on every page of your website. Where would be the best place to add this file if you had to choose between the next options?

Answers:

• Custom theme: page.tpl (<script></script>)
• Custom module: module file > hook_preprocess_theme (drupal_add_js)
• Custom theme: template.php > hook_preprocess_page (drupal_add_js)
• Custom theme: info file (scripts[])

102. In Drupal 8, what is the PHP function to check if a block region has blocks?

Answers:

• Render
• Drupal_render
• Drupal_check
• None of the above

103. Which of the following are render array properties?
Note: There may be more than one right answer.

Answers:

• #type
• #cache
• #markup
• #plain_text

104. Which one of the following is a correct way to use Render API to output a link?

Answers:

• $output = array(
‘#theme’ => ‘link’,
‘#title’ => ‘About’,
‘#url’ = > ‘about’,
);

• $output = array(
‘#type’ => ‘url’,
‘#title’ => ‘About’,
‘#url’ = > ‘about’,
);

• $output = array(
‘type’ => ‘link’,
‘title’ => ‘About’,
‘url’ = > ‘about’,
);

• $output = array(
‘#type’ => ‘link’,
‘#title’ => ‘About’,
‘#url’ = > ‘about’,
);

105. What from listed below controls content in sidebars?

Answers:

• Blog
• Book
• Dblog
• Block

106. Which of the following is correct to remove events from DBLog table?

Answers:

• drupal log:clear
• drupal database:log:clear
• drupal database:log:drop
• drupal db:log:delete

107. Which of the following pager settings are provided by views?
Note: There may be more than one right answer.

Answers:

• Display a specified number of items
• Display all items
• Paged output, styled pager
• Paged output, mini pager

108. Which of the following Live Preview Settings are available for views?
Note: There may be more than one right answer.

Answers:

• Automatically update preview on changes
• Show information and statistics about the view during live preview
• Show performance statistics
• Show other queries run during render during live preview

109. Which of the following role automatically receives all permissions when a new module is enabled?

Answers:

• Administrator
• Authenticated
• Anonymous
• Registered

110. In Drupal, Core modules also includes a hierarchicel taxanomy system, which allows content to be categorized?

Answers:

• True
• False

111. True or False:-
«Dblog module logs and records system events to the database.»

Answers:

• True
• False

112. Which of the following is correct to displays current key:value on settings file?

Answers:

• View Drupal Status Report
• drupal config:settings:debug
• drush config:settings:debug
• drupal config:settings