use of org.olat.selenium.page.course.AssessmentCEConfigurationPage in project openolat by klemens.
the class AssessmentTest method assessmentCourseElement.
/**
* An author create a course with an assessment course element with
* min., max., cut value and so on. It add an user to the course,
* go to the assessment tool and set a score to the assessed user.<br>
*
* The user log in, go to the efficiency statements list and check
* it become its statement.
*
* @param authorLoginPage
* @param ryomouBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void assessmentCourseElement(@InitialPage LoginPage authorLoginPage, @Drone @User WebDriver ryomouBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO ryomou = new UserRestClient(deploymentUrl).createRandomUser("Ryomou");
authorLoginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course-Assessment-" + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
// create a course element of type Test with the test that we create above
String assessmentNodeTitle = "Assessment CE";
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit().createNode("ms").nodeTitle(assessmentNodeTitle);
// configure assessment
AssessmentCEConfigurationPage assessmentConfig = new AssessmentCEConfigurationPage(browser);
assessmentConfig.selectConfiguration().setScoreAuto(0.1f, 10.0f, 5.0f);
// set the score / passed calculation in root node and publish
courseEditor.selectRoot().selectTabScore().enableRootScoreByNodes().autoPublish().accessConfiguration().setUserAccess(UserAccess.registred);
// go to members management
CoursePageFragment courseRuntime = courseEditor.clickToolbarBack();
MembersPage members = courseRuntime.members();
members.addMember().searchMember(ryomou, true).nextUsers().nextOverview().nextPermissions().finish();
// efficiency statement is default on
// go to the assessment to to set the points
members.clickToolbarBack().assessmentTool().users().assertOnUsers(ryomou).selectUser(ryomou).selectCourseNode(assessmentNodeTitle).setAssessmentScore(8.0f).assertUserPassedCourseNode(assessmentNodeTitle);
// Ryomou login
LoginPage ryomouLoginPage = LoginPage.getLoginPage(ryomouBrowser, deploymentUrl);
ryomouLoginPage.loginAs(ryomou.getLogin(), ryomou.getPassword()).resume();
// see its beautiful efficiency statement
UserToolsPage ryomouUserTools = new UserToolsPage(ryomouBrowser);
ryomouUserTools.openUserToolsMenu().openMyEfficiencyStatement().assertOnEfficiencyStatmentPage().assertOnStatement(courseTitle, true).selectStatement(courseTitle).assertOnCourseDetails(assessmentNodeTitle, true);
}
use of org.olat.selenium.page.course.AssessmentCEConfigurationPage in project openolat by klemens.
the class AssessmentTest method bulkAssessment.
/**
* Create an assessment course element, add two users to the course
* and assesses them with the bulk assessment tool. The 2 users
* log in and check their results.
*
* @param loginPage
* @param kanuBrowser
* @param reiBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void bulkAssessment(@InitialPage LoginPage loginPage, @Drone @User WebDriver ryomouBrowser, @Drone @Participant WebDriver kanuBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO ryomou = new UserRestClient(deploymentUrl).createRandomUser("Ryomou");
UserVO kanu = new UserRestClient(deploymentUrl).createRandomUser("Kanu");
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course-Assessment-" + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
// create a course element of type Test with the test that we create above
String assessmentNodeTitle = "Assessment CE";
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit().createNode("ms").nodeTitle(assessmentNodeTitle);
// configure assessment
AssessmentCEConfigurationPage assessmentConfig = new AssessmentCEConfigurationPage(browser);
assessmentConfig.selectConfiguration().setScoreAuto(0.1f, 10.0f, 5.0f);
// set the score / passed calculation in root node and publish
courseEditor.selectRoot().selectTabScore().enableRootScoreByNodes().autoPublish().accessConfiguration().setUserAccess(UserAccess.registred);
// go to members management
CoursePageFragment courseRuntime = courseEditor.clickToolbarBack();
MembersPage members = courseRuntime.members();
members.importMembers().setMembers(ryomou, kanu).nextUsers().nextOverview().nextPermissions().finish();
BulkAssessmentData[] data = new BulkAssessmentData[] { new BulkAssessmentData(ryomou, 8.0f, null, "Well done"), new BulkAssessmentData(kanu, 4.0f, null, "Need more work") };
members.clickToolbarBack().assessmentTool().bulk().data(data).nextData().nextColumns().nextValidation().finish();
// Ryomou login
LoginPage ryomouLoginPage = LoginPage.getLoginPage(ryomouBrowser, deploymentUrl);
ryomouLoginPage.loginAs(ryomou).resume();
NavigationPage ryomouNavBar = new NavigationPage(ryomouBrowser);
ryomouNavBar.openMyCourses().select(courseTitle);
// go to the group task
CoursePageFragment ryomouCourse = new CoursePageFragment(ryomouBrowser);
ryomouCourse.clickTree().selectWithTitle(assessmentNodeTitle);
// Second login
LoginPage kanuLoginPage = LoginPage.getLoginPage(kanuBrowser, deploymentUrl);
kanuLoginPage.loginAs(kanu).resume();
NavigationPage kanuNavBar = new NavigationPage(kanuBrowser);
kanuNavBar.openMyCourses().select(courseTitle);
// go to the group task
CoursePageFragment kanuCourse = new CoursePageFragment(kanuBrowser);
kanuCourse.clickTree().selectWithTitle(assessmentNodeTitle);
// Ryomou -> passed
WebElement passedEl = ryomouBrowser.findElement(By.cssSelector("tr.o_state.o_passed"));
Assert.assertTrue(passedEl.isDisplayed());
// Kanu -> failed
WebElement failedEl = kanuBrowser.findElement(By.cssSelector("tr.o_state.o_failed"));
Assert.assertTrue(failedEl.isDisplayed());
}
use of org.olat.selenium.page.course.AssessmentCEConfigurationPage in project OpenOLAT by OpenOLAT.
the class PortfolioV2Test method binderAssessment.
/**
* This is a long test. It's test the whole process to assess a binder from
* the template create by the author, to the assessment value saved in the
* assessment tool of the course.<br>
* The author creates a portfolio template with 2 sections and 2 assignments,
* it creates a course with a portfolio element and bind the template to it. It
* add a user as participant.<br>
* The participant starts the course, pick the binder and do every assignment.
* It edits the sharing settings to add the author as a coach.<br>
* The author assesses the sections and set the binder as done. Than it goes
* to the course, opens the assessment tool and check the participant passed
* the binder.
*
* @param loginPage
* @param reiBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void binderAssessment(@InitialPage LoginPage loginPage, @Drone @User WebDriver reiBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO rei = new UserRestClient(deploymentUrl).createRandomUser("rei");
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
String binderTitle = "Binder to assess " + UUID.randomUUID();
navBar.openAuthoringEnvironment().createPortfolioBinder(binderTitle).clickToolbarBack();
// create a binder template with 2 sections and
// an assignment in each
String section1Title = "Section 1 " + UUID.randomUUID();
String assignment1Title = "Assignment 1 " + UUID.randomUUID();
String section2Title = "Section 2 " + UUID.randomUUID();
String assignment2Title = "Assignment 2 " + UUID.randomUUID();
BinderPage binderTemplate = new BinderPage(browser);
binderTemplate.assertOnBinder().selectTableOfContent().deleteSection().selectEntries().createSectionInEntries(section1Title).createAssignmentForSection(section1Title, assignment1Title, "Write a small summary", "Your task is...").assertOnAssignmentInEntries(assignment1Title).createSection(section2Title).createAssignmentForSection(section2Title, assignment2Title, "Second part to do", "you have to work").assertOnAssignmentInEntries(assignment2Title);
// create a course
String courseTitle = "ASPF Course " + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String portfolioNodeTitle = "Template-ASPF-v2";
// create a course element of type portfolio and choose the one we created above
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
courseEditor.createNode("ep").nodeTitle(portfolioNodeTitle).selectTabLearnContent().choosePortfolio(binderTitle);
// configure the assessment
AssessmentCEConfigurationPage assessmentConfig = new AssessmentCEConfigurationPage(browser);
assessmentConfig.selectConfiguration().setScoreAuto(0.0f, 10.0f, 5.0f);
courseEditor.publish().quickPublish(UserAccess.membersOnly);
MembersPage membersPage = courseEditor.clickToolbarBack().members();
membersPage.importMembers().setMembers(rei).nextUsers().nextOverview().nextPermissions().finish();
// Participant log in
LoginPage reiLoginPage = LoginPage.getLoginPage(reiBrowser, deploymentUrl);
reiLoginPage.loginAs(rei).resume();
// open the course
NavigationPage reiNavBar = new NavigationPage(reiBrowser);
reiNavBar.openMyCourses().select(courseTitle);
// go to the portfolio course element
CoursePageFragment reiTestCourse = new CoursePageFragment(reiBrowser);
reiTestCourse.clickTree().selectWithTitle(portfolioNodeTitle);
PortfolioElementPage portfolioCourseEl = new PortfolioElementPage(reiBrowser);
BinderPage reiBinder = portfolioCourseEl.pickPortfolio().goToPortfolioV2();
OOGraphene.waitAndCloseBlueMessageWindow(reiBrowser);
reiBinder.selectEntries().pickAssignment(assignment1Title).publishEntry();
reiBinder.selectEntries().pickAssignment(assignment2Title).publishEntry();
// add the author as coach
reiBinder.selectPublish().openAccessMenu().addMember().searchMember(author, false).nextUsers().nextOverview().fillAccessRights(binderTitle, Boolean.TRUE).nextPermissions().deSelectEmail().finish();
// the author come to see the binder
UserToolsPage userTools = new UserToolsPage(browser);
PortfolioV2HomePage portfolio = userTools.openUserToolsMenu().openPortfolioV2();
portfolio.openSharedWithMe().openSharedBindersWithMe().assertOnBinder(binderTitle).selectBinder(binderTitle).selectAssessment().passed(section1Title).save().close(section1Title).passed(section2Title).save().close(section2Title).done().assertPassed(2);
// than go to the course and check the results in the assessment tool
// author take the lead and check the assessment tool
navBar.openMyCourses().select(courseTitle);
// open the assessment tool
AssessmentToolPage assessmentTool = new CoursePageFragment(browser).assessmentTool();
// check that rei has passed the test
assessmentTool.users().assertOnUsers(rei).selectUser(rei).assertPassed(rei);
}
use of org.olat.selenium.page.course.AssessmentCEConfigurationPage in project OpenOLAT by OpenOLAT.
the class PortfolioV2Test method collectEfficiencyStatement.
/**
* Create a course with an assessment course element, setup
* efficiency statement, add a user and assess her.
* The user log in, search its efficiency statement, pick it
* as a media for is portfolio and goes in the media center
* to search it and select it.
*
* @param authorLoginPage
* @param ryomouBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void collectEfficiencyStatement(@InitialPage LoginPage authorLoginPage, @Drone @User WebDriver ryomouBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO ryomou = new UserRestClient(deploymentUrl).createRandomUser("Ryomou");
authorLoginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course-Assessment-" + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
// create a course element of type Test with the test that we create above
String assessmentNodeTitle = "Efficiency PF";
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit().createNode("ms").nodeTitle(assessmentNodeTitle);
// configure assessment
AssessmentCEConfigurationPage assessmentConfig = new AssessmentCEConfigurationPage(browser);
assessmentConfig.selectConfiguration().setScoreAuto(1.0f, 6.0f, 4.0f);
// set the score / passed calculation in root node and publish
courseEditor.selectRoot().selectTabScore().enableRootScoreByNodes().autoPublish().accessConfiguration().setUserAccess(UserAccess.registred);
// go to members management
CoursePageFragment courseRuntime = courseEditor.clickToolbarBack();
MembersPage members = courseRuntime.members();
members.addMember().searchMember(ryomou, true).nextUsers().nextOverview().nextPermissions().finish();
// efficiency statement is default on
// go to the assessment to to set the points
members.clickToolbarBack().assessmentTool().users().assertOnUsers(ryomou).selectUser(ryomou).selectCourseNode(assessmentNodeTitle).setAssessmentScore(4.5f).assertUserPassedCourseNode(assessmentNodeTitle);
// Ryomou login
LoginPage ryomouLoginPage = LoginPage.getLoginPage(ryomouBrowser, deploymentUrl);
ryomouLoginPage.loginAs(ryomou.getLogin(), ryomou.getPassword()).resume();
// see its beautiful efficiency statement
String mediaTitle = "My efficiency";
String mediaDesc = "My efficiency statement " + UUID.randomUUID();
UserToolsPage ryomouUserTools = new UserToolsPage(ryomouBrowser);
ryomouUserTools.openUserToolsMenu().openMyEfficiencyStatement().assertOnEfficiencyStatmentPage().assertOnStatement(courseTitle, true).addAsMediaInList(courseTitle).fillEfficiencyStatementMedia(mediaTitle, mediaDesc);
MediaCenterPage mediaCenter = ryomouUserTools.openUserToolsMenu().openPortfolioV2().openMediaCenter();
mediaCenter.assertOnMedia(mediaTitle).selectMedia(mediaTitle).assertOnMediaDetails(mediaTitle);
}
use of org.olat.selenium.page.course.AssessmentCEConfigurationPage in project openolat by klemens.
the class PortfolioV2Test method binderAssessment.
/**
* This is a long test. It's test the whole process to assess a binder from
* the template create by the author, to the assessment value saved in the
* assessment tool of the course.<br>
* The author creates a portfolio template with 2 sections and 2 assignments,
* it creates a course with a portfolio element and bind the template to it. It
* add a user as participant.<br>
* The participant starts the course, pick the binder and do every assignment.
* It edits the sharing settings to add the author as a coach.<br>
* The author assesses the sections and set the binder as done. Than it goes
* to the course, opens the assessment tool and check the participant passed
* the binder.
*
* @param loginPage
* @param reiBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void binderAssessment(@InitialPage LoginPage loginPage, @Drone @User WebDriver reiBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO rei = new UserRestClient(deploymentUrl).createRandomUser("rei");
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
String binderTitle = "Binder to assess " + UUID.randomUUID();
navBar.openAuthoringEnvironment().createPortfolioBinder(binderTitle).clickToolbarBack();
// create a binder template with 2 sections and
// an assignment in each
String section1Title = "Section 1 " + UUID.randomUUID();
String assignment1Title = "Assignment 1 " + UUID.randomUUID();
String section2Title = "Section 2 " + UUID.randomUUID();
String assignment2Title = "Assignment 2 " + UUID.randomUUID();
BinderPage binderTemplate = new BinderPage(browser);
binderTemplate.assertOnBinder().selectTableOfContent().deleteSection().selectEntries().createSectionInEntries(section1Title).createAssignmentForSection(section1Title, assignment1Title, "Write a small summary", "Your task is...").assertOnAssignmentInEntries(assignment1Title).createSection(section2Title).createAssignmentForSection(section2Title, assignment2Title, "Second part to do", "you have to work").assertOnAssignmentInEntries(assignment2Title);
// create a course
String courseTitle = "ASPF Course " + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String portfolioNodeTitle = "Template-ASPF-v2";
// create a course element of type portfolio and choose the one we created above
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
courseEditor.createNode("ep").nodeTitle(portfolioNodeTitle).selectTabLearnContent().choosePortfolio(binderTitle);
// configure the assessment
AssessmentCEConfigurationPage assessmentConfig = new AssessmentCEConfigurationPage(browser);
assessmentConfig.selectConfiguration().setScoreAuto(0.0f, 10.0f, 5.0f);
courseEditor.publish().quickPublish(UserAccess.membersOnly);
MembersPage membersPage = courseEditor.clickToolbarBack().members();
membersPage.importMembers().setMembers(rei).nextUsers().nextOverview().nextPermissions().finish();
// Participant log in
LoginPage reiLoginPage = LoginPage.getLoginPage(reiBrowser, deploymentUrl);
reiLoginPage.loginAs(rei).resume();
// open the course
NavigationPage reiNavBar = new NavigationPage(reiBrowser);
reiNavBar.openMyCourses().select(courseTitle);
// go to the portfolio course element
CoursePageFragment reiTestCourse = new CoursePageFragment(reiBrowser);
reiTestCourse.clickTree().selectWithTitle(portfolioNodeTitle);
PortfolioElementPage portfolioCourseEl = new PortfolioElementPage(reiBrowser);
BinderPage reiBinder = portfolioCourseEl.pickPortfolio().goToPortfolioV2();
OOGraphene.waitAndCloseBlueMessageWindow(reiBrowser);
reiBinder.selectEntries().pickAssignment(assignment1Title).publishEntry();
reiBinder.selectEntries().pickAssignment(assignment2Title).publishEntry();
// add the author as coach
reiBinder.selectPublish().openAccessMenu().addMember().searchMember(author, false).nextUsers().nextOverview().fillAccessRights(binderTitle, Boolean.TRUE).nextPermissions().deSelectEmail().finish();
// the author come to see the binder
UserToolsPage userTools = new UserToolsPage(browser);
PortfolioV2HomePage portfolio = userTools.openUserToolsMenu().openPortfolioV2();
portfolio.openSharedWithMe().openSharedBindersWithMe().assertOnBinder(binderTitle).selectBinder(binderTitle).selectAssessment().passed(section1Title).save().close(section1Title).passed(section2Title).save().close(section2Title).done().assertPassed(2);
// than go to the course and check the results in the assessment tool
// author take the lead and check the assessment tool
navBar.openMyCourses().select(courseTitle);
// open the assessment tool
AssessmentToolPage assessmentTool = new CoursePageFragment(browser).assessmentTool();
// check that rei has passed the test
assessmentTool.users().assertOnUsers(rei).selectUser(rei).assertPassed(rei);
}
Aggregations