Index: lams_tool_task/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/conf/language/lams/ApplicationResources.properties,v diff -u -r1.18 -r1.19 --- lams_tool_task/conf/language/lams/ApplicationResources.properties 2 Jun 2008 04:49:14 -0000 1.18 +++ lams_tool_task/conf/language/lams/ApplicationResources.properties 3 Jun 2008 01:44:37 -0000 1.19 @@ -80,30 +80,28 @@ error.msg.repository =Repository occurs exception while trying to upload file. error.msg.default.content.not.find =Could not retrieve default content record for this tool. warning.msg.authoring.deletion.affect.conditions =Deletion of this item may affect existing conditions. Do you want to proceed? -label.learning.title =Task List Learning +label.learning.title =Task List Learner label.learning.tasks.to.do =Tasks to do label.learning.new.task.details =New task details: label.learning.check.for.new =Check for new label.learning.comment.or.instruction =Comment/Instruction label.learning.required.tasks =required tasks -label.learning.wait.for.monitor.verification =To finish wait for Monitor verification +label.learning.wait.for.monitor.verification =You cannot finish this activity until it is reviewed by your teacher. Click "Check for new" to see if the review is complete label.learning.responses.locked =Note: After you click on "Next Activity" and you come back to this Task List, you won't be able to change the status of any tasks. -label.learning.responses.locked.reminder =The instructor has set this activity not to allow editing after you have finished it. As you are returning to this Task List again, you are able to see all Tasks but not allow to edit them anymore. +label.learning.responses.locked.reminder =The instructor has set this activity to not allow changes after you have finished it. You are able to see all Tasks, but not allowed to change them anymore. label.learning.info.comment.and.attachment.required =You are required to post a comment and upload an attachment to complete this task. -label.learning.info.post.comment.required =You are required to post a comment to complete this task. -label.learning.info.upload.attachment.required =You are required to upload an attachment to complete this task. -label.learning.notification.you.must.complete.tasks.1 =You should complete at least -label.learning.notification.you.must.complete.tasks.2 =more tasks. -lable.learning.minimum.view.number.less =You should complete at least {0} more tasks. +label.learning.info.add.comment.required =You are required to add a comment to complete this task +label.learning.info.upload.file.required =You are required to upload a file to complete this task +lable.learning.minimum.view.number =You need to complete at least {0} task(s). You have completed {1} task(s). label.preview.upload.file =Upload file label.preview.upload.button =Upload label.preview.filelist =File list label.preview.comments =Comments -label.preview.leave.your.comment =Leave your comment +label.preview.add.comment =Add comment label.preview.post =Post lable.preview.by =By monitoring.tab.summary =Summary -monitoring.tab.statistics =Statistic +monitoring.tab.statistics =Statistics monitoring.tab.instructions =Instruction monitoring.tab.edit.activity =Edit Activity monitoring.label.title =Title @@ -116,7 +114,7 @@ label.monitoring.edit.activity.edit =Edit label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.user =User -label.monitoring.summary.complete.activity =Complete Activity? +label.monitoring.summary.confirm.completion =Confirm Completion label.monitoring.summary.title.reflection =Notebook Entry label.monitoring.summary.reflection =Notebook Entry label.monitoring.tasksummary.task.summary =Task Summary Index: lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.17 -r1.18 --- lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties 2 Jun 2008 04:49:14 -0000 1.17 +++ lams_tool_task/conf/language/lams/ApplicationResources_en_AU.properties 3 Jun 2008 01:44:37 -0000 1.18 @@ -65,30 +65,28 @@ error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File. error.msg.repository =Repository occurs exception while trying to upload file. error.msg.default.content.not.find =Could not retrieve default content record for this tool. -label.learning.title =Task List Learning +label.learning.title =Task List Learner label.learning.tasks.to.do =Tasks to do label.learning.new.task.details =New task details: label.learning.check.for.new =Check for new label.learning.comment.or.instruction =Description label.learning.required.tasks =required tasks -label.learning.wait.for.monitor.verification =To finish wait for Monitor verification +label.learning.wait.for.monitor.verification =You cannot finish this activity until it is reviewed by your teacher. Click "Check for new" to see if the review is complete label.learning.responses.locked =Note: After you click on "Next Activity" and you come back to this Task List, you won't be able to change the status of any tasks. -label.learning.responses.locked.reminder =The instructor has set this activity not to allow editing after you have finished it. As you are returning to this Task List again, you are able to see all Tasks but not allow to edit them anymore. +label.learning.responses.locked.reminder =The instructor has set this activity to not allow changes after you have finished it. You are able to see all Tasks, but not allowed to change them anymore. label.learning.info.comment.and.attachment.required =You are required to post a comment and upload an attachment to complete this task. -label.learning.info.post.comment.required =You are required to post a comment to complete this task. -label.learning.info.upload.attachment.required =You are required to upload an attachment to complete this task. -label.learning.notification.you.must.complete.tasks.1 =You should complete at least -label.learning.notification.you.must.complete.tasks.2 =more tasks. -lable.learning.minimum.view.number.less =You should complete at least {0} more tasks. +label.learning.info.add.comment.required =You are required to add a comment to complete this task +label.learning.info.upload.file.required =You are required to upload a file to complete this task +lable.learning.minimum.view.number =You need to complete at least {0} task(s). You have completed {1} task(s). label.preview.upload.file =Upload file label.preview.upload.button =Upload label.preview.filelist =File list label.preview.comments =Comments -label.preview.leave.your.comment =Leave your comment +label.preview.add.comment =Add comment label.preview.post =Post lable.preview.by =By monitoring.tab.summary =Summary -monitoring.tab.statistics =Statistic +monitoring.tab.statistics =Statistics monitoring.tab.instructions =Instruction monitoring.tab.edit.activity =Edit Activity monitoring.label.title =Title @@ -103,7 +101,7 @@ label.monitoring.edit.activity.edit =Edit label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.user =User -label.monitoring.summary.complete.activity =Complete Activity? +label.monitoring.summary.confirm.completion =Confirm Completion label.monitoring.summary.title.reflection =Notebook Entry label.monitoring.summary.reflection =Notebook Entry label.monitoring.tasksummary.task.summary =Task Summary Index: lams_tool_task/conf/language/rams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/conf/language/rams/Attic/ApplicationResources.properties,v diff -u -r1.12 -r1.13 --- lams_tool_task/conf/language/rams/ApplicationResources.properties 2 Jun 2008 04:49:14 -0000 1.12 +++ lams_tool_task/conf/language/rams/ApplicationResources.properties 3 Jun 2008 01:44:34 -0000 1.13 @@ -80,30 +80,28 @@ error.msg.repository =Repository occurs exception while trying to upload file. error.msg.default.content.not.find =Could not retrieve default content record for this tool. warning.msg.authoring.deletion.affect.conditions =Deletion of this item may affect existing conditions. Do you want to proceed? -label.learning.title =Task List Learning +label.learning.title =Task List Learner label.learning.tasks.to.do =Tasks to do label.learning.new.task.details =New task details: label.learning.check.for.new =Check for new label.learning.comment.or.instruction =Comment/Instruction label.learning.required.tasks =required tasks -label.learning.wait.for.monitor.verification =To finish wait for monitor verification +label.learning.wait.for.monitor.verification =You cannot finish this activity until it is reviewed by your teacher. Click "Check for new" to see if the review is complete label.learning.responses.locked =Note: After you click on "Next Activity" and you come back to this Task List, you won't be able to change the status of any tasks. -label.learning.responses.locked.reminder =The instructor has set this activity not to allow editing after you have finished it. As you are returning to this Task List again, you are able to see all Tasks but not allow to edit them anymore. +label.learning.responses.locked.reminder =The instructor has set this activity to not allow changes after you have finished it. You are able to see all Tasks, but not allowed to change them anymore. label.learning.info.comment.and.attachment.required =You are required to post a comment and upload an attachment to complete this task. -label.learning.info.post.comment.required =You are required to post a comment to complete this task. -label.learning.info.upload.attachment.required =You are required to upload an attachment to complete this task. -label.learning.notification.you.must.complete.tasks.1 =You should complete at least -label.learning.notification.you.must.complete.tasks.2 =more tasks. -lable.learning.minimum.view.number.less =You should complete at least {0} more tasks. +label.learning.info.add.comment.required =You are required to add a comment to complete this task +label.learning.info.upload.file.required =You are required to upload a file to complete this task +lable.learning.minimum.view.number =You need to complete at least {0} task(s). You have completed {1} task(s). label.preview.upload.file =Upload file label.preview.upload.button =Upload label.preview.filelist =File list label.preview.comments =Comments -label.preview.leave.your.comment =Leave your comment +label.preview.add.comment =Add comment label.preview.post =Post lable.preview.by =By monitoring.tab.summary =Summary -monitoring.tab.statistics =Statistic +monitoring.tab.statistics =Statistics monitoring.tab.instructions =Instruction monitoring.tab.edit.activity =Edit Activity monitoring.label.title =Title @@ -116,7 +114,7 @@ label.monitoring.edit.activity.edit =Edit label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.user =User -label.monitoring.summary.complete.activity =Complete Activity? +label.monitoring.summary.confirm.completion =Confirm Completion label.monitoring.summary.title.reflection =Reflection label.monitoring.summary.reflection =Reflection label.monitoring.tasksummary.task.summary =Task Summary Index: lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/conf/language/rams/Attic/ApplicationResources_en_AU.properties,v diff -u -r1.12 -r1.13 --- lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties 2 Jun 2008 04:49:14 -0000 1.12 +++ lams_tool_task/conf/language/rams/ApplicationResources_en_AU.properties 3 Jun 2008 01:44:34 -0000 1.13 @@ -80,30 +80,28 @@ error.msg.repository =Repository occurs exception while trying to upload file. error.msg.default.content.not.find =Could not retrieve default content record for this tool. warning.msg.authoring.deletion.affect.conditions =Deletion of this item may affect existing conditions. Do you want to proceed? -label.learning.title =Task List Learning +label.learning.title =Task List Learner label.learning.tasks.to.do =Tasks to do label.learning.new.task.details =New task details: label.learning.check.for.new =Check for new label.learning.comment.or.instruction =Comment/Instruction label.learning.required.tasks =required tasks -label.learning.wait.for.monitor.verification =To finish wait for monitor verification +label.learning.wait.for.monitor.verification =You cannot finish this activity until it is reviewed by your teacher. Click "Check for new" to see if the review is complete label.learning.responses.locked =Note: After you click on "Next Activity" and you come back to this Task List, you won't be able to change the status of any tasks. -label.learning.responses.locked.reminder =The instructor has set this activity not to allow editing after you have finished it. As you are returning to this Task List again, you are able to see all Tasks but not allow to edit them anymore. +label.learning.responses.locked.reminder =The instructor has set this activity to not allow changes after you have finished it. You are able to see all Tasks, but not allowed to change them anymore. label.learning.info.comment.and.attachment.required =You are required to post a comment and upload an attachment to complete this task. -label.learning.info.post.comment.required =You are required to post a comment to complete this task. -label.learning.info.upload.attachment.required =You are required to upload an attachment to complete this task. -label.learning.notification.you.must.complete.tasks.1 =You should complete at least -label.learning.notification.you.must.complete.tasks.2 =more tasks. -lable.learning.minimum.view.number.less =You should complete at least {0} more tasks. +label.learning.info.add.comment.required =You are required to add a comment to complete this task +label.learning.info.upload.file.required =You are required to upload a file to complete this task +lable.learning.minimum.view.number =You need to complete at least {0} task(s). You have completed {1} task(s). label.preview.upload.file =Upload file label.preview.upload.button =Upload label.preview.filelist =File list label.preview.comments =Comments -label.preview.leave.your.comment =Leave your comment +label.preview.add.comment =Add comment label.preview.post =Post lable.preview.by =By monitoring.tab.summary =Summary -monitoring.tab.statistics =Statistic +monitoring.tab.statistics =Statistics monitoring.tab.instructions =Instruction monitoring.tab.edit.activity =Edit Activity monitoring.label.title =Title @@ -116,7 +114,7 @@ label.monitoring.edit.activity.edit =Edit label.monitoring.summary.overall.summary =Overall Summary label.monitoring.summary.user =User -label.monitoring.summary.complete.activity =Complete Activity? +label.monitoring.summary.confirm.completion =Confirm Completion label.monitoring.summary.title.reflection =Reflection label.monitoring.summary.reflection =Reflection label.monitoring.tasksummary.task.summary =Task Summary Index: lams_tool_task/db/model/taskList.clay =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/db/model/taskList.clay,v diff -u -r1.11 -r1.12 Binary files differ Index: lams_tool_task/db/sql/create_lams_tool_taskList.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/db/sql/create_lams_tool_taskList.sql,v diff -u -r1.14 -r1.15 --- lams_tool_task/db/sql/create_lams_tool_taskList.sql 2 Jun 2008 03:59:34 -0000 1.14 +++ lams_tool_task/db/sql/create_lams_tool_taskList.sql 3 Jun 2008 01:44:34 -0000 1.15 @@ -46,7 +46,7 @@ content_id bigint unique, lock_when_finished tinyint, is_sequential_order tinyint, - minimum_number_tasks_complete integer, + minimum_number_tasks integer, allow_contribute_tasks tinyint, is_monitor_verification_required tinyint, reflect_instructions varchar(255), @@ -148,7 +148,7 @@ INSERT INTO `tl_latask10_taskList` (`uid`, `create_date`, `update_date`, `create_by`, `title`, `run_offline`, `instructions`, `online_instructions`, `offline_instructions`, `content_in_use`, `define_later`, `content_id`, `lock_when_finished`, - `minimum_number_tasks_complete`, `is_sequential_order`, `allow_contribute_tasks`, `is_monitor_verification_required`, + `minimum_number_tasks`, `is_sequential_order`, `allow_contribute_tasks`, `is_monitor_verification_required`, `reflect_on_activity`) VALUES (1,NULL,NULL,NULL,'Task List','0','Instructions ',null,null,0,0,${default_content_id},0,0,0,0,0,0); Index: lams_tool_task/db/sql/table-schema.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/db/sql/table-schema.sql,v diff -u -r1.9 -r1.10 --- lams_tool_task/db/sql/table-schema.sql 23 May 2008 10:49:12 -0000 1.9 +++ lams_tool_task/db/sql/table-schema.sql 3 Jun 2008 01:44:34 -0000 1.10 @@ -27,7 +27,7 @@ create table tl_latask10_item_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, taskList_uid bigint, create_by bigint, primary key (uid)); create table tl_latask10_item_comment (uid bigint not null auto_increment, comment text, taskList_item_uid bigint, create_by bigint, create_date datetime, primary key (uid)); create table tl_latask10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, taskList_uid bigint, session_id bigint, session_name varchar(250), primary key (uid)); -create table tl_latask10_taskList (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), run_offline bit, instructions text, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, content_id bigint unique, lock_when_finished bit, allow_contribute_tasks bit, minimum_number_tasks_complete integer, is_monitor_verification_required bit, is_sequential_order bit, reflect_instructions varchar(255), reflect_on_activity bit, primary key (uid)); +create table tl_latask10_taskList (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), run_offline bit, instructions text, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, content_id bigint unique, lock_when_finished bit, allow_contribute_tasks bit, minimum_number_tasks integer, is_monitor_verification_required bit, is_sequential_order bit, reflect_instructions varchar(255), reflect_on_activity bit, primary key (uid)); create table tl_latask10_taskList_item (uid bigint not null auto_increment, description text, init_item varchar(255), organization_xml text, title varchar(255), create_by bigint, create_date datetime, create_by_author bit, sequence_id integer, is_required bit, is_comments_allowed bit, is_comments_required bit, is_files_allowed bit, is_files_required bit, is_comments_files_allowed bit, show_comments_to_all bit, is_child_task bit, parent_task_name varchar(255), taskList_uid bigint, session_uid bigint, primary key (uid)); create table tl_latask10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), first_name varchar(255), login_name varchar(255), session_uid bigint, taskList_uid bigint, session_finished bit, is_verified_by_monitor bit, primary key (uid)); Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/model/TaskList.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/model/Attic/TaskList.hbm.xml,v diff -u -r1.3 -r1.4 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/model/TaskList.hbm.xml 23 May 2008 10:49:12 -0000 1.3 +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/model/TaskList.hbm.xml 3 Jun 2008 01:44:34 -0000 1.4 @@ -209,11 +209,11 @@ /> onlineFileList; private List offlineFileList; - private int numberTasksToComplete; + private String minimumNumberTasksErrorStr; /** * Default contructor. @@ -657,18 +657,18 @@ * * @return the minimum number of tasks needed to be completed to finish this activity * - * @hibernate.property column="minimum_number_tasks_complete" + * @hibernate.property column="minimum_number_tasks" */ - public int getMinimumNumberTasksComplete() { - return minimumNumberTasksComplete; + public int getMinimumNumberTasks() { + return minimumNumberTasks; } /** * Sets the minimum number of tasks needed to be completed to finish this activity. * * @param numberTasksToComplete the minimum number of tasks needed to be completed to finish this activity */ - public void setMinimumNumberTasksComplete(int minimumNumberTasksComplete) { - this.minimumNumberTasksComplete = minimumNumberTasksComplete; + public void setMinimumNumberTasks(int minimumNumberTasks) { + this.minimumNumberTasks = minimumNumberTasks; } /** @@ -721,16 +721,16 @@ * @return the number of tasks needed to be completed to finish this activity * */ - public int getNumberTasksToComplete() { - return numberTasksToComplete; + public String getMinimumNumberTasksErrorStr() { + return minimumNumberTasksErrorStr; } /** * Sets the number of tasks needed to be completed to finish this activity. * * @param numberTasksToComplete the number of tasks needed to be completed to finish this activity */ - public void setNumberTasksToComplete(int numberTasksToComplete) { - this.numberTasksToComplete = numberTasksToComplete; + public void setMinimumNumberTasksErrorStr(String minimumNumberTasksErrorStr) { + this.minimumNumberTasksErrorStr = minimumNumberTasksErrorStr; } } Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java,v diff -u -r1.18 -r1.19 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java 30 May 2008 09:13:33 -0000 1.18 +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/ITaskListService.java 3 Jun 2008 01:44:37 -0000 1.19 @@ -45,6 +45,7 @@ import org.lamsfoundation.lams.tool.taskList.model.TaskListItemAttachment; import org.lamsfoundation.lams.tool.taskList.model.TaskListSession; import org.lamsfoundation.lams.tool.taskList.model.TaskListUser; +import org.lamsfoundation.lams.util.MessageService; /** * Interface that defines the contract that all TaskLisk service providers must follow. @@ -125,6 +126,13 @@ */ TaskListItemAttachment uploadTaskListItemFile(FormFile uploadFile, String fileType, TaskListUser user) throws UploadTaskListFileException; + /** + * Returns Message service. It makes available to have access to message resources files. + * + * @return MessageService + */ + MessageService getMessageService(); + //********** for user methods ************* /** * Create a new user in database. @@ -288,15 +296,6 @@ String finishToolSession(Long toolSessionId, Long userId) throws TaskListException; /** - * Checks how many tasks more user should complete to be able to finish this activity. - * - * @param toolSessionId - * @param userUid - * @return - */ - int checkMinimumNumberTasksComplete(Long toolSessionId, Long userUid); - - /** * Create refection entry into notebook tool. * * @param sessionId Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java,v diff -u -r1.20 -r1.21 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java 30 May 2008 09:13:33 -0000 1.20 +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/service/TaskListServiceImpl.java 3 Jun 2008 01:44:37 -0000 1.21 @@ -311,8 +311,8 @@ TaskListSession session = taskListSessionDao.getSessionBySessionId(sessionId); //to skip CGLib problem Long contentId = session.getTaskList().getContentId(); - TaskList res = taskListDao.getByContentId(contentId); - return res; + TaskList taskList = taskListDao.getByContentId(contentId); + return taskList; } /** @@ -394,23 +394,7 @@ taskListItemVisitDao.saveObject(log); } } - - /** - * {@inheritDoc} - */ - public int checkMinimumNumberTasksComplete(Long toolSessionId, Long userUid) { - int completedItems = taskListItemVisitDao.getTasksCompletedCountByUser(toolSessionId, userUid); - TaskListSession session = taskListSessionDao.getSessionBySessionId(toolSessionId); - if(session == null){ - log.error("Failed get session by ID [" + toolSessionId + "]"); - return 0; - } - int minimumNumberTasksComplete = session.getTaskList().getMinimumNumberTasksComplete(); - - return (minimumNumberTasksComplete - completedItems); - } - /** * {@inheritDoc} */ @@ -778,6 +762,10 @@ public void setCoreNotebookService(ICoreNotebookService coreNotebookService) { this.coreNotebookService = coreNotebookService; } + + public MessageService getMessageService() { + return messageService; + } //******************************************************************************* // Methods implementing ToolContentManager, ToolSessionManager Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/AuthoringAction.java,v diff -u -r1.13 -r1.14 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/AuthoringAction.java 23 May 2008 10:49:12 -0000 1.13 +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/AuthoringAction.java 3 Jun 2008 01:44:35 -0000 1.14 @@ -429,8 +429,8 @@ } //if MinimumNumberTasksComplete is bigger than available items, then set it topics size - if(taskListPO.getMinimumNumberTasksComplete() > items.size()) - taskListPO.setMinimumNumberTasksComplete(items.size()); + if(taskListPO.getMinimumNumberTasks() > items.size()) + taskListPO.setMinimumNumberTasks(items.size()); //********************************************** //finally persist taskListPO again Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/LearningAction.java,v diff -u -r1.12 -r1.13 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/LearningAction.java 30 May 2008 09:13:33 -0000 1.12 +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/action/LearningAction.java 3 Jun 2008 01:44:35 -0000 1.13 @@ -287,9 +287,14 @@ } //construct taskList dto field - int numberTasksToComplete = service.checkMinimumNumberTasksComplete(sessionId, taskListUser.getUserId()); - taskList.setNumberTasksToComplete(numberTasksToComplete); + Integer numberCompletedTasks = service.getNumTasksCompletedByUser(sessionId, taskListUser.getUserId()); + Integer minimumNumberTasks = taskList.getMinimumNumberTasks(); + if ((minimumNumberTasks - numberCompletedTasks) > 0) { + String MinimumNumberTasksStr = service.getMessageService().getMessage("lable.learning.minimum.view.number",new Object[]{minimumNumberTasks, numberCompletedTasks}); + taskList.setMinimumNumberTasksErrorStr(MinimumNumberTasksStr); + } + //add define later support if(taskList.isDefineLater()){ return mapping.findForward("defineLater"); @@ -691,13 +696,15 @@ Long userID = new Long(user.getUserID().longValue()); ITaskListService service = getTaskListService(); - int miniViewFlag = service.checkMinimumNumberTasksComplete(sessionId, userID); + + int numberCompletedTasks = service.getNumTasksCompletedByUser(sessionId, userID); + int minimumNumberTasks = service.getTaskListBySessionId(sessionId).getMinimumNumberTasks(); //if current user view less than reqired view count number, then just return error message. //if it is runOffline content, then need not check minimum view count Boolean runOffline = (Boolean) sessionMap.get(TaskListConstants.PARAM_RUN_OFFLINE); - if(miniViewFlag > 0 && !runOffline){ + if((minimumNumberTasks - numberCompletedTasks) > 0 && !runOffline){ ActionErrors errors = new ActionErrors(); - errors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("lable.learning.minimum.view.number.less",miniViewFlag)); + errors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("lable.learning.minimum.view.number",minimumNumberTasks, numberCompletedTasks)); this.addErrors(request,errors); return false; } Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/form/TaskListForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/form/TaskListForm.java,v diff -u -r1.2 -r1.3 --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/form/TaskListForm.java 23 May 2008 10:49:13 -0000 1.2 +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/form/TaskListForm.java 3 Jun 2008 01:44:37 -0000 1.3 @@ -73,7 +73,7 @@ if(!StringUtils.equals(param,"start") && !StringUtils.equals(param,"initPage")){ taskList.setLockWhenFinished(false); taskList.setSequentialOrder(false); - taskList.setMinimumNumberTasksComplete(0); + taskList.setMinimumNumberTasks(0); taskList.setAllowContributeTasks(false); taskList.setMonitorVerificationRequired(false); taskList.setDefineLater(false); Index: lams_tool_task/web/includes/images/dash.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/web/includes/images/dash.gif,v diff -u Binary files differ Index: lams_tool_task/web/pages/authoring/advance.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/web/pages/authoring/advance.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_task/web/pages/authoring/advance.jsp 23 May 2008 10:49:13 -0000 1.2 +++ lams_tool_task/web/pages/authoring/advance.jsp 3 Jun 2008 01:44:38 -0000 1.3 @@ -21,10 +21,10 @@ - + -