Skip to content

Commit

Permalink
Implement LTI Migration B2 (#28)
Browse files Browse the repository at this point in the history
* LTI Migration building block

* Allow to filter by CourseId

* Clean the HTML text removing the old link

* Use the placement Handle to find the placement. Improve error handling.

* Unregister from DB. Add license. Improve logging with datetime.

* Allow a reset function

Co-authored-by: Chris Beach <beachcoding47@gmail.com>
  • Loading branch information
ddelblanco and cbeach47 authored Feb 26, 2020
1 parent 0b64be2 commit c0a846e
Show file tree
Hide file tree
Showing 18 changed files with 3,074 additions and 26 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ The war is placed in (cloned repo)/oeqPrimaryB2/build/libs/ .
```
The jar is placed in (cloned repo)/oeqPrimaryWS/build/libs/


## Building the LTI link migration tool
```bash
~$ ./gradlew :oeqLinkMigrationLTI:clean :oeqLinkMigrationLTI:buildLinkMigration
```
The jar is placed in (cloned repo)/oeqLinkMigrationLTI/build/libs/

## Building the audit building block
For now, this is just a skeleton building block for testing.

Expand Down Expand Up @@ -49,4 +56,4 @@ TODO
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.
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.
54 changes: 33 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
buildscript {
println("Building with Bb API [${bbLearnVersion}] ");

repositories {
jcenter()
}

dependencies {
// Needed for pre-compiling the JSPs
classpath "com.bmuschko:gradle-tomcat-plugin:${gradleTomcatPluginVersion}"
Expand All @@ -20,7 +20,7 @@ allprojects {
apply plugin: "war"
apply plugin: "com.bmuschko.tomcat"
apply plugin: 'nebula.lint'

repositories {
mavenCentral()
maven {
Expand All @@ -30,9 +30,9 @@ allprojects {

group = 'org.apereo.openequella.integration.blackboard'
version = artifactVersion

gradleLint.rules = ['all-dependency', 'dependency-parentheses', 'duplicate-dependency-class']

dependencies {
providedCompile( "blackboard.platform:bb-platform:${bbLearnVersion}" ) { transitive = false }
providedCompile( "blackboard.platform:bb-cms-admin:${bbLearnVersion}" ) { transitive = false }
Expand All @@ -44,20 +44,20 @@ allprojects {
compile group: 'org.apache.cxf', name: 'cxf-bundle', version: '2.7.18'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.6'
compile group: 'org.apache.struts', name: 'struts-taglib', version: '1.3.10'

// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'

// Use JUnit test framework
testImplementation 'junit:junit:${junitVersion}'
testImplementation "junit:junit:${junitVersion}"

// Needed to precompile the JSPs.
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}",
"blackboard.platform:bb-taglibs:${bbLearnVersion}",
"blackboard.platform:bb-platform:${bbLearnVersion}",
"javax.servlet:jstl:${jstlVersion}"
"blackboard.platform:bb-taglibs:${bbLearnVersion}",
"blackboard.platform:bb-platform:${bbLearnVersion}",
"javax.servlet:jstl:${jstlVersion}"
}

task buildWar (type: War, dependsOn: tomcatJasper) {
Expand All @@ -69,10 +69,10 @@ allprojects {
!file.name.startsWith('jetty-') &&
!file.name.startsWith('geronimo-') &&
!file.name.startsWith('spring-') &&
!file.name.startsWith('serializer-')
!file.name.startsWith('serializer-')
)
}

from 'build/jsps/org/apache/jsp' // include the pre-compiled JSPs
from ('src/main/manifests/bb-manifest-unresolved.xml'){ // set the B2 version and place in the war
filter{ it.replaceAll('@VERSION@', artifactVersion)}
Expand All @@ -92,27 +92,27 @@ allprojects {
into("WEB-INF/classes")
}
}

tomcat {
jasper {
validateXml = true
outputDir = file("build/jsps")
}
}
}
}

project(':oeqAuditB2') {
dependencies {
compile project(':oeqCommon')
}

task buildB2() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn buildWar
}
}

project(':oeqPrimaryB2') {
dependencies {
compile project(':oeqCommon')
Expand All @@ -125,15 +125,27 @@ project(':oeqPrimaryB2') {
}
}

project(':oeqLinkMigrationLTI') {
dependencies {
compile project(':oeqCommon')
}

task buildLinkMigration() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn buildWar
}
}

project(':oeqPrimaryWS') {
dependencies {
compile project(':oeqCommon')
}

task generateJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
}

task zipJavadoc(type: Zip, dependsOn: generateJavadoc) {
archiveName 'documentation.zip'
destinationDir buildDir
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ jspApiVersion=2.3.3
servletApiVersion=4.0.1
junitVersion=4.12
# All building blocks / web services are re-versioned when this changes.
artifactVersion=2.1.0-Alpha-20200205E
artifactVersion=2.1.0-Alpha-20200205E
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Fri Jan 10 14:47:59 EST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
53 changes: 53 additions & 0 deletions oeqLinkMigrationLTI/src/main/java/icons.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<icons>
<types>
<type id="ims_package" description="ims package" icon="icons/IMSpackage.gif" />
<type id="plan" description="plan" icon="icons/plan.gif" />
<type id="sound" description="sound" icon="icons/sound.gif" />
<type id="snippet" description="snippet" icon="icons/snippettemplate.gif" />
<type id="template" description="template" icon="icons/template.gif" />
<type id="generic" description="generic" icon="icons/generic.gif" />
<type id="msWord" description="ms word" icon="icons/WordDocSmall.gif" />
<type id="msExcel" description="ms excel" icon="icons/XLSDocSmall.gif" />
<type id="msPower" description="ms powerpoint" icon="icons/PPTDocSmall.gif" />
<type id="image" description="image" icon="icons/image.gif" />
<type id="archive" description="archive" icon="icons/ZipSmall.gif" />
<type id="html" description="html document" icon="icons/web.gif" />
<type id="text" description="text document" icon="icons/whitepage.gif" />
<type id="audio" description="audio" icon="icons/sound.gif" />
<type id="attachment" description="attachment" icon="icons/attachment.gif" />
</types>
<extensions>
<extension id=".doc" type="msWord" />
<extension id=".xls" type="msExcel" />
<extension id=".ppt" type="msPower" />
<extension id=".bmp" type="image" />
<extension id=".tif" type="image" />
<extension id=".tiff" type="image" />
<extension id=".jpg" type="image" />
<extension id=".jpeg" type="image" />
<extension id=".gif" type="image" />
<extension id=".png" type="image" />
<extension id=".jif" type="image" />
<extension id=".jfif" type="image" />
<extension id=".zip" type="archive" />
<extension id=".gz" type="archive" />
<extension id=".tar" type="archive" />
<extension id=".tgz" type="archive" />
<extension id=".rar" type="archive" />
<extension id=".z" type="archive" />
<extension id=".ace" type="archive" />
<extension id=".htm" type="html" />
<extension id=".html" type="html" />
<extension id=".txt" type="text" />
<extension id=".wav" type="audio" />
<extension id=".mp3" type="audio" />
<extension id=".wma" type="audio" />
<extension id=".ogg" type="audio" />
<extension id="viewplan.jsp" type="plan" />
<extension id="viewims.jsp" type="ims_package" />
<extension id="viewscorm.jsp" type="ims_package" />
<extension id="treenav.jsp" type="ims_package" />
<extension id="viewitem.jsp" type="generic" />
<extension id="attachment" type="attachment" />
</extensions>
</icons>
Loading

0 comments on commit c0a846e

Please sign in to comment.