Index: lams_learning/build.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_learning/build.xml,v
diff -u -r1.24 -r1.24.4.1
--- lams_learning/build.xml 29 Sep 2006 00:56:43 -0000 1.24
+++ lams_learning/build.xml 12 Mar 2007 05:41:17 -0000 1.24.4.1
@@ -236,7 +236,6 @@
-
Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_cy_GB.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2.4.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_de_DE.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_en_AU.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.7.4.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_es_ES.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_it_IT.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_mi_NZ.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2.4.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_sv_SE.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `lams_learning/conf/language/ApplicationResources_vi_VN.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/GroupingAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/GroupingAction.java,v
diff -u -r1.24 -r1.24.4.1
--- lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/GroupingAction.java 8 Nov 2006 06:39:58 -0000 1.24
+++ lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/GroupingAction.java 12 Mar 2007 05:41:18 -0000 1.24.4.1
@@ -48,6 +48,7 @@
import org.lamsfoundation.lams.learningdesign.GroupingActivity;
import org.lamsfoundation.lams.lesson.LearnerProgress;
import org.lamsfoundation.lams.lesson.Lesson;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.web.action.LamsDispatchAction;
import org.lamsfoundation.lams.web.util.AttributeNames;
@@ -184,11 +185,14 @@
if ( grouping != null)
groups.addAll(grouping.getGroups());
- request.setAttribute(GROUPS,groups);
- request.setAttribute(FINISHED_BUTTON,Boolean.TRUE);
+
+ request.setAttribute(GROUPS,groups);
request.setAttribute(LOCAL_FILES,Boolean.FALSE);
request.setAttribute(AttributeNames.PARAM_ACTIVITY_ID, activity.getActivityId());
request.setAttribute(TITLE,activity.getTitle());
+
+ ToolAccessMode mode = WebUtil.readToolAccessModeParam(request,AttributeNames.PARAM_MODE, true);
+ request.setAttribute(FINISHED_BUTTON,new Boolean(mode == null || ! mode.isTeacher()));
return mapping.findForward(SHOW_GROUP);
}
Index: lams_learning/web/main.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_learning/web/main.jsp,v
diff -u -r1.17 -r1.17.2.1
--- lams_learning/web/main.jsp 29 Jan 2007 04:08:03 -0000 1.17
+++ lams_learning/web/main.jsp 12 Mar 2007 05:41:17 -0000 1.17.2.1
@@ -44,7 +44,7 @@
Index: lams_monitoring/build.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/build.xml,v
diff -u -r1.23 -r1.23.2.1
--- lams_monitoring/build.xml 28 Sep 2006 23:29:39 -0000 1.23
+++ lams_monitoring/build.xml 12 Mar 2007 05:37:53 -0000 1.23.2.1
@@ -49,22 +49,17 @@
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
@@ -207,7 +202,7 @@
-
+
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_monitoring/conf/language/ApplicationResources_ar_JO.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_monitoring/conf/language/ApplicationResources_cy_GB.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_monitoring/conf/language/ApplicationResources_en_AU.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_monitoring/conf/language/ApplicationResources_it_IT.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `lams_monitoring/conf/language/ApplicationResources_pt_BR.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_monitoring/conf/language/ApplicationResources_vi_VN.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/IMonitoringService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/IMonitoringService.java,v
diff -u -r1.61 -r1.61.2.1
--- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/IMonitoringService.java 29 Nov 2006 04:02:54 -0000 1.61
+++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/IMonitoringService.java 12 Mar 2007 05:37:51 -0000 1.61.2.1
@@ -165,12 +165,13 @@
* activity will be complete as well.
*
* @param learnerId
+ * @param requesterId the user id of the person requesting the force complete. For security check
* @param lessonId
* @param activityId force complete to this activity(this activity will be force complete as well).
* If null value, force will complete all activities in this lesson.
* @return success message.
*/
- public String forceCompleteLessonByUser(Integer learnerId,long lessonId,Long activityId);
+ public String forceCompleteLessonByUser(Integer learnerId, Integer requesterId, long lessonId,Long activityId);
/**
* Archive the specified lesson. When archived, the data is retained
@@ -243,21 +244,23 @@
* Returns a list of learners participating in the given Lesson
*
* @param lessonID The lesson_id of the Lesson
+ * @param userID The user id of the user requesting the lesson learners
* @return String The requested list in wddx format
*
* @throws IOException
*/
- public String getLessonLearners(Long lessonID)throws IOException;
+ public String getLessonLearners(Long lessonID, Integer userID)throws IOException;
/**
* Returns a list of staff participating in the given Lesson
*
* @param lessonID The lesson_id of the Lesson
+ * @param userID The user id of the user requesting the lesson staff members
* @return String The requested list in wddx format
*
* @throws IOException
*/
- public String getLessonStaff(Long lessonID)throws IOException;
+ public String getLessonStaff(Long lessonID, Integer userID)throws IOException;
/**
@@ -274,10 +277,11 @@
* in a given Lesson.
*
* @param lessonID The lesson_id of the Lesson whose progress information is required
+ * @param userID The user id of the user requesting the progress details
* @return String The requested information in wddx format
* @throws IOException
*/
- public String getAllLearnersProgress(Long lessonID)throws IOException;
+ public String getAllLearnersProgress(Long lessonID, Integer userID)throws IOException;
/**
* This method is called when the user clicks the 'Contribute' tab in the
@@ -305,34 +309,37 @@
* @param lessonID The lesson_id of the Lesson for which the information has
* to be fetched.
* @param activityID The activity_id of the activity for which the URL is required
- * @param userID The user_id of the Learner for whom the URL is being fetched
+ * @param learnerID The user_id of the Learner for whom the URL is being fetched
+ * @param requesterID The user_id of the user who is requesting the url
* @return String The required information in WDDX format
* @throws IOException
* @throws LamsToolServiceException
*/
- public String getLearnerActivityURL(Long lessonID, Long activityID,Integer userID)throws IOException,LamsToolServiceException;
+ public String getLearnerActivityURL(Long lessonID, Long activityID,Integer learnerUserID, Integer requestingUserId)throws IOException,LamsToolServiceException;
/**
* This method returns the define later url for the given activity.
*
* @param lessonID The lesson_id of the Lesson for which the information has
* to be fetched.
* @param activityID The activity_id of the Activity whose URL will be returned
+ * @param userID The user id of the user requesting the url.
* @return String the url
* @throws IOException
*/
- public String getActivityDefineLaterURL(Long lessonID, Long activityID)throws IOException, LamsToolServiceException;
+ public String getActivityDefineLaterURL(Long lessonID, Long activityID, Integer userID)throws IOException, LamsToolServiceException;
/**
* This method returns the monitor url for the given activity
*
* @param lessonID The lesson_id of the Lesson for which the information has
* to be fetched.
* @param activityID The activity_id of the Activity whose URL will be returned
+ * @param userID The user id of the user requesting the url.
* @return String The required information in WDDX format
* @throws IOException
*/
- public String getActivityMonitorURL(Long lessonID, Long activityID, String contentFolderID)throws IOException, LamsToolServiceException;
+ public String getActivityMonitorURL(Long lessonID, Long activityID, String contentFolderID, Integer userID)throws IOException, LamsToolServiceException;
/**
* This method moves the learning design corresponding to the given
Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java,v
diff -u -r1.102.2.2 -r1.102.2.3
--- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java 2 Mar 2007 00:00:28 -0000 1.102.2.2
+++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/service/MonitoringService.java 12 Mar 2007 05:37:52 -0000 1.102.2.3
@@ -454,7 +454,6 @@
// create the lesson class - add all the users in this organisation to the lesson class
// add user as staff
List learnerList = new LinkedList();
- learnerList.add(creator);
Iterator iter = learners.iterator();
while (iter.hasNext()) {
try {
@@ -692,7 +691,7 @@
// if it is a non-grouped Tool Activity, create the tool sessions now
if ( activity.isToolActivity() ) {
ToolActivity toolActivity = (ToolActivity) activityDAO.getActivityByActivityId(activity.getActivityId());
- initToolSessionIfSuitable(toolActivity, requestedLesson);
+ initToolSessionIfSuitable(toolActivity, requestedLesson);
}
//if it is schedule gate, we need to initialize the sheduler for it.
if(activity.getActivityTypeId().intValue() == Activity.SCHEDULE_GATE_ACTIVITY_TYPE) {
@@ -880,9 +879,11 @@
* @throws LamsToolServiceException
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#forceCompleteLessonByUser(Integer,long,long)
*/
- public String forceCompleteLessonByUser(Integer learnerId,long lessonId,Long activityId)
+ public String forceCompleteLessonByUser(Integer learnerId, Integer requesterId, long lessonId,Long activityId)
{
-
+ Lesson lesson = lessonDAO.getLesson(new Long(lessonId));
+ checkOwnerOrStaffMember(requesterId, lesson, "force complete");
+
User learner = (User)baseDAO.find(User.class,learnerId);
LearnerProgress learnerProgress = learnerService.getProgress(learnerId, lessonId);
@@ -948,7 +949,7 @@
log.error("Force complete failed. Learner "+learner+" lessonId "+lessonId+" processing activity "+activity,e);
stopReason = messageService.getMessage(FORCE_COMPLETE_STOP_MESSAGE_GROUPING_ERROR,new Object[]{activity.getTitle()});
}
- learnerService.completeActivity(learner.getUserId(),activity);
+ learnerService.completeActivity(learner.getUserId(),activity,lessonId);
if ( log.isDebugEnabled()) {
log.debug("Grouping activity [" + activity.getActivityId() + "] is completed.");
}
@@ -958,7 +959,7 @@
}
}else{
//if group already exist
- learnerService.completeActivity(learner.getUserId(),activity);
+ learnerService.completeActivity(learner.getUserId(),activity,lessonId);
if ( log.isDebugEnabled()) {
log.debug("Grouping activity [" + activity.getActivityId() + "] is completed.");
}
@@ -968,7 +969,7 @@
GateActivity gate = (GateActivity) activity;
if(learnerService.knockGate(gate,learner,false)){
//the gate is opened, continue to next activity to complete
- learnerService.completeActivity(learner.getUserId(),activity);
+ learnerService.completeActivity(learner.getUserId(),activity,lessonId);
if ( log.isDebugEnabled()) {
log.debug("Gate activity [" + gate.getActivityId() + "] is completed.");
}
@@ -1047,6 +1048,9 @@
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getLessonDetails(java.lang.Long)
*/
public String getLessonDetails(Long lessonID, Integer userID)throws IOException{
+ Lesson lesson = lessonDAO.getLesson(new Long(lessonID));
+ checkOwnerOrStaffMember(userID, lesson, "get lesson deatils");
+
User user = (User)baseDAO.find(User.class,userID);
LessonDetailsDTO dto = lessonService.getLessonDetails(lessonID);
@@ -1073,9 +1077,11 @@
* (non-Javadoc)
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getLessonLearners(java.lang.Long)
*/
- public String getLessonLearners(Long lessonID)throws IOException{
- Vector lessonLearners = new Vector();
+ public String getLessonLearners(Long lessonID, Integer userID)throws IOException{
Lesson lesson = lessonDAO.getLesson(lessonID);
+ checkOwnerOrStaffMember(userID, lesson, "get lesson learners");
+
+ Vector lessonLearners = new Vector();
FlashMessage flashMessage;
if(lesson!=null){
Iterator iterator = lesson.getLessonClass().getLearners().iterator();
@@ -1095,9 +1101,11 @@
* (non-Javadoc)
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getLessonStaff(java.lang.Long)
*/
- public String getLessonStaff(Long lessonID)throws IOException{
- Vector lessonStaff = new Vector();
+ public String getLessonStaff(Long lessonID, Integer userID)throws IOException{
Lesson lesson = lessonDAO.getLesson(lessonID);
+ checkOwnerOrStaffMember(userID, lesson, "get lesson staff");
+
+ Vector lessonStaff = new Vector();
FlashMessage flashMessage;
if(lesson!=null){
Iterator iterator = lesson.getLessonClass().getStaffGroup().getUsers().iterator();
@@ -1125,9 +1133,11 @@
* (non-Javadoc)
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getAllLearnersProgress(java.lang.Long)
*/
- public String getAllLearnersProgress(Long lessonID)throws IOException {
- Vector progressData = new Vector();
+ public String getAllLearnersProgress(Long lessonID, Integer userID)throws IOException {
Lesson lesson = lessonDAO.getLesson(lessonID);
+ checkOwnerOrStaffMember(userID, lesson, "get all learners progress");
+
+ Vector progressData = new Vector();
FlashMessage flashMessage;
if(lesson!=null){
Iterator iterator = lesson.getLearnerProgresses().iterator();
@@ -1194,24 +1204,29 @@
* (non-Javadoc)
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getLearnerActivityURL(java.lang.Long, java.lang.Integer)
*/
- public String getLearnerActivityURL(Long lessonID, Long activityID,Integer userID)throws IOException, LamsToolServiceException{
+ public String getLearnerActivityURL(Long lessonID, Long activityID,Integer learnerUserID, Integer requestingUserId)throws IOException, LamsToolServiceException{
+ Lesson lesson = lessonDAO.getLesson(lessonID);
+ checkOwnerOrStaffMember(requestingUserId, lesson, "get monitoring learner progress url");
+
Activity activity = activityDAO.getActivityByActivityId(activityID);
- User user = (User)baseDAO.find(User.class,userID);
+ User learner = (User)baseDAO.find(User.class,learnerUserID);
- if(activity==null || user==null){
- log.error("getLearnerActivityURL activity or user missing. Activity ID "+activityID+" activity " +activity+" userID "+userID+" user "+user);
-
+ if(activity==null || learner==null){
+ log.error("getLearnerActivityURL activity or user missing. Activity ID "+activityID+" activity " +activity+" userID "+learnerUserID+" user "+learner);
} else if ( activity.isToolActivity() || activity.isSystemToolActivity() ){
- return lamsCoreToolService.getToolLearnerProgressURL(lessonID, activity,user);
+ return lamsCoreToolService.getToolLearnerProgressURL(lessonID, activity,learner);
}
return null;
}
/**
* (non-Javadoc)
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getActivityDefineLaterURL(java.lang.Long)
*/
- public String getActivityDefineLaterURL(Long lessonID, Long activityID)throws IOException, LamsToolServiceException{
- Activity activity = activityDAO.getActivityByActivityId(activityID);
+ public String getActivityDefineLaterURL(Long lessonID, Long activityID, Integer userID)throws IOException, LamsToolServiceException{
+ Lesson lesson = lessonDAO.getLesson(lessonID);
+ checkOwnerOrStaffMember(userID, lesson, "get activity define later url");
+
+ Activity activity = activityDAO.getActivityByActivityId(activityID);
if(activity==null){
log.error("getActivityMonitorURL activity missing. Activity ID "+activityID+" activity " +activity);
@@ -1226,7 +1241,10 @@
* (non-Javadoc)
* @see org.lamsfoundation.lams.monitoring.service.IMonitoringService#getActivityMonitorURL(java.lang.Long)
*/
- public String getActivityMonitorURL(Long lessonID, Long activityID, String contentFolderID)throws IOException, LamsToolServiceException{
+ public String getActivityMonitorURL(Long lessonID, Long activityID, String contentFolderID, Integer userID)throws IOException, LamsToolServiceException{
+ Lesson lesson = lessonDAO.getLesson(lessonID);
+ checkOwnerOrStaffMember(userID, lesson, "get activity define later url");
+
Activity activity = activityDAO.getActivityByActivityId(activityID);
if(activity==null){
Index: lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java,v
diff -u -r1.50 -r1.50.2.1
--- lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java 16 Nov 2006 01:09:25 -0000 1.50
+++ lams_monitoring/src/java/org/lamsfoundation/lams/monitoring/web/MonitoringAction.java 12 Mar 2007 05:37:53 -0000 1.50.2.1
@@ -31,8 +31,8 @@
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
@@ -42,15 +42,15 @@
import org.lamsfoundation.lams.monitoring.service.IMonitoringService;
import org.lamsfoundation.lams.monitoring.service.MonitoringServiceProxy;
import org.lamsfoundation.lams.tool.exception.LamsToolServiceException;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
import org.lamsfoundation.lams.usermanagement.exception.UserAccessDeniedException;
import org.lamsfoundation.lams.util.DateUtil;
import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.util.audit.IAuditService;
import org.lamsfoundation.lams.util.wddx.FlashMessage;
import org.lamsfoundation.lams.web.action.LamsDispatchAction;
-import org.lamsfoundation.lams.web.util.AttributeNames;
import org.lamsfoundation.lams.web.session.SessionManager;
-import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.web.util.AttributeNames;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -550,7 +550,8 @@
try {
long lessonId = WebUtil.readLongParam(request,AttributeNames.PARAM_LESSON_ID);
Integer learnerId = new Integer(WebUtil.readIntParam(request,MonitoringConstants.PARAM_LEARNER_ID));
- String message = monitoringService.forceCompleteLessonByUser(learnerId,lessonId,activityId);
+ Integer requesterId = getUserId();
+ String message = monitoringService.forceCompleteLessonByUser(learnerId,requesterId,lessonId,activityId);
if ( log.isDebugEnabled() ) {
log.debug("Force complete for learner "+learnerId+" lesson "+lessonId+". "+message);
}
@@ -592,7 +593,7 @@
IMonitoringService monitoringService = MonitoringServiceProxy.getMonitoringService(getServlet().getServletContext());
try{
Long lessonID = new Long(WebUtil.readLongParam(request,"lessonID"));
- wddxPacket = monitoringService.getLessonLearners(lessonID);
+ wddxPacket = monitoringService.getLessonLearners(lessonID, getUserId());
}catch (Exception e) {
wddxPacket = handleException(e, "getLessonLearners", monitoringService).serializeMessage();
}
@@ -609,7 +610,7 @@
IMonitoringService monitoringService = MonitoringServiceProxy.getMonitoringService(getServlet().getServletContext());
try{
Long lessonID = new Long(WebUtil.readLongParam(request,"lessonID"));
- wddxPacket = monitoringService.getLessonStaff(lessonID);
+ wddxPacket = monitoringService.getLessonStaff(lessonID, getUserId());
}catch (Exception e) {
wddxPacket = handleException(e, "getLessonStaff", monitoringService).serializeMessage();
}
@@ -642,7 +643,7 @@
IMonitoringService monitoringService = MonitoringServiceProxy.getMonitoringService(getServlet().getServletContext());
try{
Long lessonID = new Long(WebUtil.readLongParam(request,"lessonID"));
- wddxPacket = monitoringService.getAllLearnersProgress(lessonID);
+ wddxPacket = monitoringService.getAllLearnersProgress(lessonID, getUserId());
}catch (Exception e) {
wddxPacket = handleException(e, "getAllLearnersProgress", monitoringService).serializeMessage();
}
@@ -670,17 +671,22 @@
return null;
}
- /** Calls the server to bring up the learner progress page. Assumes destination is a new window */
+ /** Calls the server to bring up the learner progress page.
+ * Assumes destination is a new window. The userid that comes from
+ * Flash is the user id of the learner for which we are calculating
+ * the url. This is different to all the other calls.
+ */
public ActionForward getLearnerActivityURL(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)throws IOException,LamsToolServiceException{
+
IMonitoringService monitoringService = MonitoringServiceProxy.getMonitoringService(getServlet().getServletContext());
- Integer userID = getUserId();
+ Integer learnerUserID = new Integer(WebUtil.readIntParam(request,"userID"));
Long activityID = new Long(WebUtil.readLongParam(request,"activityID"));
Long lessonID = new Long(WebUtil.readLongParam(request,AttributeNames.PARAM_LESSON_ID));
- String url = monitoringService.getLearnerActivityURL(lessonID,activityID,userID);
+ String url = monitoringService.getLearnerActivityURL(lessonID,activityID,learnerUserID,getUserId());
return redirectToURL(mapping, response, url);
}
/** Calls the server to bring up the activity's monitoring page. Assumes destination is a new window */
@@ -692,7 +698,7 @@
Long activityID = new Long(WebUtil.readLongParam(request,"activityID"));
Long lessonID = new Long(WebUtil.readLongParam(request,AttributeNames.PARAM_LESSON_ID));
String contentFolderID = WebUtil.readStrParam(request, "contentFolderID");
- String url = monitoringService.getActivityMonitorURL(lessonID,activityID,contentFolderID);
+ String url = monitoringService.getActivityMonitorURL(lessonID,activityID,contentFolderID,getUserId());
return redirectToURL(mapping, response, url);
}
@@ -705,7 +711,7 @@
Long activityID = new Long(WebUtil.readLongParam(request,"activityID"));
Long lessonID = new Long(WebUtil.readLongParam(request,AttributeNames.PARAM_LESSON_ID));
- String url = monitoringService.getActivityDefineLaterURL(lessonID,activityID);
+ String url = monitoringService.getActivityDefineLaterURL(lessonID,activityID,getUserId());
return redirectToURL(mapping, response, url);
}
Index: lams_monitoring/test/java/org/lamsfoundation/lams/monitoring/service/TestMonitoringService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/test/java/org/lamsfoundation/lams/monitoring/service/Attic/TestMonitoringService.java,v
diff -u -r1.43 -r1.43.2.1
--- lams_monitoring/test/java/org/lamsfoundation/lams/monitoring/service/TestMonitoringService.java 29 Nov 2006 04:03:17 -0000 1.43
+++ lams_monitoring/test/java/org/lamsfoundation/lams/monitoring/service/TestMonitoringService.java 12 Mar 2007 05:37:52 -0000 1.43.2.1
@@ -246,19 +246,19 @@
System.out.print(packet);
}
public void testGetLessonLearners() throws IOException{
- String packet = monitoringService.getLessonLearners(TEST_LESSION_ID);
+ String packet = monitoringService.getLessonLearners(TEST_LESSION_ID,TEST_STAFF_ID);
System.out.println(packet);
}
public void testGetLessonDesign()throws IOException{
String packet = monitoringService.getLearningDesignDetails(TEST_LESSION_ID);
System.out.println(packet);
}
public void testGetAllLearnersProgress() throws IOException{
- String packet = monitoringService.getAllLearnersProgress(TEST_LESSION_ID);
+ String packet = monitoringService.getAllLearnersProgress(TEST_LESSION_ID,TEST_STAFF_ID);
System.out.println(packet);
}
public void testGetLearnerActivityURL() throws Exception{
- String url = monitoringService.getLearnerActivityURL(TEST_LESSION_ID, new Long(29),TEST_LEARNER_ID);
+ String url = monitoringService.getLearnerActivityURL(TEST_LESSION_ID, new Long(29),TEST_LEARNER_ID,TEST_STAFF_ID);
System.out.println(url);
}
public void testGellAllContributeActivities()throws IOException, LearningDesignProcessorException{