Index: lams_tool_wiki/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/conf/language/rams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -25,12 +25,12 @@ button.upload =Upload label.authoring.basic.title =Title: label.authoring.basic.content =Content: -label.authoring.basic.wikipagevisible =Make wiki page editable +label.authoring.basic.wikipagevisible =Make Wiki page editable advanced.lockOnFinished =Lock when finished -advanced.allowLearnerCreatePages =Allow learners to create new wiki pages -advanced.allowLearnerInsertLinks =Allow learners to insert external links into wiki -advanced.allowLearnerAttachImages =Allow learners to attach images to wiki -advanced.reflectOnActivity =Add Notebook at end of forum with the following instructions: +advanced.allowLearnerCreatePages =Allow learners to create new Wiki pages +advanced.allowLearnerInsertLinks =Allow learners to insert external links into Wiki +advanced.allowLearnerAttachImages =Allow learners to attach images to Wiki +advanced.reflectOnActivity =Add Notebook at end of Wiki with the following instructions: advanced.editingLimits =Editing Limits advanced.editingLimits.prompt =Number of times a learner can edit a page advanced.editingLimits.minimum =Minimum: @@ -81,7 +81,7 @@ label.notebookEntry =Notebook entry error.missingParam =Unable to continue. {0} is missing. error.exceedMaxFileSize =File size exceeded -error.exception.NbApplication =An internal error has occured with the wiki Tool. If reporting this error, please report:
{0} +error.exception.NbApplication =An internal error has occurred with the Wiki Tool. If reporting this error, please report:
{0} error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes error.mandatoryField ={0} field is mandatory. @@ -92,26 +92,30 @@ message.learner.blank.input =You have not written anything. Are you sure this is correct? button.finish =Next Activity message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. -message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this wiki, you won't be able to continue editing. -message.activityLocked =The instructor has set this activity not to allow editing after you have finished it. As you are returning to this wiki, you are able to see your wiki but not allowed to edit it. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Wiki, you won't be able to continue editing. +message.activityLocked =The instructor has set this activity not to allow editing after you have finished it. As you are returning to this Wiki, you are able to see your Wiki but not allowed to edit it. +message.minumumEditsNotReached =Note: You have not yet reached the required number of edits, you must complete {0} edits before continuing to the next activity. +message.warnMaxEdits =Note: You are only allowed to do {0} more edits before this Wiki will be locked. After that you wont be able to continue editing. +message.maxEditsReached =You have reached the maximum number of edits for this Wiki activity so it has been locked. +message.pageNotEditable =This page has been set to locked by your instructor, so you cannot edit it. titleHeading.instructions =Instructions label.authoring.basic.instructions =Instructions: label.wiki.body =Wiki Body label.wiki.edit =Edit label.wiki.add =Add -label.wiki.add.title.exists =A wiki page with title "{0}" already exists, please choose a different title. -label.wiki.add.title.required =A title is required for the wiki page. +label.wiki.add.title.exists =A Wiki page with title "{0}" already exists, please choose a different title. +label.wiki.add.title.required =A title is required for the Wiki page. label.wiki.last.edit =Last edited by {0}, at {1} label.wiki.view =View label.wiki.remove =Remove -label.wiki.remove.confirm =Delete entire wiki page? This action cannot be undone. +label.wiki.remove.confirm =Delete entire Wiki page? This action cannot be undone. label.wiki.pages =Wiki Pages label.wiki.main =(Main) label.wiki.savechanges =Save changes -label.wiki.remove.confirm =Are you sure you want to delete this wiki page? This action cannot be undone. +label.wiki.remove.confirm =Are you sure you want to delete this Wiki page? This action cannot be undone. label.wiki.history =History label.wiki.history.version =Version -label.wiki.history.empty =There are no previous versions of this wiki page. +label.wiki.history.empty =There are no previous versions of this Wiki page. label.wiki.history.date =Edit Date label.wiki.history.editor =Edit By label.wiki.history.editor.author =Author @@ -128,6 +132,11 @@ label.on =On label.off =Off monitor.summary.th.advancedSettings =Advanced Settings +monitor.th.sessions =Sessions +monitor.th.numlearners =Number of Learners +monitor.summary.td.addNotebook =Add Notebook at end of Wiki +monitor.summary.td.notebookInstructions =Notebook instructions + #======= End labels: Exported 81 labels for en AU ===== Index: lams_tool_wiki/db/sql/create_lams_tool_wiki.sql =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/db/sql/create_lams_tool_wiki.sql (.../create_lams_tool_wiki.sql) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/db/sql/create_lams_tool_wiki.sql (.../create_lams_tool_wiki.sql) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -8,13 +8,14 @@ drop table if exists tl_lawiki10_wiki_page; drop table if exists tl_lawiki10_wiki_page_content; create table tl_lawiki10_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, wiki_uid bigint, primary key (uid)); -create table tl_lawiki10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), wiki_uid bigint, primary key (uid)); -create table tl_lawiki10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, wiki_session_uid bigint, entry_uid bigint, primary key (uid)); +create table tl_lawiki10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), wiki_uid bigint, wiki_main_page_uid bigint, primary key (uid)); +create table tl_lawiki10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, wiki_session_uid bigint, entry_uid bigint, wiki_edits integer, primary key (uid)); create table tl_lawiki10_wiki (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, allow_learner_create_pages bit, allow_learner_insert_links bit, allow_learner_attach_images bit, reflect_on_activity bit, reflect_instructions text, minimum_edits integer, maximum_edits integer, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, wiki_main_page_uid bigint, primary key (uid)); create table tl_lawiki10_wiki_page (uid bigint not null auto_increment, wiki_uid bigint, title varchar(255), editable bit, wiki_current_content bigint, wiki_session_uid bigint, primary key (uid)); create table tl_lawiki10_wiki_page_content (uid bigint not null auto_increment, wiki_page_uid bigint, body text, editor bigint, edit_date datetime, version bigint, primary key (uid)); alter table tl_lawiki10_attachment add index FK9406D87760B3B03B (wiki_uid), add constraint FK9406D87760B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); alter table tl_lawiki10_session add index FKF01D63C260B3B03B (wiki_uid), add constraint FKF01D63C260B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); +alter table tl_lawiki10_session add index FKF01D63C2A3FF7EC0 (wiki_main_page_uid), add constraint FKF01D63C2A3FF7EC0 foreign key (wiki_main_page_uid) references tl_lawiki10_wiki_page (uid); alter table tl_lawiki10_user add index FKED5D7A1FD8004954 (wiki_session_uid), add constraint FKED5D7A1FD8004954 foreign key (wiki_session_uid) references tl_lawiki10_session (uid); alter table tl_lawiki10_wiki add index FKED5E3E04A3FF7EC0 (wiki_main_page_uid), add constraint FKED5E3E04A3FF7EC0 foreign key (wiki_main_page_uid) references tl_lawiki10_wiki_page (uid); alter table tl_lawiki10_wiki_page add index FK961AFFEAD8004954 (wiki_session_uid), add constraint FK961AFFEAD8004954 foreign key (wiki_session_uid) references tl_lawiki10_session (uid); Index: lams_tool_wiki/db/sql/table-schema.sql =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/db/sql/table-schema.sql (.../table-schema.sql) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/db/sql/table-schema.sql (.../table-schema.sql) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -1,5 +1,6 @@ alter table tl_lawiki10_attachment drop foreign key FK9406D87760B3B03B; alter table tl_lawiki10_session drop foreign key FKF01D63C260B3B03B; +alter table tl_lawiki10_session drop foreign key FKF01D63C2A3FF7EC0; alter table tl_lawiki10_user drop foreign key FKED5D7A1FD8004954; alter table tl_lawiki10_wiki drop foreign key FKED5E3E04A3FF7EC0; alter table tl_lawiki10_wiki_page drop foreign key FK961AFFEAD8004954; @@ -13,18 +14,3 @@ drop table if exists tl_lawiki10_wiki; drop table if exists tl_lawiki10_wiki_page; drop table if exists tl_lawiki10_wiki_page_content; -create table tl_lawiki10_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, wiki_uid bigint, primary key (uid)); -create table tl_lawiki10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), wiki_uid bigint, primary key (uid)); -create table tl_lawiki10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, wiki_session_uid bigint, entry_uid bigint, primary key (uid)); -create table tl_lawiki10_wiki (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, allow_learner_create_pages bit, allow_learner_insert_links bit, allow_learner_attach_images bit, reflect_on_activity bit, reflect_instructions text, minimum_edits integer, maximum_edits integer, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, wiki_main_page_uid bigint, primary key (uid)); -create table tl_lawiki10_wiki_page (uid bigint not null auto_increment, wiki_uid bigint, title varchar(255), editable bit, wiki_current_content bigint, wiki_session_uid bigint, primary key (uid)); -create table tl_lawiki10_wiki_page_content (uid bigint not null auto_increment, wiki_page_uid bigint, body text, editor bigint, edit_date datetime, version bigint, primary key (uid)); -alter table tl_lawiki10_attachment add index FK9406D87760B3B03B (wiki_uid), add constraint FK9406D87760B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); -alter table tl_lawiki10_session add index FKF01D63C260B3B03B (wiki_uid), add constraint FKF01D63C260B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); -alter table tl_lawiki10_user add index FKED5D7A1FD8004954 (wiki_session_uid), add constraint FKED5D7A1FD8004954 foreign key (wiki_session_uid) references tl_lawiki10_session (uid); -alter table tl_lawiki10_wiki add index FKED5E3E04A3FF7EC0 (wiki_main_page_uid), add constraint FKED5E3E04A3FF7EC0 foreign key (wiki_main_page_uid) references tl_lawiki10_wiki_page (uid); -alter table tl_lawiki10_wiki_page add index FK961AFFEAD8004954 (wiki_session_uid), add constraint FK961AFFEAD8004954 foreign key (wiki_session_uid) references tl_lawiki10_session (uid); -alter table tl_lawiki10_wiki_page add index FK961AFFEA60B3B03B (wiki_uid), add constraint FK961AFFEA60B3B03B foreign key (wiki_uid) references tl_lawiki10_wiki (uid); -alter table tl_lawiki10_wiki_page add index FK961AFFEAE48332B4 (wiki_current_content), add constraint FK961AFFEAE48332B4 foreign key (wiki_current_content) references tl_lawiki10_wiki_page_content (uid); -alter table tl_lawiki10_wiki_page_content add index FK528051242D44CCF8 (wiki_page_uid), add constraint FK528051242D44CCF8 foreign key (wiki_page_uid) references tl_lawiki10_wiki_page (uid); -alter table tl_lawiki10_wiki_page_content add index FK528051243233D952 (editor), add constraint FK528051243233D952 foreign key (editor) references tl_lawiki10_user (uid); Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/model/WikiSession.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/model/WikiSession.java (.../WikiSession.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/model/WikiSession.java (.../WikiSession.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -63,6 +63,8 @@ private Set wikiUsers; private Set wikiPages; // Need a runtime copy for each wikiPage + + private WikiPage mainPage; //Need a runtime reference to the main page // Constructors @@ -205,7 +207,20 @@ public void setWikiPages(Set wikiPages) { this.wikiPages = wikiPages; } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="wiki_main_page_uid" + * + */ + public WikiPage getMainPage() { + return mainPage; + } + public void setMainPage(WikiPage mainPage) { + this.mainPage = mainPage; + } + /** * toString * Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/model/WikiUser.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/model/WikiUser.java (.../WikiUser.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/model/WikiUser.java (.../WikiUser.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -40,7 +40,7 @@ /** * */ - private static final long serialVersionUID = -3243742837238907521L; + private static final long serialVersionUID = -534126658843778423L; // Fields private Long uid; @@ -58,6 +58,8 @@ private boolean finishedActivity; private Long entryUID; + + private Integer wikiEdits; // Constructors @@ -72,6 +74,7 @@ this.loginName = user.getLogin(); this.wikiSession = wikiSession; this.finishedActivity = false; + this.wikiEdits = 0; } /** full constructor */ @@ -80,6 +83,7 @@ this.lastName = lastName; this.firstName = firstName; this.wikiSession = wikiSession; + this.wikiEdits = 0; } // Property accessors @@ -176,7 +180,19 @@ public void setEntryUID(Long entryUID) { this.entryUID = entryUID; } + + + /** + * @hibernate.property column="wiki_edits" + */ + public Integer getWikiEdits() { + return wikiEdits; + } + public void setWikiEdits(Integer wikiEdits) { + this.wikiEdits = wikiEdits; + } + /** * toString * Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/IWikiService.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/IWikiService.java (.../IWikiService.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/IWikiService.java (.../IWikiService.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -103,8 +103,10 @@ /** * * @param wikiPageForm + * @param wikiPage + * @param user */ - public void updateWikiPage(WikiPageForm wikiPageForm, Long wikiPageUid, WikiUser user); + public void updateWikiPage(WikiPageForm wikiPageForm, WikiPage wikiPage, WikiUser user); /** * Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/WikiService.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/WikiService.java (.../WikiService.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/service/WikiService.java (.../WikiService.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -167,6 +167,11 @@ newChildPage.setWikiSession(session); newChildPage.getWikiContentVersions().add(newPageContent); + // if childpage is the main page, set the session main page + if (newChildPage.getTitle().equals(wiki.getMainPage().getTitle())) { + session.setMainPage(newChildPage); + } + // Add page to the list sessionWikiPages.add(newChildPage); } @@ -246,6 +251,10 @@ // Clone the current content - leave the history null WikiPageContent newPageContent = (WikiPageContent) childPage.getCurrentWikiContent().clone(); newPageContent.setWikiPage(newChildPage); + // If the edit date is null, set it to now. + if (newPageContent.getEditDate() == null) { + newPageContent.setEditDate(new Date()); + } wikiPageContentDAO.saveOrUpdate(newPageContent); // Set the current content @@ -555,15 +564,13 @@ * learner * * @param wikiPageForm - * @param wikiPageUid + * @param wikiPage * @param user */ - public void updateWikiPage(WikiPageForm wikiPageForm, Long wikiPageUid, WikiUser user) { + public void updateWikiPage(WikiPageForm wikiPageForm, WikiPage wikiPage, WikiUser user) { - // First retrieve the wikipage from the db - WikiPage wikiPage = getWikiPageByUid(wikiPageUid); if (wikiPage == null) { - throw new WikiException("Could not find wiki page to update with uid: " + wikiPageUid.toString()); + throw new WikiException("Could not find wiki page to update"); } // Create a new wiki page content using the wiki page form @@ -582,6 +589,12 @@ wikiPage.getWikiContentVersions().add(wikiPageContent); wikiPage.setEditable(wikiPageForm.getIsEditable()); wikiPageContentDAO.saveOrUpdate(wikiPageContent); + + // Update the user's edits + if (user != null) { + user.setWikiEdits(user.getWikiEdits() + 1); + wikiUserDAO.saveOrUpdate(user); + } } /** @@ -618,6 +631,12 @@ wikiPage.getWikiContentVersions().add(wikiPageContent); wikiPageDAO.saveOrUpdate(wikiPage); + // Update the user's edits + if (user != null) { + user.setWikiEdits(user.getWikiEdits() + 1); + wikiUserDAO.saveOrUpdate(user); + } + return wikiPage.getUid(); } Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/util/WikiConstants.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/util/WikiConstants.java (.../WikiConstants.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/util/WikiConstants.java (.../WikiConstants.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -41,6 +41,10 @@ public static final int MONITORING_SUMMARY_MAX_MESSAGES = 5; // Attribute names + public static final String ATTR_WIKI_DTO = "wikiDTO"; + public static final String ATTR_SESSION_DTO = "sessionDTO"; + public static final String ATTR_CONTENT_FOLDER_ID = "contentFolderID"; + public static final String ATTR_MODE = "mode"; public static final String ATTR_MESSAGE = "message"; public static final String ATTR_SESSION_MAP = "sessionMap"; public static final String ATTR_MAIN_WIKI_PAGE = "mainWikiPage"; @@ -52,6 +56,11 @@ public static final String ATTR_COMPARE_STRING = "compareString"; public static final String ATTR_COMPARE_TITLE = "compareTitle"; public static final String ATTR_COMPARE_VERSIONS = "compareVersions"; + public static final String ATTR_MAX_EDITS_REACHED = "maxEditsReached"; + public static final String ATTR_EDITS_LEFT = "editsLeft"; + public static final String ATTR_MIN_EDITS_REACHED = "minEditsReached"; + public static final String ATTR_FINISHED_ACTIVITY = "finishedActivity"; + public static final String ATTR_CONTENT_EDITAVLE = "contentEditable"; // Parameter names public static final String PARAM_PARENT_PAGE = "parentPage"; Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/AuthoringAction.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -120,8 +120,6 @@ // Set up the authForm. AuthoringForm authForm = (AuthoringForm) form; - // Long currentPageUid = WebUtil.readLongParam(request, - // WikiConstants.ATTR_CURRENT_WIKI, true); Long currentPageUid = authForm.getCurrentWikiPageId(); // set up wikiService @@ -162,6 +160,9 @@ } WikiPageDTO currentPageDTO = new WikiPageDTO(currentWikiPage); request.setAttribute(WikiConstants.ATTR_CURRENT_WIKI, currentPageDTO); + + // Reset the isEditable field for the form + authForm.setIsEditable(currentPageDTO.getEditable()); // Set the current wiki history SortedSet currentWikiPageHistoryDTOs = new TreeSet(); Fisheye: Tag 16b67860ab51e6ba2a8f91220dda61d67334e1b0 refers to a dead (removed) revision in file `lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/IWikiPageAction.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/LearningAction.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/LearningAction.java (.../LearningAction.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/LearningAction.java (.../LearningAction.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -114,14 +114,11 @@ } // set mode, toolSessionID and WikiDTO - request.setAttribute("mode", mode.toString()); + request.setAttribute(WikiConstants.ATTR_MODE, mode.toString()); learningForm.setToolSessionID(toolSessionID); - WikiDTO wikiDTO = new WikiDTO(); - wikiDTO.title = wiki.getTitle(); - wikiDTO.instructions = wiki.getInstructions(); - wikiDTO.lockOnFinish = wiki.isLockOnFinished(); - request.setAttribute("wikiDTO", wikiDTO); + WikiDTO wikiDTO = new WikiDTO(wiki); + request.setAttribute(WikiConstants.ATTR_WIKI_DTO, wikiDTO); // Set the content in use flag. if (!wiki.isContentInUse()) { @@ -141,29 +138,41 @@ } else { wikiUser = getCurrentUser(toolSessionID); } - + + // Set whether user has reached maximum edits + int maxEdits = wiki.getMaximumEdits(); + Boolean maxEditsReached = (maxEdits != 0 && wikiUser.getWikiEdits() >= maxEdits); + request.setAttribute(WikiConstants.ATTR_MAX_EDITS_REACHED, maxEditsReached); + request.setAttribute(WikiConstants.ATTR_EDITS_LEFT, maxEdits - wikiUser.getWikiEdits()); + + + // Set whether user has reached minimum edits + int minEdits = wiki.getMinimumEdits(); + Boolean minEditsReached = (wikiUser.getWikiEdits() >= minEdits); + request.setAttribute(WikiConstants.ATTR_MIN_EDITS_REACHED, minEditsReached); + // Get the wikipages from the session and the main page SortedSet wikiPageDTOs = new TreeSet(); - WikiPage mainPage = null; + //WikiPage mainPage = null; for (WikiPage wikiPage : wikiSession.getWikiPages()) { WikiPageDTO pageDTO = new WikiPageDTO(wikiPage); wikiPageDTOs.add(pageDTO); // Set the main page - if (wikiPage.getTitle().equals(wiki.getMainPage().getTitle())) { - mainPage = wikiPage; - } + // if (wikiPage.getTitle().equals(wiki.getMainPage().getTitle())) { + // mainPage = wikiPage; + //} } request.setAttribute(WikiConstants.ATTR_WIKI_PAGES, wikiPageDTOs); - request.setAttribute(WikiConstants.ATTR_MAIN_WIKI_PAGE, new WikiPageDTO(mainPage)); + request.setAttribute(WikiConstants.ATTR_MAIN_WIKI_PAGE, new WikiPageDTO(wikiSession.getMainPage())); // Set the current wiki page, if there is none, set to the main page WikiPage currentWikiPage = null; if (currentPageUid != null) { currentWikiPage = wikiService.getWikiPageByUid(currentPageUid); } else { - currentWikiPage = mainPage; + currentWikiPage = wikiSession.getMainPage(); } request.setAttribute(WikiConstants.ATTR_CURRENT_WIKI, new WikiPageDTO(currentWikiPage)); @@ -174,20 +183,13 @@ } request.setAttribute(WikiConstants.ATTR_WIKI_PAGE_CONTENT_HISTORY, currentWikiPageHistoryDTOs); - // get any existing wiki entry - /* - * NotebookEntry nbEntry = null; if ( wikiUser != null ) { nbEntry = - * wikiService.getEntry(wikiUser.getEntryUID()); } if (nbEntry != null) { - * learningForm.setEntryText(nbEntry.getEntry()); } - */ - // set readOnly flag. if (mode.equals(ToolAccessMode.TEACHER) || (wiki.isLockOnFinished() && wikiUser.isFinishedActivity())) { - request.setAttribute("contentEditable", false); + request.setAttribute(WikiConstants.ATTR_CONTENT_EDITAVLE, false); } else { - request.setAttribute("contentEditable", true); + request.setAttribute(WikiConstants.ATTR_CONTENT_EDITAVLE, true); } - request.setAttribute("finishedActivity", wikiUser.isFinishedActivity()); + request.setAttribute(WikiConstants.ATTR_FINISHED_ACTIVITY, wikiUser.isFinishedActivity()); return mapping.findForward("wiki"); } Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/MonitoringAction.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -24,22 +24,34 @@ package org.lamsfoundation.lams.tool.wiki.web.actions; +import java.util.SortedSet; +import java.util.TreeSet; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.tool.wiki.dto.WikiDTO; -import org.lamsfoundation.lams.tool.wiki.dto.WikiUserDTO; +import org.lamsfoundation.lams.tool.wiki.dto.WikiPageContentDTO; +import org.lamsfoundation.lams.tool.wiki.dto.WikiPageDTO; +import org.lamsfoundation.lams.tool.wiki.dto.WikiSessionDTO; import org.lamsfoundation.lams.tool.wiki.model.Wiki; +import org.lamsfoundation.lams.tool.wiki.model.WikiPage; +import org.lamsfoundation.lams.tool.wiki.model.WikiPageContent; +import org.lamsfoundation.lams.tool.wiki.model.WikiSession; import org.lamsfoundation.lams.tool.wiki.model.WikiUser; import org.lamsfoundation.lams.tool.wiki.service.IWikiService; import org.lamsfoundation.lams.tool.wiki.service.WikiServiceProxy; +import org.lamsfoundation.lams.tool.wiki.util.WikiConstants; +import org.lamsfoundation.lams.tool.wiki.util.WikiException; +import org.lamsfoundation.lams.tool.wiki.web.forms.AuthoringForm; +import org.lamsfoundation.lams.tool.wiki.web.forms.MonitoringForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.WebUtil; -import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; /** @@ -52,18 +64,22 @@ * @struts.action-forward name="success" path="tiles:/monitoring/main" * @struts.action-forward name="wiki_display" * path="tiles:/monitoring/wiki_display" + * @struts.action-forward name="compareWiki" path="/pages/wiki/compare.jsp" + * @struts.action-forward name="viewWiki" path="/pages/wiki/viewWiki.jsp" * */ -public class MonitoringAction extends LamsDispatchAction implements IWikiPageAction { +public class MonitoringAction extends WikiPageAction { private static Logger log = Logger.getLogger(MonitoringAction.class); public IWikiService wikiService; public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { + HttpServletResponse response) throws Exception { - setupService(); + if (wikiService == null) { + wikiService = WikiServiceProxy.getWikiService(this.getServlet().getServletContext()); + } Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); @@ -72,24 +88,100 @@ Wiki wiki = wikiService.getWikiByContentId(toolContentID); if (wiki == null) { - // TODO error page. + throw new WikiException("Could not find wiki with content id: " + toolContentID); } WikiDTO wikiDT0 = new WikiDTO(wiki); Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true); wikiDT0.setCurrentTab(currentTab); - request.setAttribute("wikiDTO", wikiDT0); - request.setAttribute("contentFolderID", contentFolderID); + request.setAttribute(WikiConstants.ATTR_WIKI_DTO, wikiDT0); + request.setAttribute(WikiConstants.ATTR_CONTENT_FOLDER_ID, contentFolderID); return mapping.findForward("success"); } + protected ActionForward returnToWiki(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response, Long currentWikiPageId) throws Exception { + MonitoringForm monitoringForm = (MonitoringForm) form; + monitoringForm.setCurrentWikiPageId(currentWikiPageId); + return showWiki(mapping, monitoringForm, request, response); + } + + protected WikiUser getCurrentUser(Long toolSessionId) { + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + + // attempt to retrieve user using userId and toolSessionId + WikiUser wikiUser = wikiService.getUserByUserIdAndSessionId(new Long(user.getUserID().intValue()), + toolSessionId); + + if (wikiUser == null) { + WikiSession wikiSession = wikiService.getSessionBySessionId(toolSessionId); + wikiUser = wikiService.createWikiUser(user, wikiSession); + } + + return wikiUser; + } + public ActionForward showWiki(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - setupService(); + + Long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + + if (wikiService == null) { + wikiService = WikiServiceProxy.getWikiService(this.getServlet().getServletContext()); + } + + WikiSession wikiSession = wikiService.getSessionBySessionId(toolSessionId); + WikiSessionDTO sessionDTO = new WikiSessionDTO(wikiSession); + + request.setAttribute(WikiConstants.ATTR_SESSION_DTO, sessionDTO); + + + // Set up the authForm. + MonitoringForm monForm = (MonitoringForm) form; + Long currentPageUid = monForm.getCurrentWikiPageId(); + + // Get the wikipages from the session and the main page + SortedSet wikiPageDTOs = new TreeSet(); + //WikiPage mainPage = null; + for (WikiPage wikiPage : wikiSession.getWikiPages()) { + WikiPageDTO pageDTO = new WikiPageDTO(wikiPage); + + wikiPageDTOs.add(pageDTO); + + // Set the main page + //if (wikiPage.getTitle().equals(wikiSession.getWiki().getMainPage().getTitle())) { + //mainPage = wikiPage; + //} + } + request.setAttribute(WikiConstants.ATTR_WIKI_PAGES, wikiPageDTOs); + request.setAttribute(WikiConstants.ATTR_MAIN_WIKI_PAGE, new WikiPageDTO(wikiSession.getMainPage())); + + // Set the current wiki page, if there is none, set to the main page + WikiPage currentWikiPage = null; + if (currentPageUid != null) { + currentWikiPage = wikiService.getWikiPageByUid(currentPageUid); + } else { + currentWikiPage = wikiSession.getMainPage(); + } + request.setAttribute(WikiConstants.ATTR_CURRENT_WIKI, new WikiPageDTO(currentWikiPage)); + + // Reset the isEditable and newPageIdEditable field for the form + monForm.setIsEditable(currentWikiPage.getEditable()); + monForm.setNewPageIsEditable(true); + + // Set the current wiki history + SortedSet currentWikiPageHistoryDTOs = new TreeSet(); + for (WikiPageContent wikiPageContentHistoryItem : currentWikiPage.getWikiContentVersions()) { + currentWikiPageHistoryDTOs.add(new WikiPageContentDTO(wikiPageContentHistoryItem)); + } + request.setAttribute(WikiConstants.ATTR_WIKI_PAGE_CONTENT_HISTORY, currentWikiPageHistoryDTOs); + + + /* Long uid = new Long(WebUtil.readLongParam(request, "userUID")); WikiUser user = wikiService.getUserByUID(uid); @@ -98,31 +190,9 @@ WikiUserDTO userDTO = new WikiUserDTO(user, entry); request.setAttribute("userDTO", userDTO); + + */ return mapping.findForward("wiki_display"); } - - /** - * set up wikiService - */ - private void setupService() { - if (wikiService == null) { - wikiService = WikiServiceProxy.getWikiService(this.getServlet().getServletContext()); - } - } - - public ActionForward editPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - return null; - } - - public ActionForward addPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - return null; - } - - public ActionForward removePage(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - return null; - } } Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/WikiPageAction.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/WikiPageAction.java (.../WikiPageAction.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/actions/WikiPageAction.java (.../WikiPageAction.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -31,6 +31,7 @@ import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.wiki.dto.WikiPageContentDTO; import org.lamsfoundation.lams.tool.wiki.dto.WikiPageDTO; import org.lamsfoundation.lams.tool.wiki.model.Wiki; @@ -99,16 +100,38 @@ // Set up the wiki form WikiPageForm wikiForm = (WikiPageForm) form; + // Get the current wiki page + WikiPage currentPage = wikiService.getWikiPageByUid(currentPageUid); + // Set up the wiki user if this is a tool session (learner) - Long toolSessionID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true)); + // Also set the editable flag here + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true); WikiUser user = null; if (toolSessionID != null) { user = this.getCurrentUser(toolSessionID); - } + } + // Setting the editable flag based on call origin + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, true); + if (mode == null || mode==ToolAccessMode.TEACHER) + { + // Author/Monitor/Live edit + // If no editable flag came in the form (as in learner), set false + if (wikiForm.getIsEditable() == null) { + wikiForm.setIsEditable(false); + } + } + else + { + // Learner or preview + // If no editable flag came in the form (as in learner), set true + if (wikiForm.getIsEditable() == null) { + wikiForm.setIsEditable(true); + } + } // Updating the wikiPage, setting a null user which indicated this // change was made in author - wikiService.updateWikiPage(wikiForm, currentPageUid, user); + wikiService.updateWikiPage(wikiForm, currentPage, user); // Make sure the current page is set correctly then return to the wiki return returnToWiki(mapping, wikiForm, request, response, currentPageUid); @@ -134,8 +157,11 @@ wikiService = WikiServiceProxy.getWikiService(this.getServlet().getServletContext()); } + // Get the current wiki page + WikiPage currentPage = wikiService.getWikiPageByUid(currentPageUid); + // Set up the wiki user if this is a tool session (learner) - Long toolSessionID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true)); + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true); WikiUser user = null; if (toolSessionID != null) { user = this.getCurrentUser(toolSessionID); @@ -148,10 +174,11 @@ // Set the wiki body in the authform wikiForm.setWikiBody(content.getBody()); + wikiForm.setIsEditable(currentPage.getEditable()); // Updating the wikiPage, setting a null user which indicated this // change was made in author - wikiService.updateWikiPage(wikiForm, currentPageUid, user); + wikiService.updateWikiPage(wikiForm, currentPage, user); return unspecified(mapping, wikiForm, request, response); } @@ -183,8 +210,7 @@ // Get the old wiki content to compare WikiPageContent compareContent = wikiService.getWikiPageContent(revertPageContentVersion); - // String diff = Diff.diff(compareContent.getBody(), - // currentContent.getBody()); + // Do the compariason String diff = wikiService.comparePages(compareContent.getBody(), currentContent.getBody()); request.setAttribute(WikiConstants.ATTR_COMPARE_VERSIONS, compareContent.getVersion().toString() + "-" @@ -253,11 +279,11 @@ String newPageName = WebUtil.readStrParam(request, WikiConstants.ATTR_NEW_PAGE_NAME); - Long toolSessionID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true)); + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true); // get the wiki by either toolContentId or tool session if (toolSessionID == null) { - Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + Long toolContentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); wiki = wikiService.getWikiByContentId(toolContentID); // Get the page to change to @@ -295,21 +321,46 @@ WikiSession session = null; WikiUser user = null; - Long toolSessionID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true)); + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true); + // Set up the authoring form + WikiPageForm wikiForm = (WikiPageForm) form; + // get the wiki by either toolContentId or tool session if (toolSessionID == null) { - Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + Long toolContentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); wiki = wikiService.getWikiByContentId(toolContentID); + // If no editable flag came in the form (as in learner), set true + if (wikiForm.getNewPageIsEditable() == null) { + wikiForm.setNewPageIsEditable(false); + } } else { session = wikiService.getSessionBySessionId(toolSessionID); wiki = session.getWiki(); user = getCurrentUser(toolSessionID); + + } + + // Setting the editable flag based on call origin + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, true); + if (mode == null || mode==ToolAccessMode.TEACHER) + { + // Author/Monitor/Live edit + // If no editable flag came in the form (as in learner), set false + if (wikiForm.getNewPageIsEditable() == null) { + wikiForm.setNewPageIsEditable(false); + } + } + else + { + // Learner or preview + // If no editable flag came in the form (as in learner), set true + if (wikiForm.getNewPageIsEditable() == null) { + wikiForm.setNewPageIsEditable(true); + } + } - // Set up the authoring form - WikiPageForm wikiForm = (WikiPageForm) form; - // inserting the wiki page, null user and session indicates that this // page was saved in author Long currentWikiPageUid = wikiService.insertWikiPage(wikiForm, wiki, user, session); Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/forms/MonitoringForm.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/forms/MonitoringForm.java (.../MonitoringForm.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/forms/MonitoringForm.java (.../MonitoringForm.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -25,8 +25,6 @@ package org.lamsfoundation.lams.tool.wiki.web.forms; -import org.apache.struts.action.ActionForm; - /** * @struts.form name="monitoringForm" */ @@ -42,6 +40,7 @@ Long messageUID; String messageBody; boolean messageHidden; + String mode; public String getMessageBody() { return messageBody; @@ -91,4 +90,11 @@ this.messageHidden = messageHidden; } + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } } Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/forms/WikiPageForm.java =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/forms/WikiPageForm.java (.../WikiPageForm.java) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/forms/WikiPageForm.java (.../WikiPageForm.java) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -46,19 +46,19 @@ private static final long serialVersionUID = 234235265633376356L; - private String title; - private String wikiBody; - private Boolean isEditable; + String title; + String wikiBody; + Boolean isEditable; // Extra params for adding pages - private String newPageTitle; - private String newPageWikiBody; + String newPageTitle; + String newPageWikiBody; - private Long currentWikiPageId; - private String newPageName; - private Boolean newPageIsEditable; + Long currentWikiPageId; + String newPageName; + Boolean newPageIsEditable; - private Long historyPageContentId; + Long historyPageContentId; public WikiPageForm() { } Index: lams_tool_wiki/web/includes/javascript/authoring.js =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/includes/javascript/authoring.js (.../authoring.js) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/includes/javascript/authoring.js (.../authoring.js) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -12,6 +12,18 @@ var tag = document.getElementById("currentTab"); tag.value = tabId; selectTab(tabId); + + // Making sure the save button is shown at the correct time + var finishButtonDiv = document.getElementById("finishButtonDiv"); + var viewDiv = document.getElementById("view"); + if (tabId==1 && viewDiv.style.display=="none") + { + finishButtonDiv.style.display = "none"; + } + else + { + finishButtonDiv.style.display = "block"; + } } function doSubmit(method) { document.authoringForm.dispatch.value = method; Index: lams_tool_wiki/web/includes/javascript/wikiCommon.js =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/includes/javascript/wikiCommon.js (.../wikiCommon.js) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/includes/javascript/wikiCommon.js (.../wikiCommon.js) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -62,6 +62,6 @@ if(compareWindow && compareWindow.open && !compareWindow.closed){ compareWindow.close(); } - compareWindow = window.open(url,'instructions','resizable,width=796,height=570,scrollbars'); + compareWindow = window.open(url,'compareWindow','resizable,width=796,height=570,scrollbars'); compareWindow.window.focus(); } Fisheye: Tag 16b67860ab51e6ba2a8f91220dda61d67334e1b0 refers to a dead (removed) revision in file `lams_tool_wiki/web/includes/jsp/wikiCommon.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wiki/web/pages/authoring/advanced.jsp =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/pages/authoring/advanced.jsp (.../advanced.jsp) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/pages/authoring/advanced.jsp (.../advanced.jsp) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -96,7 +96,7 @@ var min = document.getElementById("minimumEdits").value; var max = document.getElementById("maximumEdits").value; - if (min > max) + if (max > 0 && min > max) { alert(''); minMenu.selectedIndex = max; Index: lams_tool_wiki/web/pages/authoring/basic.jsp =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -154,6 +154,11 @@ + +   + + + @@ -164,35 +169,40 @@
Index: lams_tool_wiki/web/pages/learning/wiki.jsp =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/pages/learning/wiki.jsp (.../wiki.jsp) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/pages/learning/wiki.jsp (.../wiki.jsp) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -41,19 +41,61 @@ --> +
- -
+ + - + +
  @@ -65,9 +107,13 @@ - - + + + + + +
- - - - - - ')" class="button"> + + + + + + + + + + + + + + + + ')" class="button"> + -
@@ -270,44 +326,15 @@
- - - -
- -
-
-
- - +
+ + +
+ +
+
+
+
@@ -323,6 +350,17 @@ document.getElementById("wikiLinks").value = wikiLinkArray.toString(); } + displayMessageDiv(); + function displayMessageDiv() + { + var messageDiv = document.getElementById("messageDiv"); + + if (trim(messageDiv.innerHTML) != "") + { + messageDiv.style.display="block"; + } + } + function doEditOrAdd(dispatch) { Index: lams_tool_wiki/web/pages/monitoring/headItems.jsp =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/pages/monitoring/headItems.jsp (.../headItems.jsp) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/pages/monitoring/headItems.jsp (.../headItems.jsp) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -4,6 +4,9 @@ - + + + + Index: lams_tool_wiki/web/pages/monitoring/summary.jsp =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -1,13 +1,16 @@ <%@ include file="/common/taglibs.jsp"%> + @@ -45,12 +48,12 @@ - + - + @@ -59,64 +62,139 @@ - - - - - - - - - -
-

- ${session.sessionName} -

-
- - - - - - -
- - - ${session.numberOfLearners} -
- - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - -
- - - -
+ + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + +
- ${user.firstName} ${user.lastName} + + - - - - - - - - - - - + + ${dto.reflectInstructions}
-
+ + + + + + + + + + + + + + + + ${dto.minimumEdits} + + + +
+ + + + + + + + ${dto.maximumEdits} + + + + + + + + + + + + + + + + + + + +
+ + + +
+ ${session.sessionName} + + ${session.numberOfLearners} +
+ Index: lams_tool_wiki/web/pages/monitoring/wikiDisplay.jsp =================================================================== diff -u -r1082bdcc357c105126a5641cecc68acfa645b66b -r16b67860ab51e6ba2a8f91220dda61d67334e1b0 --- lams_tool_wiki/web/pages/monitoring/wikiDisplay.jsp (.../wikiDisplay.jsp) (revision 1082bdcc357c105126a5641cecc68acfa645b66b) +++ lams_tool_wiki/web/pages/monitoring/wikiDisplay.jsp (.../wikiDisplay.jsp) (revision 16b67860ab51e6ba2a8f91220dda61d67334e1b0) @@ -1,37 +1,302 @@ <%@ include file="/common/taglibs.jsp"%> - - - - - - - - - - - - + + + +
+
+
+
- - - - -
-

- ${userDTO.firstName} ${userDTO.lastName } -

-
- - - + + + + + + + + + + + + + + + +
+

+ ${sessionDTO.sessionName} +

+
+ + +
+ + + + + + ')" class="button"> + -
- - - -
- - - -
+ +
+

+ ${currentWikiPage.title} +

+
+ + + + + + + + + ${currentWikiPage.currentWikiContentDTO.editorDTO.firstName} ${currentWikiPage.currentWikiContentDTO.editorDTO.lastName} + + + + + + +
+
+
+ ${currentWikiPage.currentWikiContentDTO.body} +
+
+ + + + + + + +
+
+
+ +
+ +
+ + + ${wikiPage.title} + + + +
+
+ +
+ + + + + + + +