Item blocks
Information
This page details the design for item blocks. This is basically a group of items which are rendered together to the user with a shared scale. There is not a special type of entity in the database for the block.
Basics
- Items can be placed into a block which presents a group of scaled items in a compact display format where they all share the same scale labels
- Blocks are stored by assigning all child items in the block to the same block Id
- Block Id should unique within the TemplateItems and must be unique in the template
- One item in the block should be marked as the block parent, this item is used to store information about the block and is not counted as an item (like header items) when counting number of items in the template
- Note: block parents and text headers are not numbered or counted in the total count of items in a template
- Each item in the block does count as a separate item and should be ordered and numbered on the take evaluation page separately
- Example: (itemIds 6-9 are part of a block)
Item ID
TemplateItem ID
Item Classification
Block_ID
Block_Parent
Display_Order
Item display number
3
20
scaled
null
null
1
1
4
21
header
null
null
2
Â
5
22
text
null
null
3
2
6
23
block parent
null
TRUE
4
Â
7
24
scaled
23
FALSE
1
3
8
25
scaled
23
FALSE
2
4
9
26
scaled
23
FALSE
3
5
10
27
scaled
null
null
5
6
11
28
text
null
null
6
7
Changes to modifyTemplate
- The way blocks are created and removed has been changed from the wirefame and requires 3 new interface elements on the modifyTemplate page
- Block creation checkboxes
- There will be checkboxes next to each item on the modify template page which is a scaled item or a block
- No checkboxes should appear for header items or text items
- The checkbox should appear on the left side and right below the pulldown for reordering
- There will be checkboxes next to each item on the modify template page which is a scaled item or a block
- Create Block button
- This button starts out disabled and can only be enabled by checking at least 2 of the Block creation checkboxes
- Clicking the button should send the user to the modifyBlock page
- The button should appear in the lower right of the page with text nearby that describes how it works
- Text: Check 2 or more scaled items with the same scale and click this button to create a block
- Split Block link
- The split block link appears where the Remove link normally appears for an item
- Block creation checkboxes
New Block creation
- The way blocks are created has been changed from the wirefame and this explains the correct way to create a block
- The user will check a set of boxes in order to create a block
- Once the first box is checked, javascript will disable all boxes which are associated with scaled items and blocks that do not have the same scale as the first box
- Allowing checkboxes on blocks allows multiple blocks to be combined to form a larger block OR items to be added to an existing block
- Checking a block and item(s) allows the user to add item(s) to the existing block (the settings from the existing block should be taken and shown on the modifyBlock page), this should not create a new block but should simply edit the existing one and add in the additional child items when the user saves
- Checking multiple blocks should cause the first block to continue to exist (as in the case with a block an items) and should delete the remaining blocks when the user saves
- The Create Block button starts out disabled and can only be enabled by checking at least 2 of the Block creation checkboxes
- unchecking boxes to less than 2 should disable the button again
- Clicking the button should send the user to the modifyBlock page
- The newly created block should be placed at the location of the first templateItem in the block (in display_order) and the remaining templateItems will need to be reordered
- Here are some example steps a user would take to create a new block
- Check 3 scaled items with the same scale listed on the modifyTemplate page
- Click on the "Create Block" button (see notes below for the fields which will appear in modifyBlock page)
- Enter the block header text
- Check Add N/A
- Uncheck Use Ideal Coloring
- Select an Item category (course)
- Click the Preview button to preview the block, close the preview window
- Reorder the child items in the block (probably using AJAX)
- Click the Save Block button to save the new block and return to the modifyTemplate page
Modifying existing blocks
- Modifying a block simply allows the user to change 2 things
- the 4 things associated with the block itself
- The block header text
- the Add N/A option
- the Use Ideal Coloring option
- the Item Category for this block
- the ordering of the child items within the block
- This should probably be done using AJAX eventually but to start out we will not support reordering within the block
- the 4 things associated with the block itself
- Here are some example steps a user would take to modify an existing block
- Click on the "modify" link next to a block
- Adjust the header text
- Change the ordering of the child items
- Click the Preview button to preview the block, close the preview window
- Click the Save Block button to save the existing block and return to the modifyTemplate page
Splitting/Removing existing blocks
- The split block link allows the user to "remove" a block by splitting it into individual items again
- Clicking on this will remove the parent templateItem and Item from the database and then put all the child templateItems into the overall display_order for the template where the parent item was
- any items with a display order after the block will have to be reordered
- like the normal remove behavior this should go to an intermediate screen which allows the user to confirm or cancel the removal/split of the block, it should detail what will happen to the child items in the block when the split occurs
- Text: tell the user that the split items will be placed into the template in the same place as the block and in the same order
- Clicking on this will remove the parent templateItem and Item from the database and then put all the child templateItems into the overall display_order for the template where the parent item was
- Here are some example steps a user would take to split/remove an existing block
- Click on the "split block" link next to a block to go to the Remove block confirmation page
- Click on the confirm button to confirm the splitting of the block and return to the modifyTemplate page