Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Dreamweaver

Inserting a Drag and Drop Interaction

Many learners find Drag and Drop interactions fun. Because these interactions engage learners by allowing them to manipulate objects onscreen, they also can be educational. The Drag and Drop CourseBuilder interaction can judge pairings of objects as correct or incorrect and make objects snap back to their original positions if they are incorrect.

In this section, you'll add a Drag and Drop interaction to a page, setting up the relationships between the pairs of drag objects and target objects. In Chapter 11, you'll add advanced functionality, including feedback particular to individual drag/target pairings. There are seven different Drag and Drop interactions, listed in Table 10.3.

Table 10.3 Drag and Drop Category Interactions

Icon

Interaction Name

Description

One-way many-to-many

A multiple drag and multiple target interaction, enabling the learner to drag the drag elements to the target elements.

Two-way many-to-many

A multiple drag and multiple target interaction, enabling the learner to drag the drag elements to the target elements or drag the target elements to the drag elements.

One-way one-to-many

A single drag and multiple target interaction, enabling the learner to drag the drag element to the target elements.

Two-way one-to-many

A single drag and multiple target interaction, enabling the learner to drag the drag element to the target elements or drag the target elements to the drag element.

Two-way one-to-one

A single drag and single target interaction, meant as a starting point for creating a custom Drag and Drop interaction.

Two steps in order

A single drag and multiple target interaction, requiring the learner to drag the drag element to the target elements in a certain order.

Two steps in order with distractor

A single drag and multiple target interaction, requiring the learner to drag the drag element to the target elements in the proper order when a distractor is present.


The Drag and Drop interactions can be sorted into three groups: the one-direction interactions, the two-direction interactions, and the ordered interactions. You select the interaction type according to the functionality specified in the storyboard.

Using the General Tab

Insert a CourseBuilder Interaction (Insert, CourseBuilder Interaction) into a Web page. Select the one-way many-to-many Drag and Drop interaction. The Drag and Drop interactions have General and Action Manager tabs, like the Multiple Choice interactions, but they also have an Elements tab, where you set up the drag and target elements, and the Pairs tab, where you set up the relationships between the drag and target elements.

Set up the General tab as shown in Figure 10.14. Leave the default name and judge the interaction when the user clicks the Check Answer button. Leave the Tries and Time limits as Unlimited. Be sure the Reset check box and the Snap Back If Not Dropped on Target check boxes are selected. Leave the Snap Back If Incorrect check box deselected because this interaction enables the learner to make incorrect pairings that are judged when the Check Answer button is clicked.

Figure 10.14 The General tab in a Drag and Drop interaction enables you to configure the basic settings.

Using the Elements Tab

The Elements tab, shown in Figure 10.15, presents a list of elements at the top of the CourseBuilder Interaction dialog box and the individual element options at the bottom. Elements can be defined as drag or target elements. The interaction comes with a default number of three drag elements and three target elements. You can add as many elements as you need for your interaction.

Figure 10.15 The Elements tab enables you to set up each drag and target element, loading images and naming the elements.

To configure the Elements tab for a Drag and Drop interaction, follow these steps:

  1. Add an additional drag element by first selecting the element named Drag3. You'll add the new drag element under Drag3. Click the Add button to add it to the list. Because elements are added directly below the selected element, you select Drag3 first so that the drag elements stay in order.

  2. Set up the new element's options in the lower half of the dialog box, and enter Drag4 in the Name text box. Ignore the Image File text field for now. Be sure that Drag Element is selected in the Element Is drop-down list.

  3. Add a target element by first selecting the element named Target3. Click the Add button to add it to the list.

  4. Set up the new element's options in the lower half of the dialog box. Enter Target4 in the Name text box. Again, ignore the Image File text field. Make sure that Target Element is selected in the Element Is drop-down list.

  5. Load the drag and target images for each element. Select Drag1, click the Browse button, and select an image. Repeat this step for each element, loading all the images.

Using the Pairs Tab

The Pairs tab, shown in Figure 10.16, enables you to set up all the possible pairs of drag and target elements as either correct or incorrect. CourseBuilder automatically added the nine possible pairs for the three default drag elements and the three default target elements, so you'll need to add the seven additional pairings. You must define all possible pairs as either correct or incorrect pairings.

Figure 10.16 Configure the pairings in this Drag and Drop interaction in the Pairs tab.

The drop-down list at the top of the dialog box lists pairings that aren't yet added to the Pairs list. If you hadn't added additional drag and target elements, this box would say all pairs are created. All nine pairings for the original three drag elements and the original three target elements have already been added to the Pairs list, so you need to add the pairs created by the additional drag and target elements (Drag4 and Target4). To define the additional pairs:

  1. It's easier to understand the pairs if you keep them in a logical order. So, add the pairs in the most logical location by selecting the line above where you want the pair located, and then clicking the Add button. For the first pair in the drop-down list, Drag1:Target4, select Drag1:Target3, and then click the Add button. The pair Drag1:Target4 is added under Drag1:Target3.

  2. Repeat this procedure for Drag2:Target4 and Drag3:Target4. Select the last line in the Pairs list and add the new Drag4 pairs at the end of the list.

  3. For this drag-and-drop question, here are the correct answers: Drag1:Target1, Drag2:Target2, Drag3:Target3, Drag4:Target4. Select each pairing in the Pairs list and set whether they are correct or incorrect in the Choice Is drop-down list.

  4. In the Score text box, give each correct pairing a score of 5.

  5. Each pairing also has a Snap If Within and a Snap To setting. Leave the default 75 pixels as the Snap If Within setting and leave the Snap To setting as Center. You can edit these settings and fine-tune them later if you need to.

Using the Action Manager Tab

You can leave the default settings in the Action Manager tab. Right now, the code in the Action Manager judges the correctness of all the Drag and Drop pairings, but you'll edit that setting in Chapter 11. Click the OK button to save your settings for the CourseBuilder interaction.

In the Document window, you arrange the drag and target elements, mixing them up so that they aren't immediately obvious to the learner. You can delete the directions that the interactions placed on the Web page, leaving the Check Answer and Reset button in a form. Click on one of the buttons, and then select the <form> tag in the Tag Selector. Cut and paste the form and buttons into the Content layer. Resize the layer and move it to the bottom of the Document window. The finished Drag and Drop interaction should look something like Figure 10.17. Preview the Web page in a browser and check the interaction's functionality.

Figure 10.17 The drag and target elements must be arranged onscreen.

Inserting an Explore Interaction

Explore interactions usually are not used for quiz questions, but they enable the learner to explore information by clicking onscreen elements. An interaction where the learner clicks on the various objects on the page and gets information on them is a perfect example of an Explore interaction. You'll create an Explore interaction with CourseBuilder and see how quickly an Explore interaction can be created. There are three different types of Explore interactions, listed in Table 10.4.

Table 10.4 Explore Category Interactions

Icon

Interaction Name

Description

Explore with transparent hotspots

The hotspots that the learner clicks on are transparent GIFs in layers set over areas of the background image.

Explore with images as hotspots

The hotspots contain the individual images that the learner clicks.

Explore in order

The hotspots contain individual images that must be clicked in a certain order.


The Explore interactions differ depending on whether the hotspots hold the actual images that learners click on to trigger the feedback. If you have a single image over which you need to create hotspots, similar to an image map, you use the first Explore interaction with the transparent hotspots. CourseBuilder places layers containing a transparent GIF; these layers act as hotspots when placed over a region of the background graphic. You must resize the transparent GIF in the Property inspector, as shown in Figure 10.18. Although Internet Explorer captures the onClick event on a layer (<div> tag), Netscape cannot. Therefore, CourseBuilder places the transparent GIF within the layer because both browsers can capture the onClick event on an image.

Figure 10.18 When you select the Explore interaction using transparent hotspots, you need to resize the transparent GIFs that CourseBuilder inserts into the layer hotspots.

Open a new Web page, save the page, and name it. Add a CourseBuilder interaction to the Web page (Insert, CourseBuilder Interaction), and select the Explore category. Select the interaction called Explore_Transparent.

Using the General Tab

The Explore interactions have the standard General and Action Manager tabs plus a Hot Areas tab, where you set up the content of the hotspots. Set up the General tab as shown in Figure 10.19. Leave the Judge Interaction setting when the user clicks a hot area. Leave the Correct When setting alone; this interaction will not be judged. Set the Tries Are text box to 2. Leave all the other settings at the default value, but either change the Backdrop Image or remove the URL; interactions do not have to have a backdrop image.

Figure 10.19 The General tab of the Explore interaction contains the basic interaction settings.

Using the Hot Areas Tab

Select the Hot Areas tab to set up the individual hotspots. By default, CourseBuilder creates five hotspots. If that's not how many you need for the interaction, click the Add or Delete buttons. You can accept the default hotspot names in the Name text box and leave the Text text boxes empty. Each hotspot contains a transparent GIF image.

Using the Action Manager Tab

Select the Action Manager tab to investigate the code behind this interaction. Because you are not using the Check Time segment, you can delete it by selecting the segment and clicking the Cut button. That leaves seven segments: one segment for each hotspot, a segment judging correctness, and a segment checking the tries.

Each of the remaining hotspot segments establishes whether the learner clicks on one of the hotspots and then opens a pop-up message specific to that hotspot. You can edit the pop-up message by selecting it in the Action Manager, clicking the Edit button, and modifying the text in the Message text box. In Chapter 11, you'll modify this interaction to set the text of a layer.

Click the OK button to save the CourseBuilder interaction settings. Arrange the layers and stretch the transparent GIFs by selecting them and dragging the drag handles to cover the hotspot area. Remember, you need to capture a click on the image and not the layer, to be cross-browser compatible. Preview the Web page in a browser and check the interaction's functionality.

Inserting a Text Entry Interaction

Now you'll insert another quiz question by using the Text Entry CourseBuilder interaction. Text Entry interactions are best for single-word answers. CourseBuilder enables you to look for certain words as answers, either correct or incorrect, and even gives you control over judging capitalization. Table 10.5 lists the two types of Text Entry interactions.

Table 10.5 Text Entry Category Interactions

Icon

Interaction Name

Description

Single-line text entry

Learner enters answer text into a single-line text area.

Multiple-line text entry

Learner enters answer text into a multiline text area.


The two Text Entry interactions differ simply in the size of the text area available for the learner to enter the answer.

Using the General Tab

Create a new Web page, save the page, and name it. Place the cursor in the Content layer and insert a CourseBuilder interaction (Insert, CourseBuilder Interaction). Select the Text Entry category and click on the single-line Text Entry interaction, the one on the left.

When you insert the Text Entry CourseBuilder interaction, it places the question stem text on the Web page. You don't set up the question stem within the CourseBuilder Interaction dialog box. After you set up this interaction, you'll save your changes and then add the question text.

Set up the General tab as shown in Figure 10.20. You can use the default interaction name. The text you enter in the Initial Text text box appears in the text area where learners answer the question and requires that they select and delete the text before entering their answers; for now, leave this text box blank. Judge the interaction when the learner clicks the Check Answer button. Leave the Correct When drop-down list as Any Correct and None Incorrect. Leave the Time and Tries limit as Unlimited. The Reset check box should be selected, and the Layer check box should be selected.

Figure 10.20 The General tab of the Text Entry interaction contains the basic interaction settings.

Using the Responses Tab

The Responses tab enables you to specify the correct and incorrect responses. All other responses are considered unknown by CourseBuilder and trigger the Unknown Response code in Action Manager. The Responses tab has three sections. The top section is a list of possible responses, both correct and incorrect. The middle section enables you to set up the possible responses. The lower section is where you specify what to do with any other responses to the question.

To create one correct response and one incorrect response, follow these steps:

  1. Select the third response in the Possible Responses list and click the Delete button.

  2. Select Response1 at the top of the dialog box. Leave the default name in the Name text box.

  3. In the Must Contain text box, enter the text of the correct answer.

  4. Leave the Case Sensitive check box deselected because you won't need specific capitalization for this answer.

  5. Leave the Exact Match Required check box deselected so that the learner can enter answers such as "arabica beans" or "coffea arabica," the botanical term for coffee, and still be correct when the correct answer is set as "arabica."

  6. The Match Is drop-down list should be set to Correct. The Score setting should be 20.

  7. The Any Other Response Is drop-down list should be set to Incorrect, as shown in Figure 10.21.

Figure 10.21 The Responses tab enables you to set up the correct and incorrect responses to a Text Entry question. Any other responses are unknown.

  1. Select Response2 at the top of the dialog box. Leave the default name in the Name text box.

  2. In the Must Contain text box, enter the text of an anticipated incorrect answer.

  3. Leave the Case Sensitive and Exact Match Required check boxes deselected.

  4. The Match Is drop-down list should be set to Incorrect with a score of 0.

Using the Action Manager Tab

The Action Manager, by default, contains the Check Time, Check Tries, and Correctness segments. Because you have only a single correct and a single incorrect answer, you essentially have specific feedback for both answers as well as a generic feedback message, contained in the else if Unknown Response statement. You can delete the Check Time and Check Tries segments and edit the pop-up messages.

Click the OK button to save your CourseBuilder interaction settings. Preview the Web page in a browser to test the functionality. Try entering the correct answer, and then try entering phrases, including the correct answer. Are these answers judged as correct? Try entering the incorrect answer. Also, try entering other answers to get the unknown response feedback.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020