use of org.olat.modules.edubase.model.BookSectionImpl in project OpenOLAT by OpenOLAT.
the class EdubaseBookSectionListController method doAddBookSection.
private void doAddBookSection() {
BookSection bookSection = new BookSectionImpl();
wrapBookSection(bookSection);
flc.setDirty(true);
}
use of org.olat.modules.edubase.model.BookSectionImpl in project OpenOLAT by OpenOLAT.
the class EdubaseManagerImplTest method getLtiLaunchUrlShoudAppendBookIdAndMandatoryPageFrom.
@Test
public void getLtiLaunchUrlShoudAppendBookIdAndMandatoryPageFrom() {
BookSection bookSection = new BookSectionImpl();
bookSection.setBookId(BOOK_ID);
String baseUrl = "https://edubase.ch";
when(edubaseModuleMock.getLtiLaunchUrl()).thenReturn(baseUrl);
String generatedLtiUrl = sut.getLtiLaunchUrl(bookSection);
String expectedLtiUrl = baseUrl + "/" + BOOK_ID + "/1";
assertThat(generatedLtiUrl).isEqualTo(expectedLtiUrl);
}
use of org.olat.modules.edubase.model.BookSectionImpl in project OpenOLAT by OpenOLAT.
the class EdubaseManagerImplTest method getLtiLaunchUrlShoudAppendPageFrom.
@Test
public void getLtiLaunchUrlShoudAppendPageFrom() {
BookSection bookSection = new BookSectionImpl();
bookSection.setBookId(BOOK_ID);
Integer pageFrom = 9898;
bookSection.setPageFrom(pageFrom);
String baseUrl = "https://edubase.ch";
when(edubaseModuleMock.getLtiLaunchUrl()).thenReturn(baseUrl);
String generatedLtiUrl = sut.getLtiLaunchUrl(bookSection);
String expectedLtiUrl = baseUrl + "/" + BOOK_ID + "/" + pageFrom;
assertThat(generatedLtiUrl).isEqualTo(expectedLtiUrl);
}
use of org.olat.modules.edubase.model.BookSectionImpl in project openolat by klemens.
the class EdubaseManagerImplTest method getLtiLaunchUrlShoudAppendPageFrom.
@Test
public void getLtiLaunchUrlShoudAppendPageFrom() {
BookSection bookSection = new BookSectionImpl();
bookSection.setBookId(BOOK_ID);
Integer pageFrom = 9898;
bookSection.setPageFrom(pageFrom);
String baseUrl = "https://edubase.ch";
when(edubaseModuleMock.getLtiLaunchUrl()).thenReturn(baseUrl);
String generatedLtiUrl = sut.getLtiLaunchUrl(bookSection);
String expectedLtiUrl = baseUrl + "/" + BOOK_ID + "/" + pageFrom;
assertThat(generatedLtiUrl).isEqualTo(expectedLtiUrl);
}
use of org.olat.modules.edubase.model.BookSectionImpl in project openolat by klemens.
the class EdubaseManagerImplTest method getLtiLaunchUrlShoudAppendBookIdAndMandatoryPageFrom.
@Test
public void getLtiLaunchUrlShoudAppendBookIdAndMandatoryPageFrom() {
BookSection bookSection = new BookSectionImpl();
bookSection.setBookId(BOOK_ID);
String baseUrl = "https://edubase.ch";
when(edubaseModuleMock.getLtiLaunchUrl()).thenReturn(baseUrl);
String generatedLtiUrl = sut.getLtiLaunchUrl(bookSection);
String expectedLtiUrl = baseUrl + "/" + BOOK_ID + "/1";
assertThat(generatedLtiUrl).isEqualTo(expectedLtiUrl);
}
Aggregations