use of org.olat.selenium.page.course.AssessmentCEConfigurationPage in project OpenOLAT by OpenOLAT.
the class CourseTest method courseAccessRules.
/**
* An author creates a course with 4 course elements. A folder
* which is visible to group, a forum which is visible to coaches,
* an assessment and an info visible to the students which passed
* the assessment above.<br>
* a student come and checks what it can see, the author make it
* pass the assessment and the student sees the info.
*
* @param loginPage
* @param kanuBrowser
* @param reiBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void courseAccessRules(@InitialPage LoginPage loginPage, @Drone @Student WebDriver reiBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO rei = new UserRestClient(deploymentUrl).createRandomUser("rei");
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course FO " + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
// go the authoring environment to create a forum
String bcTitle = "BC - " + UUID.randomUUID();
String foTitle = "FO - " + UUID.randomUUID();
String msTitle = "MS - " + UUID.randomUUID();
String infoTitle = "Info - " + UUID.randomUUID();
String groupName = "Students";
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
// folder is group protected
courseEditor.createNode("bc").nodeTitle(bcTitle).selectTabVisibility().setGroupCondition().createBusinessGroup(groupName);
// forum is coach exclusive
courseEditor.createNode("fo").nodeTitle(foTitle).selectTabVisibility().setCoachExclusive().save();
// assessment is open
courseEditor.createNode("ms").nodeTitle(msTitle);
// configure assessment
AssessmentCEConfigurationPage assessmentConfig = new AssessmentCEConfigurationPage(browser);
assessmentConfig.selectConfiguration().setScoreAuto(0.0f, 6.0f, 4.0f);
// wiki is assessment dependent
courseEditor.createNode("info").nodeTitle(infoTitle).selectTabVisibility().setAssessmentCondition(1).save();
OOGraphene.scrollTop(browser);
courseEditor.publish().nextSelectNodes().selectAccess(UserAccess.membersOnly).nextAccess().selectCatalog(false).nextCatalog().finish();
courseEditor.clickToolbarBack();
// add a member to the group we create above
MembersPage members = CoursePageFragment.getCourse(browser).members();
members.addMember().searchMember(rei, true).nextUsers().nextOverview().selectGroupAsParticipant(groupName).nextPermissions().finish();
// participant search the course
LoginPage.getLoginPage(reiBrowser, deploymentUrl).loginAs(rei).resume();
NavigationPage reiNavBar = new NavigationPage(reiBrowser);
reiNavBar.openMyCourses().select(courseTitle);
MenuTreePageFragment reiTree = new MenuTreePageFragment(reiBrowser);
reiTree.assertWithTitle(bcTitle.substring(0, 20)).assertWithTitle(msTitle.substring(0, 20)).assertTitleNotExists(foTitle.substring(0, 20)).assertTitleNotExists(infoTitle.substring(0, 20));
// author set assessment to passed
AssessmentToolPage assessmentTool = members.clickToolbarBack().assessmentTool();
assessmentTool.users().assertOnUsers(rei).selectUser(rei).selectCourseNode(msTitle.substring(0, 20)).setAssessmentScore(5.5f).assertUserPassedCourseNode(msTitle.substring(0, 20));
// student can see info
reiTree.selectRoot().assertWithTitle(bcTitle.substring(0, 20)).assertWithTitle(msTitle.substring(0, 20)).assertTitleNotExists(foTitle.substring(0, 20)).assertWithTitle(infoTitle.substring(0, 20));
// author can see all
assessmentTool.clickToolbarRootCrumb().clickTree().assertWithTitle(bcTitle.substring(0, 20)).assertWithTitle(msTitle.substring(0, 20)).assertWithTitle(foTitle.substring(0, 20)).assertWithTitle(infoTitle.substring(0, 20));
}
use of org.olat.selenium.page.course.AssessmentCEConfigurationPage in project OpenOLAT by OpenOLAT.
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 OpenOLAT.
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 klemens.
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 CourseTest method courseAccessRules.
/**
* An author creates a course with 4 course elements. A folder
* which is visible to group, a forum which is visible to coaches,
* an assessment and an info visible to the students which passed
* the assessment above.<br>
* a student come and checks what it can see, the author make it
* pass the assessment and the student sees the info.
*
* @param loginPage
* @param kanuBrowser
* @param reiBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void courseAccessRules(@InitialPage LoginPage loginPage, @Drone @Student WebDriver reiBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO rei = new UserRestClient(deploymentUrl).createRandomUser("rei");
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course FO " + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
// go the authoring environment to create a forum
String bcTitle = "BC - " + UUID.randomUUID();
String foTitle = "FO - " + UUID.randomUUID();
String msTitle = "MS - " + UUID.randomUUID();
String infoTitle = "Info - " + UUID.randomUUID();
String groupName = "Students";
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
// folder is group protected
courseEditor.createNode("bc").nodeTitle(bcTitle).selectTabVisibility().setGroupCondition().createBusinessGroup(groupName);
// forum is coach exclusive
courseEditor.createNode("fo").nodeTitle(foTitle).selectTabVisibility().setCoachExclusive().save();
// assessment is open
courseEditor.createNode("ms").nodeTitle(msTitle);
// configure assessment
AssessmentCEConfigurationPage assessmentConfig = new AssessmentCEConfigurationPage(browser);
assessmentConfig.selectConfiguration().setScoreAuto(0.0f, 6.0f, 4.0f);
// wiki is assessment dependent
courseEditor.createNode("info").nodeTitle(infoTitle).selectTabVisibility().setAssessmentCondition(1).save();
OOGraphene.scrollTop(browser);
courseEditor.publish().nextSelectNodes().selectAccess(UserAccess.membersOnly).nextAccess().selectCatalog(false).nextCatalog().finish();
courseEditor.clickToolbarBack();
// add a member to the group we create above
MembersPage members = CoursePageFragment.getCourse(browser).members();
members.addMember().searchMember(rei, true).nextUsers().nextOverview().selectGroupAsParticipant(groupName).nextPermissions().finish();
// participant search the course
LoginPage.getLoginPage(reiBrowser, deploymentUrl).loginAs(rei).resume();
NavigationPage reiNavBar = new NavigationPage(reiBrowser);
reiNavBar.openMyCourses().select(courseTitle);
MenuTreePageFragment reiTree = new MenuTreePageFragment(reiBrowser);
reiTree.assertWithTitle(bcTitle.substring(0, 20)).assertWithTitle(msTitle.substring(0, 20)).assertTitleNotExists(foTitle.substring(0, 20)).assertTitleNotExists(infoTitle.substring(0, 20));
// author set assessment to passed
AssessmentToolPage assessmentTool = members.clickToolbarBack().assessmentTool();
assessmentTool.users().assertOnUsers(rei).selectUser(rei).selectCourseNode(msTitle.substring(0, 20)).setAssessmentScore(5.5f).assertUserPassedCourseNode(msTitle.substring(0, 20));
// student can see info
reiTree.selectRoot().assertWithTitle(bcTitle.substring(0, 20)).assertWithTitle(msTitle.substring(0, 20)).assertTitleNotExists(foTitle.substring(0, 20)).assertWithTitle(infoTitle.substring(0, 20));
// author can see all
assessmentTool.clickToolbarRootCrumb().clickTree().assertWithTitle(bcTitle.substring(0, 20)).assertWithTitle(msTitle.substring(0, 20)).assertWithTitle(foTitle.substring(0, 20)).assertWithTitle(infoTitle.substring(0, 20));
}
Aggregations