From 2c6b891f7c7a2861888162aef0b764debedfc6b4 Mon Sep 17 00:00:00 2001 From: Charles Severance Date: Fri, 20 Sep 2024 10:02:21 -0400 Subject: [PATCH] String replacement comment - do not squash this one into the previous one --- assignment/impl/pom.xml | 12 +- .../impl/AssignmentServiceImpl.java | 4 +- assignment/tool/pom.xml | 12 +- .../AssignmentEntityProvider.java | 4 +- .../assignment/tool/AssignmentAction.java | 22 +- ...ignments_instructor_new_edit_assignment.vm | 14 +- .../config/bundle/default.sakai.properties | 12 +- gradebookng/impl/pom.xml | 8 +- ...wdoIinstallSakaiPlusinmyenterpriseLMS.html | 2 +- lessonbuilder/tool/pom.xml | 12 +- .../lessonbuildertool/service/BltiEntity.java | 12 +- .../service/LessonBuilderEntityProducer.java | 4 +- .../tool/beans/SimplePageBean.java | 6 +- .../tool/producers/LtiImportItemProducer.java | 8 +- lessonbuilder/tool/src/webapp/js/show-page.js | 10 +- .../tool/src/webapp/templates/BltiPicker.html | 16 +- .../src/webapp/templates/LtiImportItem.html | 14 +- library/pom.xml | 2 +- lti/README.md | 4 +- lti/docs/CONTENTITEM.md | 6 +- lti/docs/LTIROLES.md | 8 +- lti/docs/sakai_lti_api.md | 4 +- lti/docs/sakai_lti_portlet.md | 10 +- lti/docs/sakai_lti_provider.md | 10 +- lti/docs/sakai_lti_vendor.md | 18 +- lti/lti-api/pom.xml | 10 +- .../lti/api/AbstractLTIProcessor.java | 2 +- .../sakaiproject/lti/api/LTIProcessor.java | 2 +- .../org/sakaiproject/lti/api/LTIService.java | 2 +- .../lti/api/UserPictureSetter.java | 2 +- lti/lti-blis/pom.xml | 12 +- lti/lti-blis/src/bundle/blis.properties | 2 +- lti/lti-blis/src/bundle/blis_ar.properties | 2 +- lti/lti-blis/src/bundle/blis_bg.properties | 2 +- lti/lti-blis/src/bundle/blis_ca.properties | 2 +- lti/lti-blis/src/bundle/blis_de_DE.properties | 2 +- lti/lti-blis/src/bundle/blis_es.properties | 2 +- lti/lti-blis/src/bundle/blis_eu.properties | 2 +- lti/lti-blis/src/bundle/blis_fa_IR.properties | 2 +- lti/lti-blis/src/bundle/blis_fr_FR.properties | 2 +- lti/lti-blis/src/bundle/blis_hi_IN.properties | 2 +- lti/lti-blis/src/bundle/blis_pt_BR.properties | 2 +- lti/lti-blis/src/bundle/blis_ro_RO.properties | 2 +- lti/lti-blis/src/bundle/blis_sr.properties | 2 +- lti/lti-blis/src/bundle/blis_zh_CN.properties | 2 +- .../org/sakaiproject/lti/ServiceServlet.java | 130 ++++---- .../org/sakaiproject/lti13/LTI13Servlet.java | 78 ++--- lti/lti-blis/src/webapp/WEB-INF/web.xml | 2 +- lti/lti-common/pom.xml | 14 +- .../lti/LocalEventTrackingService.java | 2 +- .../java/org/sakaiproject/lti/UrlUtility.java | 2 +- .../org/sakaiproject/lti/util/BlowFish.java | 4 +- .../sakaiproject/lti/util/LegacyShaUtil.java | 2 +- .../lti/util/PortableShaUtil.java | 2 +- .../lti/util/SakaiContentItemUtil.java | 8 +- .../lti/util/SakaiKeySetUtil.java | 4 +- .../lti/util/SakaiLTIProviderUtil.java | 10 +- .../sakaiproject/lti/util/SakaiLTIUtil.java | 300 +++++++++--------- .../lti/util/SimpleEncryption.java | 2 +- .../org/sakaiproject/lti13/LineItemUtil.java | 30 +- .../org/sakaiproject/util/foorm/Foorm.java | 6 +- .../sakaiproject/lti/util/BlowFishTest.java | 6 +- .../lti/util/ByteToHexAndBack.java | 4 +- .../lti/util/LegacyShaUtilTest.java | 6 +- .../lti/util/PortableShaUtilTest.java | 4 +- .../lti/util/SakaiKeySetUtilTest.java | 10 +- .../lti/util/SakaiLTIUtilTest.java | 232 +++++++------- .../lti/util/SimpleEncryptionTest.java | 2 +- lti/lti-impl/pom.xml | 16 +- .../sakaiproject/lti/impl/ExporterCSV.java | 6 +- .../sakaiproject/lti/impl/ExporterExcel.java | 6 +- .../sakaiproject/lti/impl/LTIArchiveBean.java | 24 +- .../lti/impl/LTIContentArchiveBean.java | 2 +- .../lti/impl/LTIRoleMapperImpl.java | 20 +- .../lti/impl/LTISecurityServiceImpl.java | 82 ++--- .../lti/impl/SiteMembershipUpdaterImpl.java | 2 +- .../impl/SiteMembershipsSynchroniserImpl.java | 20 +- .../lti/impl/UserFinderOrCreatorImpl.java | 24 +- .../lti/impl/UserLocaleSetterImpl.java | 4 +- .../lti/impl/UserPictureSetterImpl.java | 6 +- .../lti/impl/jobs/SiteMembershipsSyncJob.java | 2 +- .../src/webapp/WEB-INF/components.xml | 4 +- lti/lti-oidc/pom.xml | 12 +- .../org/sakaiproject/lti13/OIDCServlet.java | 24 +- lti/lti-portlet/pom.xml | 14 +- .../org/sakaiproject/lti/ProviderServlet.java | 126 ++++---- .../sakaiproject/portlets/IMSLTIPortlet.java | 48 +-- .../src/webapp/WEB-INF/portlet.xml | 4 +- lti/lti-portlet/src/webapp/WEB-INF/web.xml | 12 +- lti/lti-portlet/src/webapp/descriptor.txt | 2 +- lti/lti-tool/pom.xml | 18 +- .../src/bundle/basiclti-events.properties | 4 +- .../src/bundle/basiclti-events_ar.properties | 4 +- .../src/bundle/basiclti-events_bg.properties | 4 +- .../src/bundle/basiclti-events_ca.properties | 4 +- .../bundle/basiclti-events_de_DE.properties | 2 +- .../src/bundle/basiclti-events_es.properties | 4 +- .../src/bundle/basiclti-events_eu.properties | 4 +- .../bundle/basiclti-events_fr_FR.properties | 4 +- .../bundle/basiclti-events_hi_IN.properties | 4 +- .../src/bundle/basiclti-events_ja.properties | 2 +- .../src/bundle/basiclti-events_mn.properties | 4 +- .../bundle/basiclti-events_pt_BR.properties | 4 +- .../bundle/basiclti-events_ro_RO.properties | 4 +- .../src/bundle/basiclti-events_sr.properties | 4 +- .../bundle/basiclti-events_tr_TR.properties | 2 +- .../bundle/basiclti-events_zh_CN.properties | 4 +- .../LTIEventsEntityProvider.java | 4 +- .../sakaiproject/lti/tool/LTIAdminTool.java | 76 ++--- .../src/webapp/WEB-INF/applicationContext.xml | 2 +- lti/lti-tool/src/webapp/WEB-INF/web.xml | 4 +- lti/lti-tool/src/webapp/vm/lti_content.vm | 4 +- .../src/webapp/vm/lti_content_config.vm | 4 +- .../src/webapp/vm/lti_content_delete.vm | 4 +- .../src/webapp/vm/lti_content_insert.vm | 4 +- .../src/webapp/vm/lti_import_return.vm | 2 +- lti/lti-tool/src/webapp/vm/lti_link_add.vm | 4 +- lti/lti-tool/src/webapp/vm/lti_link_remove.vm | 4 +- lti/lti-tool/src/webapp/vm/lti_test.vm | 4 +- lti/lti-tool/src/webapp/vm/lti_tool_delete.vm | 4 +- lti/lti-tool/src/webapp/vm/lti_tool_edit.vm | 20 +- lti/lti-tool/src/webapp/vm/lti_tool_site.vm | 12 +- .../src/webapp/vm/lti_tool_site_deploy.vm | 8 +- lti/lti-tool/src/webapp/vm/lti_tool_system.vm | 12 +- .../src/webapp/vm/lti_tool_transfer.vm | 4 +- lti/lti-tool/src/webapp/vm/lti_tool_view.vm | 4 +- lti/pom.xml | 28 +- lti/portlet-util/pom.xml | 6 +- lti/tsugi-util/NOTICE | 4 +- lti/tsugi-util/README.md | 10 +- lti/tsugi-util/pom.xml | 12 +- .../src/java/org/tsugi/HACK/HackMoodle.java | 4 +- .../java/org/tsugi/json/IMSJSONRequest.java | 2 +- .../src/java/org/tsugi/lti/Base64.java | 2 +- .../src/java/org/tsugi/lti/ContentItem.java | 14 +- .../src/java/org/tsugi/lti/LTIConstants.java | 6 +- .../src/java/org/tsugi/lti/LTIUtil.java | 66 ++-- .../src/java/org/tsugi/lti/XMLMap.java | 2 +- .../org/tsugi/lti13/DeepLinkResponse.java | 6 +- .../src/java/org/tsugi/lti13/LTI13Util.java | 12 +- .../src/java/org/tsugi/pox/IMSPOXRequest.java | 4 +- .../src/main/resources/META-INF/LICENSE | 2 +- .../tsugi/contentitem/ContentItemTest.java | 2 +- .../src/test/org/tsugi/lti/LTIUtilTest.java | 220 ++++++------- .../src/test/resources/descriptor.xml | 2 +- .../test/resources/descriptor_no_launch.xml | 2 +- .../src/test/resources/descriptor_secure.xml | 2 +- lti/web-ifp/pom.xml | 14 +- .../sakaiproject/portlets/SakaiIFrame.java | 6 +- master/pom.xml | 12 +- plus/README.md | 2 +- plus/api/pom.xml | 8 +- plus/impl/pom.xml | 12 +- .../plus/impl/PlusServiceImpl.java | 54 ++-- plus/provider/pom.xml | 12 +- .../sakaiproject/plus/ProviderServlet.java | 38 +-- plus/tool/pom.xml | 8 +- .../plus/tool/MainController.java | 4 +- .../main/webapp/WEB-INF/templates/form.html | 2 +- pom.xml | 4 +- portal/portal-impl/impl/pom.xml | 4 +- portal/portal-service-impl/impl/pom.xml | 4 +- site-manage/site-manage-impl/impl/pom.xml | 4 +- site-manage/site-manage-tool/tool/pom.xml | 8 +- .../sakaiproject/site/tool/SiteAction.java | 6 +- .../src/resources/Events.properties | 4 +- .../src/resources/Events_bg.properties | 4 +- .../src/resources/Events_ca.properties | 4 +- .../src/resources/Events_de_DE.properties | 4 +- .../src/resources/Events_es.properties | 4 +- .../src/resources/Events_eu.properties | 4 +- .../src/resources/Events_fa_IR.properties | 4 +- .../src/resources/Events_fr_FR.properties | 4 +- .../src/resources/Events_hi_IN.properties | 4 +- .../src/resources/Events_mn.properties | 4 +- .../src/resources/Events_pt_BR.properties | 4 +- .../src/resources/Events_ro_RO.properties | 4 +- .../src/resources/Events_sv.properties | 4 +- .../src/resources/Events_tr_TR.properties | 4 +- .../src/resources/Events_zh_CN.properties | 4 +- 180 files changed, 1269 insertions(+), 1269 deletions(-) diff --git a/assignment/impl/pom.xml b/assignment/impl/pom.xml index fb82035a8675..c38a094c8364 100644 --- a/assignment/impl/pom.xml +++ b/assignment/impl/pom.xml @@ -217,16 +217,16 @@ test - org.sakaiproject.basiclti - basiclti-api + org.sakaiproject.lti + lti-api - org.sakaiproject.basiclti - basiclti-util + org.sakaiproject.lti + lti-util - org.sakaiproject.basiclti - basiclti-common + org.sakaiproject.lti + lti-common ${sakai.version} diff --git a/assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java b/assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java index 192b02cb78b6..e9781bfd333b 100644 --- a/assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java +++ b/assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java @@ -104,7 +104,7 @@ import org.sakaiproject.authz.api.Member; import org.sakaiproject.authz.api.SecurityAdvisor; import org.sakaiproject.authz.api.SecurityService; -import org.sakaiproject.basiclti.util.SakaiBLTIUtil; +import org.sakaiproject.lti.util.SakaiLTIUtil; import org.sakaiproject.calendar.api.Calendar; import org.sakaiproject.calendar.api.CalendarEvent; import org.sakaiproject.calendar.api.CalendarService; @@ -4253,7 +4253,7 @@ public Map transferCopyEntities(String fromContext, String toCon // If there is a LTI launch associated with this copy it over if ( oAssignment.getContentId() != null ) { Long contentKey = oAssignment.getContentId().longValue(); - Object retval = SakaiBLTIUtil.copyLTIContent(contentKey, toContext, fromContext); + Object retval = SakaiLTIUtil.copyLTIContent(contentKey, toContext, fromContext); if ( retval instanceof Long ) { nAssignment.setContentId(((Long) retval).intValue()); // If something went wrong, we can't be an LTI submission in the new site diff --git a/assignment/tool/pom.xml b/assignment/tool/pom.xml index 91de5744cf4f..6f7fffc233d5 100644 --- a/assignment/tool/pom.xml +++ b/assignment/tool/pom.xml @@ -92,17 +92,17 @@ sakai-velocity-tool - org.sakaiproject.basiclti - basiclti-api + org.sakaiproject.lti + lti-api - org.sakaiproject.basiclti - basiclti-common + org.sakaiproject.lti + lti-common ${project.version} - org.sakaiproject.basiclti - basiclti-util + org.sakaiproject.lti + lti-util org.apache.commons diff --git a/assignment/tool/src/java/org/sakaiproject/assignment/entityproviders/AssignmentEntityProvider.java b/assignment/tool/src/java/org/sakaiproject/assignment/entityproviders/AssignmentEntityProvider.java index 9415ce0b13b6..41e80979a9d9 100644 --- a/assignment/tool/src/java/org/sakaiproject/assignment/entityproviders/AssignmentEntityProvider.java +++ b/assignment/tool/src/java/org/sakaiproject/assignment/entityproviders/AssignmentEntityProvider.java @@ -689,7 +689,7 @@ private Map submissionToMap(Set activeSubmitters, Assign if ( content != null ) { String contentItem = StringUtils.trimToEmpty((String) content.get(LTIService.LTI_CONTENTITEM)); // Instead of parsing, the JSON we just look for a simple existance of the submission review entry - // Delegate the complex understanding of the launch to SakaiBLTIUtil + // Delegate the complex understanding of the launch to SakaiLTIUtil // TODO: Eventually, Sakai's LTIService will implement a submissionReview checkbox and we should check for that here boolean submissionReviewAvailable = contentItem.indexOf("\"submissionReview\"") > 0; @@ -1098,7 +1098,7 @@ public ActionReturn getGradableForSite(EntityView view , Map par ltiSubmissionLaunch = "/access/lti/site/" + siteId + "/content:" + contentKey + "?for_user=" + submitter.get("id"); // Instead of parsing, the JSON we just look for a simple existance of the submission review entry - // Delegate the complex understanding of the launch to SakaiBLTIUtil + // Delegate the complex understanding of the launch to SakaiLTIUtil if ( contentItem.indexOf("\"submissionReview\"") > 0 ) { ltiSubmissionLaunch = ltiSubmissionLaunch + "&message_type=content_review"; } diff --git a/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java b/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java index 6dfe1ec3f73e..cf70d32e14eb 100644 --- a/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java +++ b/assignment/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java @@ -165,7 +165,7 @@ import org.sakaiproject.authz.api.Role; import org.sakaiproject.authz.api.SecurityAdvisor; import org.sakaiproject.authz.api.SecurityService; -import org.tsugi.basiclti.BasicLTIUtil; +import org.tsugi.lti.LTIUtil; import org.tsugi.lti13.LTICustomVars; import org.tsugi.lti13.DeepLinkResponse; import org.tsugi.lti13.LTI13Util; @@ -256,7 +256,7 @@ import org.sakaiproject.util.comparator.AlphaNumericComparator; import org.sakaiproject.util.comparator.UserSortNameComparator; import org.sakaiproject.lti.api.LTIService; -import org.sakaiproject.basiclti.util.SakaiBLTIUtil; +import org.sakaiproject.lti.util.SakaiLTIUtil; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -1998,12 +1998,12 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet, } // Ignore the Content Item - use the value in the assignment if tool allows - context.put("newpage", Boolean.valueOf(SakaiBLTIUtil.getNewpage(tool, null, newpage))); - context.put("height",SakaiBLTIUtil.getFrameHeight(tool, content, "1200px")); + context.put("newpage", Boolean.valueOf(SakaiLTIUtil.getNewpage(tool, null, newpage))); + context.put("height",SakaiLTIUtil.getFrameHeight(tool, content, "1200px")); context.put("browser-feature-allow", String.join(";", serverConfigurationService.getStrings("browser.feature.allow"))); // Copy title, description, and dates from Assignment to content if mis-match - int protect = SakaiBLTIUtil.getInt(content.get(LTIService.LTI_PROTECT)); + int protect = SakaiLTIUtil.getInt(content.get(LTIService.LTI_PROTECT)); String assignmentTitle = StringUtils.trimToEmpty(assignment.getTitle()); String assignmentDesc = StringUtils.trimToEmpty(assignment.getInstructions()); Instant visibleDate = assignment.getVisibleDate(); @@ -2021,7 +2021,7 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet, String placement_secret = StringUtils.trimToNull((String) content.get(LTIService.LTI_PLACEMENTSECRET)); String content_settings = (String) content.get(LTIService.LTI_SETTINGS); - JSONObject content_json = BasicLTIUtil.parseJSONObject(content_settings); + JSONObject content_json = LTIUtil.parseJSONObject(content_settings); String contentVisibleDate = StringUtils.trimToEmpty((String) content_json.get(DeepLinkResponse.RESOURCELINK_AVAILABLE_STARTDATETIME)); String contentOpenDate = StringUtils.trimToEmpty((String) content_json.get(DeepLinkResponse.RESOURCELINK_SUBMISSION_STARTDATETIME)); String contentDueDate = StringUtils.trimToEmpty((String) content_json.get(DeepLinkResponse.RESOURCELINK_SUBMISSION_ENDDATETIME)); @@ -2045,7 +2045,7 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet, content_json.put(LTIService.LTI_DESCRIPTION, assignmentDesc); content_json.put(LTIService.LTI_PROTECT, new Integer(1)); - // Copy assignment specific custom parameter substitutions to pass into SakaiBLTIUtil + // Copy assignment specific custom parameter substitutions to pass into SakaiLTIUtil content_json.put(DeepLinkResponse.RESOURCELINK_AVAILABLE_STARTDATETIME, assignmentVisibleDate); content_json.put(DeepLinkResponse.RESOURCELINK_SUBMISSION_STARTDATETIME, assignmentOpenDate); content_json.put(DeepLinkResponse.RESOURCELINK_AVAILABLE_ENDDATETIME, assignmentDueDate); @@ -2061,8 +2061,8 @@ private String build_view_external_tool_launch_context(VelocityPortlet portlet, } // Unlock this assignment for one launch... - String launch_code_key = SakaiBLTIUtil.getLaunchCodeKey(content); - String launch_code = SakaiBLTIUtil.getLaunchCode(content); + String launch_code_key = SakaiLTIUtil.getLaunchCodeKey(content); + String launch_code = SakaiLTIUtil.getLaunchCode(content); if ( launch_code_key != null && launch_code != null ) { Session session = sessionManager.getCurrentSession(); session.setAttribute(launch_code_key, launch_code); @@ -3634,7 +3634,7 @@ protected void setAssignmentFormContext(SessionState state, Context context) { } Placement placement = toolManager.getCurrentPlacement(); - // String contentReturn = SakaiBLTIUtil.getOurServerUrl() + "/portal/tool/" + placement.getId() + + // String contentReturn = SakaiLTIUtil.getOurServerUrl() + "/portal/tool/" + placement.getId() + String contentReturn = serverConfigurationService.getToolUrl() + "/" + placement.getId() + "/sakai.lti.admin.helper.helper" + "?panel=AssignmentsMain" @@ -10343,7 +10343,7 @@ public void doEdit_assignment(RunData data) { Map tool = ltiService.getTool(toolKey, site.getId()); String toolTitle = (String) tool.get(LTIService.LTI_TITLE); state.setAttribute(NEW_ASSIGNMENT_CONTENT_TITLE, toolTitle); - Long toolNewpage = SakaiBLTIUtil.getLong(tool.get(LTIService.LTI_NEWPAGE)); + Long toolNewpage = SakaiLTIUtil.getLong(tool.get(LTIService.LTI_NEWPAGE)); state.setAttribute(NEW_ASSIGNMENT_CONTENT_TOOL_NEWPAGE, toolNewpage); } } catch(org.sakaiproject.exception.IdUnusedException e ) { diff --git a/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm b/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm index db6ce03b555b..aa4bc1964faf 100644 --- a/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm +++ b/assignment/tool/src/webapp/vm/assignment/chef_assignments_instructor_new_edit_assignment.vm @@ -579,7 +579,7 @@