learners)
+ throws GroupingException;
/**
* Get the default group name prefix
@@ -137,22 +138,27 @@
while (iter.hasNext() && !groupFound) {
Group group = (Group) iter.next();
- if ((groupID == null) || groupID.equals(group.getGroupId())) {
+
+ if (groupID == null || groupID.equals(group.getGroupId())) {
+
groupFound = groupID != null;
+
if (group.mayBeDeleted()) {
+
boolean removed = group.getUsers().removeAll(learners);
if (removed) {
- if (Grouper.log.isDebugEnabled()) {
- Grouper.log
- .debug("Removed " + learners.size() + " users from group " + group.getGroupName());
+ if (log.isDebugEnabled()) {
+ log.debug("Removed " + learners.size() + " users from group " + group.getGroupName());
}
}
+
} else {
String error = "Tried to remove a group which cannot be removed (tool sessions probably exist). Group "
+ group + " grouping " + grouping + ". Not removing the group.";
- Grouper.log.error(error);
+ log.error(error);
throw new GroupingException(error);
}
+
}
}
}
@@ -173,8 +179,8 @@
*/
public Group createGroup(Grouping grouping, String name) throws GroupingException {
String trimmedName = name.trim();
- if ((trimmedName == null) || (trimmedName.length() == 0)) {
- Grouper.log.warn("Tried to add a group with no name to grouping " + grouping + ". Not creating group.");
+ if (trimmedName == null || trimmedName.length() == 0) {
+ log.warn("Tried to add a group with no name to grouping " + grouping + ". Not creating group.");
return null;
}
Set emptySet = new HashSet();
@@ -187,24 +193,23 @@
if (newGroup == null) {
// what, still not unique? Okay try sticking a number on the end. Try 5 times then give up
- Grouper.log.warn("Having trouble creating a unique name for a group. Have tried " + trimmedName);
+ log.warn("Having trouble creating a unique name for a group. Have tried " + trimmedName);
int attempt = 1;
- while ((newGroup == null) && (attempt < 5)) {
+ while (newGroup == null && attempt < 5) {
newGroup = Group.createLearnerGroup(grouping, trimmedName + " " + new Integer(attempt).toString(),
emptySet);
}
if (newGroup == null) {
String error = "Unable to create a unique name for a group. Tried 5 variations on " + trimmedName
+ " now giving up.";
- Grouper.log.error(error);
+ log.error(error);
throw new GroupingException(error);
}
}
- if (newGroup != null) {
+ if (newGroup != null)
grouping.getGroups().add(newGroup);
- }
return newGroup;
@@ -237,24 +242,25 @@
if (group.mayBeDeleted()) {
// all okay so we can delete
- if (Grouper.log.isDebugEnabled()) {
- Grouper.log.warn("Deleting group " + group.getGroupName() + " for grouping " + grouping);
+ if (log.isDebugEnabled()) {
+ log.warn("Deleting group " + group.getGroupName() + " for grouping " + grouping);
}
iter.remove();
groupDeleted = true;
} else {
String error = "Tried to remove a group which cannot be removed (tool sessions probably exist). Group "
+ group + " grouping " + grouping + ". Not removing the group.";
- Grouper.log.error(error);
+ log.error(error);
throw new GroupingException(error);
}
}
}
if (!groupDeleted) {
- Grouper.log.warn("Tried to remove a group " + groupID + " but the group does not exist for grouping "
- + grouping + ".");
+ log.warn("Tried to remove a group " + groupID + " but the group does not exist for grouping " + grouping
+ + ".");
}
}
+
}
\ No newline at end of file
Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/RandomGrouper.java
===================================================================
diff -u -r62d0bb09a4512210d42ebd60885c7e1834c0cc5e -rbcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563
--- lams_common/src/java/org/lamsfoundation/lams/learningdesign/RandomGrouper.java (.../RandomGrouper.java) (revision 62d0bb09a4512210d42ebd60885c7e1834c0cc5e)
+++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/RandomGrouper.java (.../RandomGrouper.java) (revision bcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563)
@@ -32,235 +32,236 @@
import org.lamsfoundation.lams.learningdesign.exception.GroupingException;
import org.lamsfoundation.lams.usermanagement.User;
-
/**
- * The random grouping algorithm implementation. It allocates user into the
- * groups according to the attributes accepted from user interface:
- * numberOfGroups
and learnersPerGroup
. If any of
- * these two attribute has be set, the random grouping will be done
- * correspondently.
+ *
+ * The random grouping algorithm implementation. It allocates user into the groups according to the attributes accepted
+ * from user interface: numberOfGroups
and learnersPerGroup
. If any of these two attribute has
+ * be set, the random grouping will be done correspondently.
+ *
*
- * In the case of random grouping by number of groups, the number of groups
- * will be fixed, and learners are evenly allocated into the groups. For
- * example, there are 10 users and numberOfGroups=3
, the number
- * of learners in three groups will 4,3,3. And if there are 1 user and
- * numberOfGroups=3
, all three groups still will be created
- * with learner number 1,0,0.
+ *
+ * In the case of random grouping by number of groups, the number of groups will be fixed, and learners are evenly
+ * allocated into the groups. For example, there are 10 users and numberOfGroups=3
, the number of learners
+ * in three groups will 4,3,3. And if there are 1 user and numberOfGroups=3
, all three groups still will be
+ * created with learner number 1,0,0.
+ *
*
- * In the case of random grouping by learners per group, groups are only
- * created if the total learner number exceeds the existing group capacity.
- * Learners are also evenly allocated into the groups.For example, if there is
- * 5 users and learnerPerGroup=3
, only 2 groups will be created.
+ *
+ * In the case of random grouping by learners per group, groups are only created if the total learner number exceeds the
+ * existing group capacity. Learners are also evenly allocated into the groups.For example, if there is 5 users and
+ * learnerPerGroup=3
, only 2 groups will be created.
*
*
* @author Jacky Fang
- * @since 2005-3-24
+ * @since 2005-3-24
* @version 1.1
*
*/
-public class RandomGrouper extends Grouper implements Serializable
-{
- private static final long serialVersionUID = -3696368461795411181L;
+public class RandomGrouper extends Grouper implements Serializable {
+ private static final long serialVersionUID = -3696368461795411181L;
- private static Logger log = Logger.getLogger(RandomGrouper.class);
-
- //---------------------------------------------------------------------
+ private static Logger log = Logger.getLogger(RandomGrouper.class);
+
+ // ---------------------------------------------------------------------
// Grouping algorithm Implementation Method
- //---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
/**
* Do the grouping for single new learner.
- * @see org.lamsfoundation.lams.learningdesign.Grouper#doGrouping(org.lamsfoundation.lams.learningdesign.Grouping, java.lang.String,org.lamsfoundation.lams.usermanagement.User)
+ *
+ * @see org.lamsfoundation.lams.learningdesign.Grouper#doGrouping(org.lamsfoundation.lams.learningdesign.Grouping,
+ * java.lang.String,org.lamsfoundation.lams.usermanagement.User)
*/
- public void doGrouping(Grouping randomGrouping,String groupName, User learner)
- {
- //convert the single user into a list.
- List learners = new ArrayList();
- learners.add(learner);
- //delegate to do grouping for a list of learners.
- doGrouping(randomGrouping,groupName,learners);
+ @Override
+ public void doGrouping(Grouping randomGrouping, String groupName, User learner) {
+ // convert the single user into a list.
+ List learners = new ArrayList();
+ learners.add(learner);
+ // delegate to do grouping for a list of learners.
+ doGrouping(randomGrouping, groupName, learners);
}
/**
* Do the grouping for a list of new learners.
- * @see org.lamsfoundation.lams.learningdesign.Grouper#doGrouping(org.lamsfoundation.lams.learningdesign.Grouping,java.lang.String, java.util.List)
+ *
+ * @see org.lamsfoundation.lams.learningdesign.Grouper#doGrouping(org.lamsfoundation.lams.learningdesign.Grouping,java.lang.String,
+ * java.util.List)
*/
- public void doGrouping(Grouping randomGrouping, String groupName, List learners)
- {
- //calculate how many new groups needs to be created.
- int numOfGroupsTobeCreated =0;
- if(randomGrouping.getGroups().size()==0)
- numOfGroupsTobeCreated = calculateNumOfNewGroups((RandomGrouping)randomGrouping,
- learners,
- true);
- else
- numOfGroupsTobeCreated = calculateNumOfNewGroups((RandomGrouping)randomGrouping,
- learners,
- false);
- //create new groups
- createGroups((RandomGrouping)randomGrouping, numOfGroupsTobeCreated);
- //join the new learners into these groups.
- joinGroups(randomGrouping, learners);
+ @Override
+ public void doGrouping(Grouping randomGrouping, String groupName, List learners) {
+ // calculate how many new groups needs to be created.
+ int numOfGroupsTobeCreated = 0;
+ if (randomGrouping.getGroups().size() == 0) {
+ numOfGroupsTobeCreated = calculateNumOfNewGroups((RandomGrouping) randomGrouping, learners, true);
+ } else {
+ numOfGroupsTobeCreated = calculateNumOfNewGroups((RandomGrouping) randomGrouping, learners, false);
+ }
+ // create new groups
+ createGroups((RandomGrouping) randomGrouping, numOfGroupsTobeCreated);
+ // join the new learners into these groups.
+ joinGroups(randomGrouping, learners);
}
-
+
/**
- * Need to be able to force a user into a particular group for group based branching in preview.
- * So this is a non-random random. Bleah!
- * @throws GroupingException
- * @see org.lamsfoundation.lams.learningdesign.Grouper#doGrouping(org.lamsfoundation.lams.learningdesign.Grouping,java.lang.Long, java.util.List)
+ * Need to be able to force a user into a particular group for group based branching in preview. So this is a
+ * non-random random. Bleah!
+ *
+ * @throws GroupingException
+ * @see org.lamsfoundation.lams.learningdesign.Grouper#doGrouping(org.lamsfoundation.lams.learningdesign.Grouping,java.lang.Long,
+ * java.util.List)
*/
- public void doGrouping(Grouping randomGrouping,Long groupId, List learners) throws GroupingException
- {
- if ( groupId != null ) {
- Iterator iter = randomGrouping.getGroups().iterator();
- Group selectedGroup = null;
- while (iter.hasNext() && selectedGroup==null) {
- Group group = (Group) iter.next();
- if ( group.getGroupId().equals(groupId) ) {
- selectedGroup = group;
- }
- }
- if ( selectedGroup == null ) {
- String error = "Tried to add users to group "+groupId+" but group cannot be found.";
- log.error(error);
- throw new GroupingException(error);
- }
- selectedGroup.getUsers().addAll(learners);
- } else {
- // normal random !!!
- doGrouping(randomGrouping, (String)null, learners);
- }
+ @Override
+ public void doGrouping(Grouping randomGrouping, Long groupId, List learners) throws GroupingException {
+ if (groupId != null) {
+ Iterator iter = randomGrouping.getGroups().iterator();
+ Group selectedGroup = null;
+ while (iter.hasNext() && (selectedGroup == null)) {
+ Group group = (Group) iter.next();
+ if (group.getGroupId().equals(groupId)) {
+ selectedGroup = group;
+ }
+ }
+ if (selectedGroup == null) {
+ String error = "Tried to add users to group " + groupId + " but group cannot be found.";
+ RandomGrouper.log.error(error);
+ throw new GroupingException(error);
+ }
+ selectedGroup.getUsers().addAll(learners);
+ } else {
+ // normal random !!!
+ doGrouping(randomGrouping, (String) null, learners);
+ }
}
-
- //---------------------------------------------------------------------
+
+ // ---------------------------------------------------------------------
// Helper Methods - doGrouping
- //---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
/**
- * Compute the number of new groups needs to be created based on passed
- * in grouping. It figures out group by number of groups or group by
- * learner per group automatically.
+ * Compute the number of new groups needs to be created based on passed in grouping. It figures out group by number
+ * of groups or group by learner per group automatically.
*
- * @param randomGrouping the grouping we used to group learner
- * @param learners the list of learners need to be grouped
+ * @param randomGrouping
+ * the grouping we used to group learner
+ * @param learners
+ * the list of learners need to be grouped
* @return the number required new group.
*/
- private int calculateNumOfNewGroups(RandomGrouping randomGrouping,
- List learners,
- boolean isInitialization)
- {
- if(randomGrouping.getNumberOfGroups()!=null && randomGrouping.getNumberOfGroups().intValue()>0) {
- return getNewGroupsByNumberOfGroups(randomGrouping, randomGrouping.getNumberOfGroups(), isInitialization);
- } else if(randomGrouping.getLearnersPerGroup()!=null && randomGrouping.getLearnersPerGroup().intValue()>0) {
- return getNewGroupsByLearnerPerGroup(randomGrouping,learners);
- } else {
- log.warn("Random Grouping id="+randomGrouping.getGroupingId()+" is missing both the number of groups and learners per group. Defaulting to two groups.");
- return getNewGroupsByNumberOfGroups(randomGrouping, 2, isInitialization);
- }
+ private int calculateNumOfNewGroups(RandomGrouping randomGrouping, List learners, boolean isInitialization) {
+ if ((randomGrouping.getNumberOfGroups() != null) && (randomGrouping.getNumberOfGroups().intValue() > 0)) {
+ return getNewGroupsByNumberOfGroups(randomGrouping, randomGrouping.getNumberOfGroups(), isInitialization);
+ } else if ((randomGrouping.getLearnersPerGroup() != null)
+ && (randomGrouping.getLearnersPerGroup().intValue() > 0)) {
+ return getNewGroupsByLearnerPerGroup(randomGrouping, learners);
+ } else {
+ RandomGrouper.log.warn("Random Grouping id=" + randomGrouping.getGroupingId()
+ + " is missing both the number of groups and learners per group. Defaulting to two groups.");
+ return getNewGroupsByNumberOfGroups(randomGrouping, 2, isInitialization);
+ }
}
/**
- * Create new groups and insert them into the grouping. Group names
- * are Group 1, Group 2, etc.
- * @param randomGrouping the requested grouping.
- * @param numOfGroupsTobeCreated the number new groups need to be created.
+ * Create new groups and insert them into the grouping. Group names are Group 1, Group 2, etc.
+ *
+ * @param randomGrouping
+ * the requested grouping.
+ * @param numOfGroupsTobeCreated
+ * the number new groups need to be created.
*/
- private void createGroups(RandomGrouping randomGrouping,
- int numOfGroupsTobeCreated)
- {
- String prefix = getPrefix();
- int size = randomGrouping.getGroups().size();
- for(int numCreated=0,groupIndex=size+1;numCreated0?numberOfNewGroups:0;
- }
+ private int getNewGroupsByNumberOfGroups(RandomGrouping randomGrouping, int numberOfGroups,
+ boolean isInitialization) {
+ if (isInitialization) {
+ return numberOfGroups;
+ } else {
+ int numberOfNewGroups = numberOfGroups - randomGrouping.getGroups().size();
+
+ return numberOfNewGroups > 0 ? numberOfNewGroups : 0;
+ }
}
}
Index: lams_common/src/java/org/lamsfoundation/lams/lesson/dao/ILessonDAO.java
===================================================================
diff -u -r41bb651a1488681fd9ca663ead283b47defdc408 -rbcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563
--- lams_common/src/java/org/lamsfoundation/lams/lesson/dao/ILessonDAO.java (.../ILessonDAO.java) (revision 41bb651a1488681fd9ca663ead283b47defdc408)
+++ lams_common/src/java/org/lamsfoundation/lams/lesson/dao/ILessonDAO.java (.../ILessonDAO.java) (revision bcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563)
@@ -47,9 +47,6 @@
*/
Lesson getLesson(Long lessonId);
- /** Get all the lessons in the database. This includes the disabled lessons. */
- List getAllLessons();
-
Lesson getLessonWithJoinFetchedProgress(Long lessonId);
/**
@@ -62,17 +59,6 @@
List getActiveLessonsForLearner(User learner);
/**
- * Gets all lessons that are active for a learner, in a given organisation
- *
- * @param learnerId
- * a User that identifies the learner.
- * @param organisationId
- * the desired organisation .
- * @return a List with all active lessons in it.
- */
- List getActiveLessonsForLearner(Integer learnerId, Integer organisationID);
-
- /**
* Saves or Updates a Lesson.
*
* @param lesson
@@ -106,16 +92,6 @@
List getLessonsCreatedByUser(Integer userID);
/**
- * Gets all lessons in the given organisation, for which this user is in the staff group. Does not return disabled
- * lessons or preview lessons. This is the list of lessons that a user may monitor/moderate/manage.
- *
- * @param user
- * a User that identifies the teacher/staff member.
- * @return a List with all appropriate lessons in it.
- */
- List getLessonsForMonitoring(int userID, int organisationID);
-
- /**
* Returns the all the learners that have started the requested lesson.
*
* @param lessonId
@@ -216,12 +192,4 @@
* @return list of teachers that monitor the lesson which contains the tool with given session ID
*/
List getMonitorsByToolSessionId(Long sessionId);
-
- /**
- * Gets lesson for tools based on toolSessionID
- *
- * @param sessionID
- * @return
- */
- Lesson getLessonFromSessionID(Long toolSessionID);
-}
+}
\ No newline at end of file
Index: lams_common/src/java/org/lamsfoundation/lams/lesson/dao/hibernate/LessonDAO.java
===================================================================
diff -u -r41bb651a1488681fd9ca663ead283b47defdc408 -rbcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563
--- lams_common/src/java/org/lamsfoundation/lams/lesson/dao/hibernate/LessonDAO.java (.../LessonDAO.java) (revision 41bb651a1488681fd9ca663ead283b47defdc408)
+++ lams_common/src/java/org/lamsfoundation/lams/lesson/dao/hibernate/LessonDAO.java (.../LessonDAO.java) (revision bcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563)
@@ -57,6 +57,8 @@
+ "and lesson.startDateTime is not null and lesson.startDateTime < ?";
private final static String COUNT_ACTIVE_LEARNERS = "select count(distinct progress.user.id)" + " from "
+ LearnerProgress.class.getName() + " progress" + " where progress.lesson.id = :lessonId";
+ private final static String LOAD_ACTIVE_LEARNERS = "select distinct progress.user from "
+ + LearnerProgress.class.getName() + " progress where progress.lesson.id = :lessonId";
private final static String FIND_LESSON_FOR_ACTIVITY = "select lesson from " + Lesson.class.getName() + " lesson, "
+ Activity.class.getName() + " activity "
+ " where activity.activityId=:activityId and activity.learningDesign=lesson.learningDesign";
@@ -66,8 +68,6 @@
+ Lesson.STARTED_STATE + " " + "and l.organisation.organisationId = ? " + " order by l.lessonName";
private final static String LESSONS_BY_GROUP = "from " + Lesson.class.getName()
+ " where organisation.organisationId=? and lessonStateId <= 6";
- private final static String LESSON_BY_SESSION_ID = "select lesson from Lesson lesson, ToolSession session where "
- + "session.lesson=lesson and session.toolSessionId=:toolSessionID";
private final static String LOAD_LEARNERS_BY_LESSON = "FROM Lesson AS lesson "
+ "INNER JOIN lesson.lessonClass AS lessonClass INNER JOIN lessonClass.groups AS groups "
@@ -102,12 +102,6 @@
.setFetchMode("learnerProgresses", FetchMode.JOIN).uniqueResult();
}
- /** Get all the lessons in the database. This includes the disabled lessons. */
- @Override
- public List getAllLessons() {
- return loadAll(Lesson.class);
- }
-
/**
* Gets all lessons that are active for a learner.
*
@@ -125,34 +119,12 @@
}
/**
- * Gets all lessons that are active for a learner, in a given organisation
- *
- * @param learnerId
- * a User that identifies the learner.
- * @param organisationId
- * the desired organisation.
- * @return a List with all active lessons in it.
- */
- @Override
- public List getActiveLessonsForLearner(Integer learnerId, Integer organisationId) {
-
- Query query = getSession().getNamedQuery("activeLessons");
- query.setInteger("userId", learnerId);
- query.setInteger("organisationId", organisationId);
- List result = query.list();
- return result;
- }
-
- /**
* @see org.lamsfoundation.lams.lesson.dao.ILessonDAO#getActiveLearnerByLesson(long)
*/
+ @SuppressWarnings("unchecked")
@Override
- public List getActiveLearnerByLesson(long lessonId) {
-
- Query query = getSession().getNamedQuery("activeLearners");
- query.setLong("lessonId", lessonId);
- List result = query.list();
- return result;
+ public List getActiveLearnerByLesson(long lessonId) {
+ return getSession().createQuery(LessonDAO.LOAD_ACTIVE_LEARNERS).setLong("lessonId", lessonId).list();
}
/**
@@ -256,23 +228,6 @@
}
/**
- * Gets all lessons in the given organisation, for which this user is in the staff group. Does not return disabled
- * lessons or preview lessons. This is the list of lessons that a user may monitor/moderate/manage.
- *
- * @param user
- * a User that identifies the teacher/staff member.
- * @return a List with all appropriate lessons in it.
- */
- @Override
- public List getLessonsForMonitoring(int userID, int organisationID) {
- Query query = getSession().getNamedQuery("lessonsForMonitoring");
- query.setInteger("userId", userID);
- query.setInteger("organisationId", organisationID);
- List result = query.list();
- return result;
- }
-
- /**
* Get all the preview lessons more with the creation date before the given date.
*
* @param startDate
@@ -357,16 +312,6 @@
}
/**
- * @see org.lamsfoundation.lams.lesson.dao.ILessonDAO#getLessonDetailsFromSessionID(java.lang.Long)
- */
- @Override
- public Lesson getLessonFromSessionID(Long toolSessionID) {
- Query query = getSession().createQuery(LessonDAO.LESSON_BY_SESSION_ID);
- query.setLong("toolSessionID", toolSessionID);
- return (Lesson) query.uniqueResult();
- }
-
- /**
* Maps users from an organisation with the given role to a boolean value saying whether they participate in the
* given lesson.
*/
Index: lams_common/src/java/org/lamsfoundation/lams/lesson/service/ILessonService.java
===================================================================
diff -u -r41bb651a1488681fd9ca663ead283b47defdc408 -rbcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563
--- lams_common/src/java/org/lamsfoundation/lams/lesson/service/ILessonService.java (.../ILessonService.java) (revision 41bb651a1488681fd9ca663ead283b47defdc408)
+++ lams_common/src/java/org/lamsfoundation/lams/lesson/service/ILessonService.java (.../ILessonService.java) (revision bcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563)
@@ -414,25 +414,6 @@
List getMonitorsByToolSessionId(Long sessionId);
/**
- * Gets all lessons that are active for a learner, in a given organisation
- *
- * @param learnerId
- * a User that identifies the learner.
- * @param organisationId
- * the desired organisation.
- * @return a List with all active lessons in it.
- */
- List getActiveLessonsForLearner(final Integer learnerId, final Integer organisationId);
-
- /**
- * Gets lesson details for tools based on toolSessionID
- *
- * @param sessionID
- * @return
- */
- LessonDetailsDTO getLessonDetailsFromSessionID(Long toolSessionID);
-
- /**
* Check if preceding lessons have been completed and the given lesson is available to the user.
*/
boolean checkLessonReleaseConditions(Long lessonId, Integer learnerId);
Index: lams_common/src/java/org/lamsfoundation/lams/lesson/service/LessonService.java
===================================================================
diff -u -r41bb651a1488681fd9ca663ead283b47defdc408 -rbcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563
--- lams_common/src/java/org/lamsfoundation/lams/lesson/service/LessonService.java (.../LessonService.java) (revision 41bb651a1488681fd9ca663ead283b47defdc408)
+++ lams_common/src/java/org/lamsfoundation/lams/lesson/service/LessonService.java (.../LessonService.java) (revision bcd6ef084d8ebb8cd4fc7198c6a9f1b56ab72563)
@@ -671,20 +671,6 @@
}
@Override
- public List getActiveLessonsForLearner(Integer learnerId, Integer organisationId) {
- return lessonDAO.getActiveLessonsForLearner(learnerId, organisationId);
- }
-
- @Override
- public LessonDetailsDTO getLessonDetailsFromSessionID(Long toolSessionID) {
- Lesson lesson = this.lessonDAO.getLessonFromSessionID(toolSessionID);
- if (lesson != null) {
- return lesson.getLessonDetails();
- }
- return null;
- }
-
- @Override
public boolean checkLessonReleaseConditions(Long lessonId, Integer learnerId) {
Lesson lesson = getLesson(lessonId);
if (lesson != null) {