Moodle
  1. Moodle
  2. MDL-36915

A database of no items seems to offer ability to save to portfolio

    Details

    • Testing Instructions:
      Hide

      Test steps

      1. Enable portfolios. [Settings ► Site administration ► Advanced features].
      2. Next enable a portfolio plugin [Settings ► Site administration ► Plugins ► Portfolios ► Manage portfolios] I found that Box.net didn't require much work. We're not going to be exporting, so just get it enabled any way that you can.
      3. Create a database activity.
      4. Add a field.
      5. Save the templates.
      6. Go to the "View list" tab.
        • Check that there is no button to export entries to a portfolio.
      7. Add an entry.
      8. Go back to the list view.
        • Observe that the "Export to portfolio" button is now present.
      Show
      Test steps Enable portfolios. [Settings ► Site administration ► Advanced features] . Next enable a portfolio plugin [Settings ► Site administration ► Plugins ► Portfolios ► Manage portfolios] I found that Box.net didn't require much work. We're not going to be exporting, so just get it enabled any way that you can. Create a database activity. Add a field. Save the templates. Go to the "View list" tab. Check that there is no button to export entries to a portfolio. Add an entry. Go back to the list view. Observe that the "Export to portfolio" button is now present.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-36915-master
    • Rank:
      46452

      Description

      1. Turn on portfolios, enable file download plugin
      2. Restore Moodle course features demo course with the url 'database of web links' (thats how I got this to happen anyway)
      3. Don't add any entries to the db
      4. The 'export to portfolio' button seems to appear even though there is no content

        Activity

        Hide
        Dan Poltawski added a comment -

        Screenshot showing this

        Show
        Dan Poltawski added a comment - Screenshot showing this
        Hide
        Mark Nelson added a comment -

        Hi Adrian, the logic is sound. I personally like to have each conditional check that uses an operator (!=, ==, > etc) in the if statement to have it's own brackets but that is preference. Feel free to submit to integration.

        Show
        Mark Nelson added a comment - Hi Adrian, the logic is sound. I personally like to have each conditional check that uses an operator (!=, ==, > etc) in the if statement to have it's own brackets but that is preference. Feel free to submit to integration.
        Hide
        Adrian Greeve added a comment -

        Thanks for the peer review Mark.

        I personally also like adding brackets in these sort of situations, but I remember some time in the past someone telling me not to do it. I've had a look at the coding style page and I don't see anything about it there.

        Anyway, sending to integration.

        Show
        Adrian Greeve added a comment - Thanks for the peer review Mark. I personally also like adding brackets in these sort of situations, but I remember some time in the past someone telling me not to do it. I've had a look at the coding style page and I don't see anything about it there. Anyway, sending to integration.
        Hide
        Sam Hemelryk added a comment -

        Thanks Adrian, this has been integrated now.

        Show
        Sam Hemelryk added a comment - Thanks Adrian, this has been integrated now.
        Hide
        Andrew Davis added a comment -

        Works as described. Passing.

        Show
        Andrew Davis added a comment - Works as described. Passing.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

        Closing, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: