@@ -279,6 +279,18 @@ export default class Parsons extends RunestoneBase {
279279 // Remove the options from the code
280280 // only options are #paired or #distractor
281281 var options = { } ;
282+ var distractIndex ;
283+ var distractHelptext = "" ;
284+ if ( textBlock . includes ( "#paired:" ) ) {
285+ distractIndex = textBlock . indexOf ( "#paired:" ) ;
286+ distractHelptext = textBlock . substring ( distractIndex + 8 , textBlock . length ) . trim ( ) ;
287+ textBlock = textBlock . substring ( 0 , distractIndex + 7 ) ;
288+ }
289+ else if ( textBlock . includes ( "#distractor:" ) ) {
290+ distractIndex = textBlock . indexOf ( "#distractor:" ) ;
291+ distractHelptext = textBlock . substring ( distractIndex + 12 , textBlock . length ) . trim ( ) ;
292+ textBlock = textBlock . substring ( 0 , distractIndex + 11 ) ;
293+ }
282294 textBlock = textBlock . replace (
283295 / # ( p a i r e d | d i s t r a c t o r ) / ,
284296 function ( mystring , arg1 ) {
@@ -298,9 +310,11 @@ export default class Parsons extends RunestoneBase {
298310 if ( options [ "paired" ] ) {
299311 line . distractor = true ;
300312 line . paired = true ;
313+ line . distractHelptext = distractHelptext ;
301314 } else if ( options [ "distractor" ] ) {
302315 line . distractor = true ;
303316 line . paired = false ;
317+ line . distractHelptext = distractHelptext ;
304318 } else {
305319 line . distractor = false ;
306320 line . paired = false ;
@@ -1491,6 +1505,10 @@ export default class Parsons extends RunestoneBase {
14911505 feedbackArea . attr ( "class" , "alert alert-info" ) ;
14921506 feedbackArea . html ( $ . i18n ( "msg_parson_not_solution" ) ) ;
14931507 // Stop ability to select
1508+ if ( block . lines [ 0 ] . distractHelptext ) {
1509+ block . view . setAttribute ( "data-toggle" , "tooltip" ) ;
1510+ block . view . setAttribute ( "title" , block . lines [ 0 ] . distractHelptext ) ;
1511+ }
14941512 block . disable ( ) ;
14951513 // If in answer area, move to source area
14961514 if ( ! block . inSourceArea ( ) ) {
0 commit comments