/* * Get all the grade items */ public ArrayList<? extends Item> getGradeItems(Item gradebookItemModel) { ArrayList<Item> items = new ArrayList<Item>(); CategoryType categoryType = gradebookItemModel.getCategoryType(); if (CategoryType.NO_CATEGORIES == categoryType) { items.addAll(gradebookItemModel.getSubItems()); } else { List<Item> categories = gradebookItemModel.getSubItems(); for (Item category : categories) { items.addAll(category.getSubItems()); } } return items; }
public void onRender(Item gradebookItemModel) { refreshCategoryPickerStore(gradebookItemModel); List<ItemModel> gradeItems = (List<ItemModel>) getGradeItems(gradebookItemModel); itemStore.add(gradeItems); // GRBK-643 // If we have an import file/GB that doesn't have categories, we hide the columns in the setup // grid CategoryType cateogryType = gradebookItemModel.getCategoryType(); if (CategoryType.NO_CATEGORIES == cateogryType) { // Hide category related columns columnConfigCategory.setHidden(true); columnConfigPercentCategory.setHidden(true); } }