- fix txt uri for accessibility

This commit is contained in:
Richard Alam 2014-10-20 01:18:13 -07:00
parent ce723718a1
commit 9c0280c129
4 changed files with 8 additions and 8 deletions

View File

@ -225,7 +225,7 @@ class BigBlueButtonInGW(bbbGW: BigBlueButtonGateway, presUtil: PreuploadedPresen
code, presentationId, numberOfPages, pagesCompleted, presName))
}
def generatePresentationPages(presId: String, numPages: Int, presBaseUrl: String):scala.collection.immutable.HashMap[String, Page] = {
def generatePresentationPages(presId: String, numPages: Int, presBaseUrl: String):scala.collection.immutable.HashMap[String, Page] = {
var pages = new scala.collection.immutable.HashMap[String, Page]
val baseUrl =
for (i <- 1 to numPages) {
@ -234,7 +234,7 @@ class BigBlueButtonInGW(bbbGW: BigBlueButtonGateway, presUtil: PreuploadedPresen
val current = if (i == 1) true else false
val thumbnail = presBaseUrl + "/thumbnail/" + i
val swfUri = presBaseUrl + "/slide/" + i
val txtUri = presBaseUrl + "/textfiles/slide-" + i + ".txt"
val txtUri = presBaseUrl + "/textfiles/" + i
val p = new Page(id=id, num=num, thumbUri=thumbnail, swfUri=swfUri,
txtUri=txtUri, pngUri=thumbnail,

2
bigbluebutton-web/grails-app/conf/UrlMappings.groovy Executable file → Normal file
View File

@ -29,7 +29,7 @@ class UrlMappings {
action = [GET:'numberOfTextfiles']
}
"/presentation/$conference/$room/$presentation_name/textfile/$id"(controller:"presentation") {
"/presentation/$conference/$room/$presentation_name/textfiles/$id"(controller:"presentation") {
action = [GET:'showTextfile']
}

View File

@ -190,23 +190,23 @@ class PresentationController {
def conf = params.conference
def rm = params.room
def textfile = params.id
println "Controller: Show thumbnails request for $presentationName $textfile"
log.debug "Controller: Show textfile request for $presentationName $textfile"
InputStream is = null;
try {
def pres = presentationService.showTextfile(conf, rm, presentationName, textfile)
if (pres.exists()) {
println "Controller: Sending textfiles reply for $presentationName $textfile"
log.debug "Controller: Sending textfiles reply for $presentationName $textfile"
def bytes = pres.readBytes()
response.addHeader("Cache-Control", "no-cache")
response.contentType = 'plain/text'
response.outputStream << bytes;
} else {
println "$pres does not exist."
log.debug "$pres does not exist."
}
} catch (IOException e) {
println("Error reading file.\n" + e.getMessage());
log.error("Error reading file.\n" + e.getMessage());
}
return null;

View File

@ -94,7 +94,7 @@ public class ConversionUpdateMessage {
page.put("num", new Integer(i).toString());
page.put("thumb", basePresUrl + "/thumbnail/" + i);
page.put("swf", basePresUrl + "/slide/" + i);
page.put("text", basePresUrl + "/textfiles/slide-" + i + ".txt");
page.put("text", basePresUrl + "/textfiles/" + i);
pages.add(page);
}