Skip to content

Commit

Permalink
- fix txt uri for accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ritzalam committed Oct 20, 2014
1 parent ce72371 commit 9c0280c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion bigbluebutton-web/grails-app/conf/UrlMappings.groovy
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public MessageBuilder generatePages(UploadedPresentation pres) {
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);
}
Expand Down

0 comments on commit 9c0280c

Please sign in to comment.