Allow re-ordering of files for File(s) to Download block

Bug #732462 reported by Kristina Hoeppner
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Wishlist
Unassigned

Bug Description

Files can be selected in the order in which they should appear in the File(s) to Download block. However, when additional files are added, the order can't be changed to drop them in further up the list. Re-order buttons are needed. The block would basically stay the same but have ordering buttons like on the Manage Collections screen so that you can move files up and down.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :
Changed in mahara:
status: New → Triaged
tags: added: filedownload
Revision history for this message
Don Presant (don-learningagents) wrote :

It would be preferable to have re-ordering by dragging, if possible. The ordering buttons in Manage Collections are tedious and slightly confusing, especially with longer lists. Is there an OS JS tool for this?

Revision history for this message
Aaron Wells (u-aaronw) wrote :

There's several JS drag-and-drop ordering libaries mentioned here: http://stackoverflow.com/questions/10361779/drag-and-drop-to-reorder-html-lists

Searching for "javascript order by dragging jquery" turns up some additional hits. (It'd be preferable to use something based on jQuery, because that's already in wide use in Mahara.)

tags: added: js
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Come to think of it, Mahara already has a drag-and-drop reordering framework. This is essentially what the placement system for blocks on Pages is. :)

I believe we're using MochiKit for this functionality.

Revision history for this message
Jono M (jonom) wrote :

We now package jQuery UI (used in the drag-and-drop page editor) which includes a 'Sortable' module. This isn't at all accessible though so some workaround would have to be found for keyboard accessibility ... perhaps something like the solution here http://stackoverflow.com/questions/16844616/jqueryui-sortable-with-keyboard

Revision history for this message
Aaron Wells (u-aaronw) wrote :

See also https://bugs.launchpad.net/mahara/+bug/732462 , about re-ordering the artefacts in the resume block.

Maybe what we need to do is make the artefact chooser re-order-able?

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Isn't the artefact chooser different to re-ordering items with a block when selecting them?

While it might be nice to re-order items in the artefact chooser according to what a site admin things the most important items are and placing them higher up, I think it is quite different to being able to re-order individual artefacts within a block when choosing them. I find that more important than the re-ordering of block types in the artefact chooser. Can't we do that (the re-ordering of block types) now / soon with the patch that you proposed, Aaron, but just in the code?

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Kristina,

I think we are on the same page, but using different terminology.

The "artefact chooser" I'm referring to, is a Pieforms element that lets you choose one (or more) of your artefacts. We use it on the config page of several blocks, including Resume, and Profile Information. If we implemented drag-and-drop ordering in this "artefact chooser", then it would let users rearrange the order that the selected artefacts show up, within many different kinds of block instances. Although on further reflection, I think the blocks that use files are using a different Pieform element, the "filepicker", so we'd need to implement that separately.

It sounds like what you thought I was describing was what I usually call the "block palette", or "block picker". That's the bar down the left-hand side of the screen when you're editing a Page's contents, that lets you drag block instances onto a Page. And I agree, we don't need a UI for re-ordering those at the moment. With the recent API changes, admins can re-order those via direct database updates.

Cheers,
Aaron

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Thanks for clearing up the terminology that you were using. I use "Content chooser" (and often still "Artefact chooser") for selecting the blocktypes on the "Edit page" screen in the user manual. I don't call it block picker to emphasize that you are choosing content / artefacts and not blocks.

tags: added: block
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7143

Changed in mahara:
status: Triaged → In Progress
milestone: none → 17.04.0
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
status: In Progress → Confirmed
assignee: Cecilia Vela Gurovic (ceciliavg) → nobody
milestone: 17.04.0 → none
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7143
Committed: https://git.mahara.org/mahara/mahara/commit/8662adc94c42403738d09bd4bafd8036dd7dc9cc
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 8662adc94c42403738d09bd4bafd8036dd7dc9cc
Author: Cecilia Vela Gurovic <email address hidden>
Date: Tue Oct 18 15:13:03 2016 +1300

Bug 1181696: Reorder images in gallery when renaming files

Check the filename when displaying an image gallery
and show images in alphabetical order.
The same ordering function is used as the Content/files
view when displaying the files.
This can be easily undone when bug 732462 is fixed.

behatnotneeded

Change-Id: I795e4f606e570f0088a21a4404fbf8a4c5249998

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.