Skip to content

Commit

Permalink
SAK-50989 Gradebook if there are no students in the course, there is …
Browse files Browse the repository at this point in the history
…a console error (#13304)

Co-authored-by: Adrian Fish <[email protected]>
  • Loading branch information
kunaljaykam and adrianfish authored Feb 17, 2025
1 parent a05fd48 commit 2592eb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ public void renderHead(final IHeaderResponse response) {

final StringValue focusAssignmentId = getPageParameters().get(FOCUS_ASSIGNMENT_ID_PARAM);
final StringValue showPopupForNewItem = getPageParameters().get(NEW_GBITEM_POPOVER_PARAM);
if(!showPopupForNewItem.isNull() && !focusAssignmentId.isNull()){
if(!showPopupForNewItem.isNull() && !focusAssignmentId.isNull() && this.hasStudents){
getPageParameters().remove(FOCUS_ASSIGNMENT_ID_PARAM);
getPageParameters().remove(NEW_GBITEM_POPOVER_PARAM);
response.render(JavaScriptHeaderItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,10 @@ GbGradeTable.renderTable = function (elementId, tableData) {
const rowIndex = range._range?.end?.row;

const table = GbGradeTable.instance;

const cellRect = table.getRows()[rowIndex].getCells()[colIndex].getElement().getBoundingClientRect();

const cell = table.getRows()[rowIndex]?.getCells()[colIndex];
if (!cell) return;
const cellRect = cell.getElement().getBoundingClientRect();

const frozenColumns = table
.getColumns()
Expand Down

0 comments on commit 2592eb0

Please sign in to comment.