Loading ...
Sorry, an error occurred while loading the content.

Missing Words Drag and Drop

Expand Messages
  • hg.davies
    Hi I m making my first YUI application - an activity where the user drags words into spaces in a body of text. This is to become a Moodle question type. So
    Message 1 of 3 , Jan 25, 2008
    • 0 Attachment
      Hi

      I'm making my first YUI application - an activity where the user drags
      words into spaces in a body of text. This is to become a Moodle
      question type.

      So that I can assess how well the user has done, (and pass that
      information to Moodle) when they click Submit, I need to work out which
      words are in which spaces. I'm currently doing this by maintaining
      a "Drop Record", but this is quite tedious. For example, if the user
      drags a word off its target and drops it back in the "pool" of words I
      have to update my drop record in the OnInvalidDrop method. I can't help
      thinking I must be missing something.

      Is there a simple way of asking a target what draggable items it has on
      top of it? Or should I persevere with my drop record?
    • dav.glass@yahoo.com
      hg.davies -- In the current release of DragDrop, there is no built-in way to do what you are asking. However, this example does basically what you are wanting:
      Message 2 of 3 , Jan 28, 2008
      • 0 Attachment
        hg.davies --

        In the current release of DragDrop, there is no built-in way to do what you are asking.

        However, this example does basically what you are wanting:
        http://developer.yahoo.com/yui/examples/dragdrop/dd-groups.html

        Dav


        Dav Glass
        dav.glass@...
        blog.davglass.com

        + Windows: n. - The most successful computer virus, ever. +
        + A computer without a Microsoft operating system is like a dog
        without bricks tied to its head +
        + A Microsoft Certified Systems Engineer is to computing what a
        McDonalds Certified Food Specialist is to fine cuisine +

        ----- Original Message ----
        From: hg.davies <hg.davies@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Friday, January 25, 2008 1:47:37 AM
        Subject: [ydn-javascript] Missing Words Drag and Drop


        Hi

        I'm
        making
        my
        first
        YUI
        application
        -
        an
        activity
        where
        the
        user
        drags
        words
        into
        spaces
        in
        a
        body
        of
        text.
        This
        is
        to
        become
        a
        Moodle
        question
        type.

        So
        that
        I
        can
        assess
        how
        well
        the
        user
        has
        done,
        (and
        pass
        that
        information
        to
        Moodle)
        when
        they
        click
        Submit,
        I
        need
        to
        work
        out
        which
        words
        are
        in
        which
        spaces.
        I'm
        currently
        doing
        this
        by
        maintaining
        a
        "Drop
        Record",
        but
        this
        is
        quite
        tedious.
        For
        example,
        if
        the
        user
        drags
        a
        word
        off
        its
        target
        and
        drops
        it
        back
        in
        the
        "pool"
        of
        words
        I
        have
        to
        update
        my
        drop
        record
        in
        the
        OnInvalidDrop
        method.
        I
        can't
        help
        thinking
        I
        must
        be
        missing
        something.

        Is
        there
        a
        simple
        way
        of
        asking
        a
        target
        what
        draggable
        items
        it
        has
        on
        top
        of
        it?
        Or
        should
        I
        persevere
        with
        my
        drop
        record?




        Yahoo!
        Groups
        Links

        your
        group
        on
        the
        web,
        go
        to:


        http://groups.yahoo.com/group/ydn-javascript/

        settings:


        Individual
        Email
        |
        Traditional

        settings
        online
        go
        to:


        http://groups.yahoo.com/group/ydn-javascript/join


        (Yahoo!
        ID
        required)

        settings
        via
        email:


        mailto:ydn-javascript-digest@yahoogroups.com


        mailto:ydn-javascript-fullfeatured@yahoogroups.com

        from
        this
        group,
        send
        an
        email
        to:


        ydn-javascript-unsubscribe@yahoogroups.com

        of
        Yahoo!
        Groups
        is
        subject
        to:


        http://docs.yahoo.com/info/terms/
      • hg.davies
        I didn t understand the code in that example very well, but your message prompted me to look again and I can see now that, if I use a similar approach, at the
        Message 3 of 3 , Feb 1 8:09 AM
        • 0 Attachment
          I didn't understand the code in that example very well, but your
          message prompted me to look again and I can see now that, if I use a
          similar approach, at the end of the user's interaction I can cycle
          through the targets and, for those which have a "player" property, it
          will point to the item on top of the target.

          Thanks very much!
        Your message has been successfully submitted and would be delivered to recipients shortly.