Skip to content

Commit

Permalink
Merge branch 'master' into SAK-50890-02
Browse files Browse the repository at this point in the history
  • Loading branch information
csev authored Jan 22, 2025
2 parents ee60d94 + 2251b74 commit d4054d3
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4362,7 +4362,6 @@ public Map<String, String> transferCopyEntities(String fromContext, String toCon
nProperties.remove(ResourceProperties.PROP_ASSIGNMENT_OPENDATE_ANNOUNCEMENT_MESSAGE_ID);

// remove the link btw assignment and calendar item. One can add the due date to calendar afterwards
nProperties.remove(ResourceProperties.NEW_ASSIGNMENT_CHECK_ADD_DUE_DATE);
nProperties.remove(AssignmentConstants.NEW_ASSIGNMENT_DUE_DATE_SCHEDULED);
nProperties.remove(ResourceProperties.PROP_ASSIGNMENT_DUEDATE_CALENDAR_EVENT_ID);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,13 @@
# FOOTER
# ########################################################################

# Links placed on the bottom nav - set the .count to the number of items, then add each item
# DEFAULTS as shown below (from component-manager/kernel.properties)
# bottomnav.count = 3
# bottomnav.1 = <a href="/portal/site/!gateway">Gateway</a>
# bottomnav.2 = <a href="/portal/help/TOCDisplay/content.hlp?docId=accessibilityinformation" target="_blank">Accessibility Information</a>
# bottomnav.3 = <a href="https://www.sakailms.org/" target="_blank">The Sakai Project</a>
# ALTERNATELY, define bottomnav as a comma separated list of values to use
# bottomnav=<a href="/portal/site/!gateway">Gateway</a>,<a href="/portal/help/TOCDisplay/content.hlp?docId=accessibilityinformation" target="_blank">Accessibility Information</a>,<a href="https://www.sakailms.org/" target="_blank">The Sakai Project</a>
# Links placed within the footer - set the .count to the number of link, then add each link
# The values of each footerlink are seperated by a semicolon, the target option is optional
# Format: Linktext;Link location(;Link target)
# footerlinks.count = 3
# footerlinks.1 = Gateway;/portal/site/!gateway
# footerlinks.2 = Accessibility Information;/portal/help/TOCDisplay/content.hlp?docId=accessibilityinformation;_blank
# footerlinks.3 = The Sakai Project;https://www.sakailms.org/;_blank

# Powered by assertions placed at the bottom of the portal.
# DEFAULTS as shown below (from component-manager/kernel.properties)
Expand Down
40 changes: 40 additions & 0 deletions gradebookng/tool/src/webapp/scripts/gradebook-gbgrade-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@ GbGradeTable.studentCellFormatter = function(cell, formatterParams, onRendered)

td.dataset.studentId = student.userId;
td.dataset.cellInitialized = cellKey;
td.dataset.rowIndex = rowIndex;
td.dataset.colIndex = colIndex;

const metadata = {
id: cellKey,
Expand Down Expand Up @@ -2364,6 +2366,12 @@ GbGradeTable.setupDragAndDrop = function () {
});
};

GbGradeTable.isBoundaryCell = function(rowIndex, colIndex) {
const totalColumns = GbGradeTable.instance.getColumns().length;

return colIndex === 0 || colIndex === totalColumns - 1;
};

GbGradeTable.setupKeyboardNavigation = function() {
// add grade table to the tab flow
$(GbGradeTable.domElement).attr("tabindex", 0);
Expand All @@ -2376,6 +2384,9 @@ GbGradeTable.setupKeyboardNavigation = function() {
}
});


let inBoundaryCell = false;

document.querySelector("#gradeTableWrapper").addEventListener("keydown", function(event) {
let handled = false;

Expand All @@ -2396,6 +2407,35 @@ GbGradeTable.setupKeyboardNavigation = function() {
return iGotThis(true);
}

const rowIndex = +current.getAttribute("data-row-index");
const colIndex = +current.getAttribute("data-col-index");
const totalColumns = GbGradeTable.instance.getColumns().length;
const totalRows = GbGradeTable.instance.getRows().length;

if (GbGradeTable.isBoundaryCell(rowIndex, colIndex)) {
if (!inBoundaryCell) {
inBoundaryCell = true;
return;
}

if ((event.key === "Tab" || event.key === "ArrowRight") && colIndex === totalColumns - 1) {
if (rowIndex < totalRows - 1) {
GbGradeTable.instance.addRange(GbGradeTable.instance.getRows()[rowIndex + 1].getCells()[0]);
event.preventDefault();
}
}

if (((event.shiftKey && event.key === "Tab") || event.key === "ArrowLeft") && colIndex === 0) {
if (rowIndex > 0) {
GbGradeTable.instance.scrollToColumn(totalColumns - 1, "end", true);
GbGradeTable.instance.addRange(GbGradeTable.instance.getRows()[rowIndex - 1].getCells()[totalColumns - 1]);
event.preventDefault();
}
}
} else {
inBoundaryCell = false;
}

const editing = !!document.querySelector("#gradeTableWrapper .tabulator-cell.tabulator-editing");

// Space - open menu
Expand Down
10 changes: 5 additions & 5 deletions kernel/api/src/main/java/org/sakaiproject/util/Web.java
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ public static String snoop(PrintWriter out, boolean html, ServletConfig config,
print(out, "Context path", contextPath);
displayStringChars(out, contextPath);
String pathInfo = req.getPathInfo();
print(out, "Path info", pathInfo);
print(out, "Path info", FormattedText.escapeHtml(pathInfo, true));
displayStringChars(out, pathInfo);
print(out, "Path translated", req.getPathTranslated());
print(out, "Path translated", FormattedText.escapeHtml(req.getPathTranslated(), true));
print(out, "Query string", req.getQueryString());
print(out, "Content length", req.getContentLength());
print(out, "Content type", req.getContentType());
Expand Down Expand Up @@ -460,7 +460,7 @@ public static String snoop(PrintWriter out, boolean html, ServletConfig config,
while (e.hasMoreElements())
{
String name = (String) e.nextElement();
out.println(" " + name + " = " + req.getParameter(name));
out.println(" " + name + " = " + FormattedText.escapeHtml(req.getParameter(name), true));
}
out.println(prex);
}
Expand All @@ -477,9 +477,9 @@ public static String snoop(PrintWriter out, boolean html, ServletConfig config,
if (vals != null)
{
out.print(b + " " + name + " = " + bx);
out.println(vals[0]);
out.println(FormattedText.escapeHtml(vals[0], true));
for (int i = 1; i < vals.length; i++)
out.println(" " + vals[i]);
out.println(" " + FormattedText.escapeHtml(vals[i], true));
}
out.println(p);
}
Expand Down
2 changes: 1 addition & 1 deletion library/src/webapp/js/portal/portal.init.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ document.addEventListener("DOMContentLoaded", () => {
b.addEventListener("click", () => portal.search.setup({}));
});

document.getElementById("sakai-account-panel").addEventListener("show.bs.offcanvas", (e) => {
document.getElementById("sakai-account-panel")?.addEventListener("show.bs.offcanvas", (e) => {

e.target.querySelector("sakai-grades")?.loadData();
e.target.querySelector("sakai-calendar")?.loadData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse res) throws Servle
add(csvDateFormat(eventLogData.getStartDate()));
add(csvDateFormat(eventLogData.getEndDate()));
add(minutes != null ? minutes.toString() : null);
add(StringUtils.trimToEmpty(eventLogData.getErrorMsg()));
add(StringUtils.trimToEmpty(RESOURCE_BUNDLE.getString(eventLogData.getErrorMsg())));
if (displayIpAddressColumn) {
add(StringUtils.trimToEmpty(eventLogData.getIpAddress()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ $Id$
<h:outputText value="#{bar.numStudentsText}" />
</span>
<div class="progress-stat">
<h:outputText value="<div class=\" progress-bar #{ bar.isCorrect ? 'bg-success' : '' }
<h:outputText value="<div class=\" progress-bar #{ bar.isCorrect ? 'bg-success' : 'bg-danger' }
test\" role=\"progressbar\" aria-valuenow=\"#{bar.columnHeight}\" aria-valuemin=\"0\"
aria-valuemax=\"100\" style=\"width: #{bar.columnHeight}%;\">"
escape="false" />
Expand Down Expand Up @@ -481,7 +481,7 @@ $Id$
<h:outputText value="#{bar.numStudentsText}" />
</span>
<div class="progress-stat">
<h:outputText value="<div class=\" progress-bar bg-success\" role=\"progressbar\"
<h:outputText value="<div class=\" progress-bar #{ bar.isCorrect ? 'bg-success' : 'bg-danger' } role=\"progressbar\"
aria-valuenow=\"#{bar.columnHeight}\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:
#{bar.columnHeight}%;\">"
escape="false">
Expand Down Expand Up @@ -521,7 +521,7 @@ $Id$
<h:outputText value="#{bar.numStudentsText}" />
</span>
<div class="progress-stat">
<h:outputText value="<div class=\" progress-bar bg-success\" role=\"progressbar\"
<h:outputText value="<div class=\" progress-bar #{ bar.isCorrect ? 'bg-success' : 'bg-danger' } role=\"progressbar\"
aria-valuenow=\"#{bar.columnHeight}\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:
#{bar.columnHeight}%;\">"
escape="false">
Expand Down
2 changes: 1 addition & 1 deletion samigo/samigo-app/src/webapp/jsf/event/eventLog.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<h:panelGroup styleClass="d-flex flex-wrap flex-sm-nowrap align-items-center" layout="block">
<h:outputLabel styleClass="text-nowrap" value="#{eventLogMessages.filterBy}" />
<h:outputText value="&#160;" escape="false" />
<h:selectOneMenu styleClass="form-control" value="#{eventLog.filteredAssessmentId}" id="assessmentTitle"
<h:selectOneMenu styleClass="form-select form-select-sm" value="#{eventLog.filteredAssessmentId}" id="assessmentTitle"
required="true" onchange="document.forms[0].submit();">
<f:selectItems value="#{eventLog.assessments}"/>
<f:valueChangeListener type="org.sakaiproject.tool.assessment.ui.listener.author.EventLogListener" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,47 +191,14 @@
<input type="checkbox" name="isMathJaxEnabledForSite" class="onoffswitch-checkbox" id="isMathJaxEnabledForSite" #if($isMathJaxEnabledForSite)checked="checked"#end>
</div>
</div>
<div class="subPageNavToggleArea" style='display: none'>
<div class="subPageNavToggleArea">
<label class="onoffswitch-label" for="isSubPageNavEnabled">
$tlang.getString("sinfo.subnav.allowForSite")
</label>
<div class="onoffswitch">
<input type="checkbox" name="isSubPageNavEnabled" class="onoffswitch-checkbox" id="isSubPageNavEnabled" #if($isSubPageNavEnabled)checked="checked"#end>
</div>
</div>
<script>
$(function() {
var subPageNavToggleArea = $('.subPageNavToggleArea');
var toolSelectionList = $('#toolSelectionList');
var toolList = $('#toolHolderW');
var isSubPageNavEnabledCheckbox = $('#isSubPageNavEnabled');

function checkForSelectedLessonsTools() {
if (toolSelectionList.find('li[id*=sakai_lessonbuildertool]:visible').length > 0) {
subPageNavToggleArea.show();
} else {
subPageNavToggleArea.hide();
}
};

toolList.find('input[type=checkbox]').on('click', function() {
setTimeout(checkForSelectedLessonsTools, 200); // fade out on selected item takes ~100ms
return true;
});

toolSelectionList.on('click', '.removeTool', function() {
setTimeout(checkForSelectedLessonsTools, 200); // fade out on selected item takes ~100ms
return true;
});

toolSelectionList.on('click mouseup keyup', '#alertBoxYes', function() {
setTimeout(checkForSelectedLessonsTools, 0);
return true;
});

checkForSelectedLessonsTools();
});
</script>
</div>
</div> <!-- row -->
</div> <!-- toolHolderWW -->
Expand Down

0 comments on commit d4054d3

Please sign in to comment.