Skip to content

Commit

Permalink
Merge pull request #9 from equella/issue/4
Browse files Browse the repository at this point in the history
#4 - B2/WS working again in SaaS environment
  • Loading branch information
cbeach47 authored Mar 5, 2019
2 parents abe1832 + 2f1a523 commit cc440bd
Show file tree
Hide file tree
Showing 61 changed files with 6,822 additions and 35,492 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ build/
.settings/
.project
.classpath

.vscode/
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,11 @@ TODO
```
~$ ./gradlew generateGradleLintReport
~$ ./gradlew fixGradleLint
```
```

## Logging
### Self / Managed Hosting
Logs to bb-services.txt. The Building Block Settings page will list the log file as well.

### SaaS
Logs to Kibana. Search for `oeqInteg`. The default graph won't provide the rows, so hover over the bottom rectangle on the left-hand side of the Kibana Learn interface (should be green) to Add Panel. Select Table and 'selected' queries.
30 changes: 30 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Test Scenarios for oeqPrimaryB2

## Install Building Block
Ensure the permissions are as expected.

## Edit Building Block Settings
Ensure you can save / edit configurations and they persist.
Ensure the version on the settings page is the same version as in the war filename.

## Add New openEQUELLA object
1. Navigate to a Blackboard course
1. Under `Content > Tools` , select `openEQUELLA Object`
1. Ensure the Selection Session displays and you can select / add a link into the course

## Access New Integration Link

## Access Existing Integration Link

## Edit Integration Link

## Add openEQUELLA Module

## Course Tools > openEQUELLA Contribute

## Course Tools > openEQUELLA My Resources

## Course Tools > openEQUELLA Search

## Push-To-LMS
Note: Requires the web service to be installed
10 changes: 9 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ allprojects {
(
!file.name.startsWith('jetty-') &&
!file.name.startsWith('geronimo-') &&
!file.name.startsWith('spring-')
!file.name.startsWith('spring-') &&
!file.name.startsWith('serializer-')
)
}

Expand All @@ -80,6 +81,13 @@ allprojects {
}
into("WEB-INF")
}
from ('src/main/properties/version-unresolved.properties'){ // set the B2 version and place in the war
filter{ it.replaceAll('@VERSION@', artifactVersion)}
rename { String fileName ->
fileName.replace("-unresolved", "")
}
into(".")
}
from ('src/main/java/icons.xml') {
into("WEB-INF/classes")
}
Expand Down
2 changes: 1 addition & 1 deletion gbFixer/public_html/WEB-INF/tle.tld
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
<tag>
<name>context</name>

<tagclass>com.dytech.edge.blackboard.net.ContextTag</tagclass>
<tagclass>org.apereo.openequella.integration.blackboard.buildingblock.ContextTag</tagclass>

<bodycontent>JSP</bodycontent>
</tag>
Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
bbLearnVersion=9.1.201410.160373
#bbLearnVersion=3400.0.0
bbLearnVersion=3400.0.0
tomcatVersion=8.0.42
gradleTomcatPluginVersion=2.5
jstlVersion=1.2
jspApiVersion=2.3.3
servletApiVersion=4.0.1
junitVersion=4.12
# All building blocks / web services are re-versioned when this changes.
artifactVersion=2.0.0-SNAPSHOT
artifactVersion=2.0.1

2 changes: 1 addition & 1 deletion linkFixer/public_html/WEB-INF/tle.tld
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
<tag>
<name>context</name>

<tagclass>com.dytech.edge.blackboard.net.ContextTag</tagclass>
<tagclass>org.apereo.openequella.integration.blackboard.buildingblock.ContextTag</tagclass>

<bodycontent>JSP</bodycontent>
</tag>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,105 @@
package org.apereo.openequella.integration.blackboard.oeqAudit;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.util.List;

//import javax.servlet.http.HttpServletRequest;
import blackboard.platform.BbServiceManager;
import javax.servlet.http.HttpServletRequest;

public class Audit {
private volatile static Audit instance;

protected Audit() {
public static void main(String[] args) {

}

public static List<String> auditClasses() {
List<String> audit = new ArrayList<>();
try {
audit.add("Available: " + blackboard.data.blti.BasicLTIDomainConfig.class.getName());
} catch (Exception e) {
audit.add("MISSING: blackboard.data.blti.BasicLTIDomainConfig");
}

try {
audit.add("Available: " + blackboard.platform.blti.BasicLTIDomainConfigManager.class.getName());
} catch (Exception e) {
audit.add("MISSING: blackboard.platform.blti.BasicLTIDomainConfigManager");
}

try {
audit.add("Available: " + blackboard.data.blti.BasicLTIPlacement.class.getName());
} catch (Exception e) {
audit.add("MISSING: blackboard.data.blti.BasicLTIPlacement");
}

try {
audit.add("Available: " + blackboard.data.blti.BasicLTIDomainHost.class.getName());
} catch (Exception e) {
audit.add("MISSING: blackboard.data.blti.BasicLTIDomainHost");
}

// "blackboard.data.blti.BasicLTIDomainConfig.SendUserData",
// "blackboard.data.blti.BasicLTIDomainConfig.Status",
// "blackboard.data.blti.BasicLTIPlacement.Type",
// "blackboard.data.gradebook.impl.OutcomeDefinition",
// "blackboard.db.BbDatabase", "blackboard.db.ConnectionManager",
// "blackboard.db.DbUtil",
// "blackboard.persist.gradebook.impl.OutcomeDefinitionDbLoader",
// "blackboard.persist.impl.SimpleSelectQuery",
// "blackboard.platform.blti.BasicLTIDomainConfigManager",
// "blackboard.platform.blti.BasicLTIDomainConfigManagerFactory",
// "blackboard.platform.blti.BasicLTIPlacementManager",
// "blackboard.platform.ContentWrapperHelper",
// "blackboard.platform.gradebook2.GradableItem",
// "blackboard.platform.gradebook2.GradableItemManager",
// "blackboard.platform.gradebook2.GradebookManagerFactory",
// "blackboard.platform.gradebook2.impl.GradableItemDAO",
// "blackboard.platform.gradebook2.impl.ScoreProviderDAO",
// "blackboard.platform.gradebook2.ScoreProvider",
// "blackboard.platform.plugin.ContentHandler",
// "blackboard.platform.plugin.ContentHandlerDbLoader",
// "blackboard.platform.plugin.ContentHandlerDbPersister",
// "blackboard.platform.plugin.ContentHandlerType.ActionType",
// "blackboard.platform.plugin.PlugInException",
// "blackboard.platform.query.Criteria",
// "blackboard.platform.query.CriterionBuilder",
// "blackboard.platform.security.AccessManagerService",
// "blackboard.platform.session.BbSessionManagerServiceExFactory",
// "blackboard.platform.vxi.data.VirtualHost",
// "blackboard.platform.vxi.data.VirtualInstallation",
// "blackboard.platform.vxi.service.VirtualInstallationManager",
// "blackboard.platform.ws.AxisHelpers", "blackboard.platform.ws.SessionVO",
// "blackboard.platform.ws.WebserviceContext",
// "blackboard.platform.ws.WebserviceException",
// "blackboard.platform.ws.WebserviceLogger" };

return audit;
}

private volatile static Audit instance;

protected Audit() {

}
}

public static Audit instance() {
if (instance != null) {
return instance;
}
public static Audit instance() {
if (instance != null) {
return instance;
}

instance = new Audit();
return instance;
}
instance = new Audit();
return instance;
}

public String getAudit() {
// Test to pull in the dep.
String state = BbServiceManager.getState().name();
return "A successful test on " + (new Date()) + " State: " + state;
}
public String getAudit() {
// Test to pull in the dep.
String state = BbServiceManager.getState().name();
return "A successful test on " + (new Date()) + " State: " + state;
}

public String getError() {
return null;// "An error msg here";
}
public String getError() {
return null;// "An error msg here";
}

}
2 changes: 1 addition & 1 deletion oeqAuditB2/src/main/manifests/bb-manifest-unresolved.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<plugin>
<name value="openEQUELLA B2 Auditor Plugin"/>
<name value="openEQUELLA Auditor"/>
<handle value="oeqAudit"/>
<description value="Runs a simple audit of the Blackboard environment wrt openEQUELLA"/>
<version value="@VERSION@"/>
Expand Down
49 changes: 32 additions & 17 deletions oeqAuditB2/src/main/webapp/admin/config.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
import="java.util.*,
java.text.*,
java.io.*,
org.apereo.openequella.integration.blackboard.b2auditor.Auditor"%>
org.apereo.openequella.integration.blackboard.oeqAudit.Audit"%>

<%@ taglib uri="/bbUI" prefix="ui"%>


<%
Auditor auditor = Auditor.instance();
Audit audit = Audit.instance();
String ex = null;
String message = null;
try
{
message = auditor.getAudit();
message = audit.getAudit();
}
catch( Exception e )
{
Expand All @@ -27,12 +27,14 @@
e.printStackTrace(w);
ex = s.toString();
}
String error = (auditor.getError() == null ? ex : auditor.getError());
String error = (audit.getError() == null ? ex : audit.getError());
String title = "openEQUELLA B2 Auditor Plugin";
String title = "openEQUELLA B2 Audit Plugin";
List<String> auditForClasses = audit.auditClasses();
%>

<ui:docTemplate title="openEQUELLA B2 Auditor">
<ui:docTemplate title="openEQUELLA Audit">
<ui:breadcrumbBar handle="admin_plugin_manage">
<ui:breadcrumb><%=title%></ui:breadcrumb>
</ui:breadcrumbBar>
Expand All @@ -46,15 +48,28 @@
<div><pre><%=error%></pre>
</div>
</ui:dataElement>
<% }
if(message != null)
{
%>
<ui:dataElement label="" >
<div style="{color:blue}">
<%=message%>
</div>
</ui:dataElement>

<% } %>
<% }
if(message != null)
{
%>
<ui:dataElement label="" >
<div style="{color:blue}">
<%=message%>
</div>
</ui:dataElement>

<% }
if(audit != null)
{
for(String auditBit : auditForClasses) {
%>
<div style="{color:blue}">
<%=auditBit%>
</div>


<% } }%>



</ui:docTemplate>
Loading

0 comments on commit cc440bd

Please sign in to comment.