Index: lams_tool_kaltura/.classpath =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/.classpath,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/.classpath 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/.cvsignore =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/.cvsignore,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/.cvsignore 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1 @@ +build Index: lams_tool_kaltura/.project =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/.project,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/.project 15 Nov 2012 14:45:15 -0000 1.1 @@ -0,0 +1,49 @@ + + + lams_tool_kaltura + + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + com.ibm.etools.validation.validationbuilder + + + + + com.ibm.sse.model.structuredbuilder + + + + + com.genuitec.eclipse.hibernate.HibernateBuilder + + + + + + com.genuitec.eclipse.hibernate.hibernatenature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + + Index: lams_tool_kaltura/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/build.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/build.properties 15 Nov 2012 14:45:15 -0000 1.1 @@ -0,0 +1,7 @@ +# Minimum compatible version of server +min.server.version.number=2.0 + +signature=lakalt11 +tool.version=20121018 +tool.hide=false +tool.short.name=kaltura Index: lams_tool_kaltura/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/build.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/build.xml 15 Nov 2012 14:45:15 -0000 1.1 @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/.settings/com.genuitec.eclipse.j2eedt.core.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/.settings/Attic/com.genuitec.eclipse.j2eedt.core.prefs,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/.settings/com.genuitec.eclipse.j2eedt.core.prefs 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,2 @@ +defaultTldInfo=http\://java.sun.com/jsp/jstl/core\=c;http\://java.sun.com/jsp/jstl/sql\=sql;html\=http\://struts.apache.org/tags-html;c\=http\://java.sun.com/jsp/jstl/core;fmt\=http\://java.sun.com/jsp/jstl/fmt;h\=http\://java.sun.com/jsf/html;nested\=http\://struts.apache.org/tags-nested;http\://struts.apache.org/tags-html\=html;http\://java.sun.com/jsp/jstl/fmt\=fmt;bean\=http\://struts.apache.org/tags-bean;http\://java.sun.com/jsp/jstl/functions\=fn;fn\=http\://java.sun.com/jsp/jstl/functions;logic\=http\://struts.apache.org/tags-logic;http\://struts.apache.org/tags-nested\=nested;http\://java.sun.com/jsp/jstl/xml\=x;f\=http\://java.sun.com/jsf/core;tiles\=http\://struts.apache.org/tags-tiles;http\://java.sun.com/jsf/html\=h;http\://struts.apache.org/tags-tiles\=tiles;http\://java.sun.com/jsf/core\=f;http\://struts.apache.org/tags-bean\=bean;x\=http\://java.sun.com/jsp/jstl/xml;sql\=http\://java.sun.com/jsp/jstl/sql;http\://struts.apache.org/tags-logic\=logic +eclipse.preferences.version=1 Index: lams_tool_kaltura/.settings/org.eclipse.core.resources.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/.settings/Attic/org.eclipse.core.resources.prefs,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/.settings/org.eclipse.core.resources.prefs 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,3 @@ +#Wed Jul 25 16:59:24 EEST 2012 +eclipse.preferences.version=1 +encoding//conf/xdoclet/web-settings.xml=UTF-8 Index: lams_tool_kaltura/.settings/org.eclipse.jdt.ui.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/.settings/Attic/org.eclipse.jdt.ui.prefs,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/.settings/org.eclipse.jdt.ui.prefs 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,3 @@ +#Thu Mar 23 13:45:11 EST 2006 +eclipse.preferences.version=1 +internal.default.compliance=default Index: lams_tool_kaltura/conf/hibernate/mappings/hibernate.cfg.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/hibernate/mappings/hibernate.cfg.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/hibernate/mappings/hibernate.cfg.xml 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + @db.username@ + @db.password@ + @db.url.run@ + @db.driver@ + org.hibernate.dialect.MySQLDialect +true +true +true + + \ No newline at end of file Index: lams_tool_kaltura/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/language/lams/ApplicationResources.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/language/lams/ApplicationResources.properties 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,12 @@ +appName = notebook +#language code: en +#locale code: AU + + # CVS ID: $Id: ApplicationResources.properties,v 1.1 2012/11/15 14:39:31 andreyb Exp $ Exported from the LAMS Community by Ernie Ghiglione on Thu Aug 30 09:17:50 CST 2012 + +#=================== labels for Notebook =================# + + + + +#======= End labels: Exported 113 labels for en AU ===== Index: lams_tool_kaltura/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/language/lams/ApplicationResources_en_AU.properties 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,170 @@ +appName = kaltura +#language code: en +#locale code: AU + + # CVS ID: $Id: ApplicationResources_en_AU.properties,v 1.1 2012/11/15 14:39:31 andreyb Exp $ Exported from the LAMS Community by Ernie Ghiglione on Thu Aug 30 09:17:50 CST 2012 + +#=================== labels for Notebook =================# + +tool.display.name =Kaltura +tool.description =Kaltura Tool +activity.title =Kaltura +activity.description =Kaltura Tool +activity.helptext =Notebook for notes and reflections +pageTitle.authoring =Kaltura Authoring +button.basic =Basic +button.advanced =Advanced +button.instructions =Instructions +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +label.authoring.basic.instructions =Instructions: +label.authoring.basic.video =Video: +advanced.lockOnFinished =Lock when finished +advanced.allowSeeingOtherUsersRecordings =Allow leaners to see each other recordings +advanced.allowComments =Allow comments +advanced.allowRatings =Allow ratings +instructions.onlineInstructions =Online Instructions: +instructions.offlineInstructions =Offline Instructions: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Kaltura +message.defineLaterSet =Please wait for the instructor to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Kaltura Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.contentInUseSet =Modification of content is not allowed since one or more learners has attempted the activity. +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Kaltura Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.finish =Next Activity +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +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 Kaltura Tool. If reporting this error, please report:
{0} +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +error.defineLater =Sorry, the activity is not ready yet. Please wait for the instructor 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. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Kaltura, you won't be able to continue adding notes. +message.activityLocked =The instructor has set this activity not to allow notes after you have finished it. As you are returning to this Kaltura, you are able to see your notes but not allowed to add more. +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +button.conditions =Conditions +textsearch.excluded.words =has none of these unwanted words: +label.authoring.heading.instructions.desc =Please enter conditions +label.authoring.heading.conditions =Conditions +label.authoring.conditions.add.condition =Add condition +label.authoring.conditions.list.title =Conditions +label.authoring.conditions.order =Order +label.authoring.conditions.empty.condition.list =There are no conditions +label.authoring.conditions.condition.name =Name +label.authoring.edit.conditions.button =Edit conditions +label.authoring.up =Up +label.authoring.down =Down +label.authoring.edit =Edit +error.condition.name.blank =Condition name can not be blank. +error.condition.duplicated.name =Duplicated name. Please choose unique one. +error.condition =Error creating condition. +output.desc.text.search.output.definition.notebook =Entry contains certain words +text.search.output.definition.notebook.default.condition =Entry contains word "LAMS" +textsearch.heading =Entry that... +textsearch.all.words =has all these words: +textsearch.phrase =has this exact wording or phrase: +textsearch.any.words =has one or more of these words: +monitor.summary.date.restriction =Date and time restriction +monitor.summary.when.date.restriction.is.set =If a date and time restriction is set, learners will not be able to write an entry after this date. +monitor.summary.after.date =Date and time: +monitor.summary.set.restriction =Set restriction +monitor.summary.unset.restriction =Remove restriction +authoring.info.teacher.set.restriction =The instructor has set a restriction to this activity from {0} onwards. +monitor.summary.notification =Notification +monitor.summary.date.restriction.set =Deadline has been set +monitor.summary.date.restriction.removed =Deadline has been removed +output.desc.all.users.entries.definition.notebook =Each student's entry in Kaltura +export.toolExportNotSupported =This tool does not support export portfolio. +label.kaltura.server.not.configured = LAMS does not have a Kaltura server configured. Please contact your system administrator. +error.there.was.error =Sorry, there was an error +error.processing.video =An error occurred processing this video. Please, reupload it. +label.video.list =Video list: +label.authoring.item =Item +label.item.title =Title +label.item.preview =Preview +warning.msg.authoring.do.you.want.to.delete =Do you really want to delete this item? +label.close =Close +advanced.allowContributeVideos =Allow videos +advanced.learnerContributionLimit =Limit learner's contribution to: +advanced.unlimited =Unlimited +label.authoring.basic.delete =Delete +label.authoring.basic.down =Move down +label.authoring.basic.up =Move Up +label.upload.more.video =Upload another video +advanced.reflectOnActivity =Add Notebook at end of Kaltura with the following instructions: +monitor.summary.td.addNotebook =Add Notebook at end of Kaltura +monitor.summary.td.notebookInstructions =Notebook instructions +label.edit =Edit +label.continue =Continue +label.finished =Finished +label.uploaded.by =by {0} +label.uploaded.by.instructor =Instructor +label.rating =Rating: +label.number.of.comments ={0} comments +error.resource.image.comment.blank =Comment can not be blank. +label.check.for.new =Check for new +label.learning.add.new.image =Upload your own +label.learning.comments =Comments +label.learning.post.comment =Comment +label.learning.number.of.votes ={0} / {1} votes +label.learning.by =by +label.select.group.name =Choose the group you would like to monitor +label.hide =Hide +label.show =Show +label.mark =Mark: +label.mark.none =None +label.mark.edit =edit mark +label.hide =Hide +label.unhide =Unhide +label.comment.is.hidden =This comment is hidden. +label.video.is.hidden =This video is hidden. + +#======= End labels: Exported 113 labels for en AU ===== Index: lams_tool_kaltura/conf/middlegen/lams_tool_lakaltura11-prefs.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/middlegen/lams_tool_lakaltura11-prefs.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/middlegen/lams_tool_lakaltura11-prefs.properties 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,128 @@ +# Middlegen Preferences +hibernate.tables.tl_lakalt11_attachment.base-class-name=KalturaAttachment +hibernate.tables.tl_lakalt11_attachment.columns.create_date.columnspecialty=property +hibernate.tables.tl_lakalt11_attachment.columns.create_date.java-name=createDate +hibernate.tables.tl_lakalt11_attachment.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lakalt11_attachment.columns.kaltura_uid.columnspecialty=foreign key +hibernate.tables.tl_lakalt11_attachment.columns.kaltura_uid.java-name=kalturaUid +hibernate.tables.tl_lakalt11_attachment.columns.kaltura_uid.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_attachment.columns.file_name.inctostring=true +hibernate.tables.tl_lakalt11_attachment.columns.file_name.java-name=fileName +hibernate.tables.tl_lakalt11_attachment.columns.file_name.java-type=java.lang.String +hibernate.tables.tl_lakalt11_attachment.columns.file_type.java-name=fileType +hibernate.tables.tl_lakalt11_attachment.columns.file_type.java-type=java.lang.String +hibernate.tables.tl_lakalt11_attachment.columns.file_uuid.columnspecialty=property +hibernate.tables.tl_lakalt11_attachment.columns.file_uuid.incequals=false +hibernate.tables.tl_lakalt11_attachment.columns.file_uuid.inctostring=true +hibernate.tables.tl_lakalt11_attachment.columns.file_uuid.java-name=fileUuid +hibernate.tables.tl_lakalt11_attachment.columns.file_uuid.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_attachment.columns.file_version_id.inctostring=true +hibernate.tables.tl_lakalt11_attachment.columns.file_version_id.java-name=fileVersionId +hibernate.tables.tl_lakalt11_attachment.columns.file_version_id.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_attachment.columns.uid.columnspecialty=key +hibernate.tables.tl_lakalt11_attachment.columns.uid.incequals=true +hibernate.tables.tl_lakalt11_attachment.columns.uid.inctostring=true +hibernate.tables.tl_lakalt11_attachment.columns.uid.java-name=uid +hibernate.tables.tl_lakalt11_attachment.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_attachment.equalshashcode=true +hibernate.tables.tl_lakalt11_attachment.keygenerator=native +hibernate.tables.tl_lakalt11_kaltura.base-class-name=Kaltura +hibernate.tables.tl_lakalt11_kaltura.columns.content_in_use.java-name=contentInUse +hibernate.tables.tl_lakalt11_kaltura.columns.content_in_use.java-type=java.lang.Boolean +hibernate.tables.tl_lakalt11_kaltura.columns.create_by.java-name=createBy +hibernate.tables.tl_lakalt11_kaltura.columns.create_by.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_kaltura.columns.create_date.java-name=createDate +hibernate.tables.tl_lakalt11_kaltura.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lakalt11_kaltura.columns.define_later.java-name=defineLater +hibernate.tables.tl_lakalt11_kaltura.columns.define_later.java-type=java.lang.Boolean +hibernate.tables.tl_lakalt11_kaltura.columns.instructions.inctostring=true +hibernate.tables.tl_lakalt11_kaltura.columns.instructions.java-name=instructions +hibernate.tables.tl_lakalt11_kaltura.columns.instructions.java-type=java.lang.String +hibernate.tables.tl_lakalt11_kaltura.columns.lock_on_finished.java-name=lockOnFinished +hibernate.tables.tl_lakalt11_kaltura.columns.lock_on_finished.java-type=java.lang.Boolean +hibernate.tables.tl_lakalt11_kaltura.columns.offline_instructions.java-name=offlineInstructions +hibernate.tables.tl_lakalt11_kaltura.columns.offline_instructions.java-type=java.lang.String +hibernate.tables.tl_lakalt11_kaltura.columns.online_instructions.java-name=onlineInstructions +hibernate.tables.tl_lakalt11_kaltura.columns.online_instructions.java-type=java.lang.String +hibernate.tables.tl_lakalt11_kaltura.columns.run_offline.java-name=runOffline +hibernate.tables.tl_lakalt11_kaltura.columns.run_offline.java-type=java.lang.Boolean +hibernate.tables.tl_lakalt11_kaltura.columns.title.inctostring=true +hibernate.tables.tl_lakalt11_kaltura.columns.title.java-name=title +hibernate.tables.tl_lakalt11_kaltura.columns.title.java-type=java.lang.String +hibernate.tables.tl_lakalt11_kaltura.columns.tool_content_id.inctostring=true +hibernate.tables.tl_lakalt11_kaltura.columns.tool_content_id.java-name=toolContentId +hibernate.tables.tl_lakalt11_kaltura.columns.tool_content_id.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_kaltura.columns.uid.columnspecialty=key +hibernate.tables.tl_lakalt11_kaltura.columns.uid.incequals=true +hibernate.tables.tl_lakalt11_kaltura.columns.uid.inctostring=true +hibernate.tables.tl_lakalt11_kaltura.columns.uid.java-name=uid +hibernate.tables.tl_lakalt11_kaltura.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_kaltura.columns.update_date.java-name=updateDate +hibernate.tables.tl_lakalt11_kaltura.columns.update_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lakalt11_kaltura.dynamicInsert=false +hibernate.tables.tl_lakalt11_kaltura.equalshashcode=true +hibernate.tables.tl_lakalt11_kaltura.keygenerator=native +hibernate.tables.tl_lakalt11_session.base-class-name=KalturaSession +hibernate.tables.tl_lakalt11_session.columns.kaltura_uid.java-name=kalturaUid +hibernate.tables.tl_lakalt11_session.columns.kaltura_uid.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_session.columns.session_end_date.inctostring=true +hibernate.tables.tl_lakalt11_session.columns.session_end_date.java-name=sessionEndDate +hibernate.tables.tl_lakalt11_session.columns.session_end_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lakalt11_session.columns.session_id.inctostring=true +hibernate.tables.tl_lakalt11_session.columns.session_id.java-name=sessionId +hibernate.tables.tl_lakalt11_session.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_session.columns.session_name.inctostring=true +hibernate.tables.tl_lakalt11_session.columns.session_name.java-name=sessionName +hibernate.tables.tl_lakalt11_session.columns.session_name.java-type=java.lang.String +hibernate.tables.tl_lakalt11_session.columns.session_start_date.inctostring=true +hibernate.tables.tl_lakalt11_session.columns.session_start_date.java-name=sessionStartDate +hibernate.tables.tl_lakalt11_session.columns.session_start_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lakalt11_session.columns.status.inctostring=true +hibernate.tables.tl_lakalt11_session.columns.status.java-name=status +hibernate.tables.tl_lakalt11_session.columns.status.java-type=java.lang.Integer +hibernate.tables.tl_lakalt11_session.columns.uid.columnspecialty=key +hibernate.tables.tl_lakalt11_session.columns.uid.incequals=true +hibernate.tables.tl_lakalt11_session.columns.uid.inctostring=true +hibernate.tables.tl_lakalt11_session.columns.uid.java-name=uid +hibernate.tables.tl_lakalt11_session.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_session.equalshashcode=true +hibernate.tables.tl_lakalt11_session.keygenerator=native +hibernate.tables.tl_lakalt11_user.base-class-name=KalturaUser +hibernate.tables.tl_lakalt11_user.columns.first_name.java-name=firstName +hibernate.tables.tl_lakalt11_user.columns.first_name.java-type=java.lang.String +hibernate.tables.tl_lakalt11_user.columns.last_name.columnspecialty=property +hibernate.tables.tl_lakalt11_user.columns.last_name.java-name=lastName +hibernate.tables.tl_lakalt11_user.columns.last_name.java-type=java.lang.String +hibernate.tables.tl_lakalt11_user.columns.session_id.inctostring=true +hibernate.tables.tl_lakalt11_user.columns.session_id.java-name=sessionId +hibernate.tables.tl_lakalt11_user.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_user.columns.uid.columnspecialty=key +hibernate.tables.tl_lakalt11_user.columns.uid.incequals=true +hibernate.tables.tl_lakalt11_user.columns.uid.inctostring=true +hibernate.tables.tl_lakalt11_user.columns.uid.java-name=uid +hibernate.tables.tl_lakalt11_user.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_user.columns.user_id.inctostring=true +hibernate.tables.tl_lakalt11_user.columns.user_id.java-name=userId +hibernate.tables.tl_lakalt11_user.columns.user_id.java-type=java.lang.Long +hibernate.tables.tl_lakalt11_user.equalshashcode=true +hibernate.tables.tl_lakalt11_user.keygenerator=sequence +relations.tl_lakalt11_kaltura-tl_lakalt11_attachment.tl_lakalt11_attachment-has-tl_lakalt11_kaltura.enabled=true +relations.tl_lakalt11_kaltura-tl_lakalt11_attachment.tl_lakalt11_attachment-has-tl_lakalt11_kaltura.target-many=false +relations.tl_lakalt11_kaltura-tl_lakalt11_attachment.tl_lakalt11_kaltura-has-tl_lakalt11_attachment.enabled=true +relations.tl_lakalt11_kaltura-tl_lakalt11_attachment.tl_lakalt11_kaltura-has-tl_lakalt11_attachment.target-many=true +relations.tl_lakalt11_kaltura-tl_lakalt11_session.tl_lakalt11_kaltura-has-tl_lakalt11_session.enabled=true +relations.tl_lakalt11_kaltura-tl_lakalt11_session.tl_lakalt11_kaltura-has-tl_lakalt11_session.target-many=true +relations.tl_lakalt11_kaltura-tl_lakalt11_session.tl_lakalt11_session-has-tl_lakalt11_kaltura.enabled=true +relations.tl_lakalt11_kaltura-tl_lakalt11_session.tl_lakalt11_session-has-tl_lakalt11_kaltura.target-many=false +relations.tl_lakalt11_session-tl_lakalt11_user.tl_lakalt11_session-has-tl_lakalt11_user.enabled=true +relations.tl_lakalt11_session-tl_lakalt11_user.tl_lakalt11_session-has-tl_lakalt11_user.target-many=true +relations.tl_lakalt11_session-tl_lakalt11_user.tl_lakalt11_user-has-tl_lakalt11_session.enabled=true +relations.tl_lakalt11_session-tl_lakalt11_user.tl_lakalt11_user-has-tl_lakalt11_session.target-many=false +tables.tl_lakalt11_attachment.x=566 +tables.tl_lakalt11_attachment.y=173 +tables.tl_lakalt11_kaltura.x=308 +tables.tl_lakalt11_kaltura.y=176 +tables.tl_lakalt11_session.x=70 +tables.tl_lakalt11_session.y=70 +tables.tl_lakalt11_user.x=460 +tables.tl_lakalt11_user.y=28 Index: lams_tool_kaltura/conf/xdoclet/error-pages.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/error-pages.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/error-pages.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,13 @@ + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + Index: lams_tool_kaltura/conf/xdoclet/filter-mappings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/filter-mappings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/filter-mappings.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,21 @@ + + UrlRewriteFilter + /* + REQUEST + FORWARD + + + + SystemSessionFilter + /* + + + + hibernateFilter + /* + + + + LocaleFilter + /* + Index: lams_tool_kaltura/conf/xdoclet/filters.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/filters.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/filters.xml 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,29 @@ + + UrlRewriteFilter + org.tuckey.web.filters.urlrewrite.UrlRewriteFilter + + + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + coreSessionFactory + + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + Index: lams_tool_kaltura/conf/xdoclet/global-forwards.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/global-forwards.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/global-forwards.xml 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,3 @@ + + + Index: lams_tool_kaltura/conf/xdoclet/listeners.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/listeners.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/listeners.xml 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,11 @@ + + + org.springframework.web.context.ContextLoaderListener + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + Index: lams_tool_kaltura/conf/xdoclet/servlet-mappings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/servlet-mappings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/servlet-mappings.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,20 @@ + + action + *.do + + + + + Connector + /ckeditor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + Index: lams_tool_kaltura/conf/xdoclet/servlets.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/servlets.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/servlets.xml 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,55 @@ + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + + + Connector + net.fckeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + + + + + Attachment Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + kalturaToolContentHandler + + 3 + + + + exportPortfolio + org.lamsfoundation.lams.tool.kaltura.web.servlets.ExportServlet + + Index: lams_tool_kaltura/conf/xdoclet/struts-actions.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/struts-actions.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/struts-actions.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/conf/xdoclet/struts-forms.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/struts-forms.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/struts-forms.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_kaltura/conf/xdoclet/struts-message-resources.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/struts-message-resources.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/struts-message-resources.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1 @@ + Index: lams_tool_kaltura/conf/xdoclet/struts-plugins.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/struts-plugins.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/struts-plugins.xml 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,9 @@ + + + + Index: lams_tool_kaltura/conf/xdoclet/taglibs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/taglibs.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/taglibs.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,89 @@ + + + + + + + tags-bean + /WEB-INF/tlds/struts/struts-bean.tld + + + + tags-html + /WEB-INF/tlds/struts/struts-html.tld + + + + tags-logic + /WEB-INF/tlds/struts/struts-logic.tld + + + + tags-tiles + /WEB-INF/tlds/struts/struts-tiles.tld + + + + tags-bean-el + /WEB-INF/tlds/struts/struts-bean-el.tld + + + tags-html-el + /WEB-INF/tlds/struts/struts-html-el.tld + + + tags-logic-el + /WEB-INF/tlds/struts/struts-logic-el.tld + + + tags-tiles-el + /WEB-INF/tlds/struts/struts-tiles-el.tld + + + + + + + tags-fmt + /WEB-INF/tlds/jstl/fmt.tld + + + + tags-core + /WEB-INF/tlds/jstl/c.tld + + + + tags-function + /WEB-INF/tlds/jstl/fn.tld + + + + tags-xml + /WEB-INF/tlds/jstl/x.tld + + + + + + + tags-permittedTaglibs + /WEB-INF/tlds/jstl/permittedTaglibs.tld + + + + tags-scriptfree + /WEB-INF/tlds/jstl/scriptfree.tld + + + + + + + + tags-lams + /WEB-INF/tlds/lams/lams.tld + + + + Index: lams_tool_kaltura/conf/xdoclet/web-security.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/web-security.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/web-security.xml 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,103 @@ + + + + Secure Content + *.jsp + *.html + *.do + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + + + + Student + LEARNER + + + Student + TEACHER + + + + Can create/modify a learning design + AUTHOR + + + + Can running and monitoring a learning session + MONITOR + + + + Can add/remove users to the system, set up classes of users for sessions + ADMIN + + + + Can add/remove users to the system, set up classes of users for sessions + SYSADMIN + + + + Can create/modify a learning design and edit default tool content + AUTHOR ADMIN + Index: lams_tool_kaltura/conf/xdoclet/web-settings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/conf/xdoclet/web-settings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/conf/xdoclet/web-settings.xml 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,24 @@ + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.kaltura.ApplicationResources + + + + contextClass + org.jboss.spring.factory.VFSXmlWebApplicationContext + + + contextConfigLocation + classpath:/org/lamsfoundation/lams/tool/kaltura/dbupdates/autopatchContext.xml + + + locatorFactorySelector + classpath:/org/lamsfoundation/lams/beanRefContext.xml + + + parentContextKey + context.central + + Index: lams_tool_kaltura/db/model/kaltura_tool.clay =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/model/kaltura_tool.clay,v diff -u Binary files differ Index: lams_tool_kaltura/db/sql/activity_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/sql/activity_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/db/sql/activity_insert.sql 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,80 @@ +-- CVS ID: $Id: activity_insert.sql,v 1.1 2012/11/15 14:39:29 andreyb Exp $ + +INSERT INTO lams_learning_activity +( +activity_ui_id +, description +, title +, help_text +, xcoord +, ycoord +, parent_activity_id +, parent_ui_id +, learning_activity_type_id +, grouping_support_type_id +, apply_grouping_flag +, grouping_id +, grouping_ui_id +, order_id +, define_later_flag +, learning_design_id +, learning_library_id +, create_date_time +, run_offline_flag +, max_number_of_options +, min_number_of_options +, options_instructions +, tool_id +, tool_content_id +, activity_category_id +, gate_activity_level_id +, gate_open_flag +, gate_start_time_offset +, gate_end_time_offset +, gate_start_date_time +, gate_end_date_time +, library_activity_ui_image +, create_grouping_id +, create_grouping_ui_id +, library_activity_id +, language_file +) +VALUES +( +NULL +, 'Kaltura Tool' +, 'Kaltura Tool' +, 'Put some help text here.' +, NULL +, NULL +, NULL +, NULL +, 1 +, 2 +, 0 +, NULL +, NULL +, NULL +, 0 +, NULL +, ${learning_library_id} +, NOW() +, 0 +, NULL +, NULL +, NULL +, ${tool_id} +, NULL +, 6 +, NULL +, NULL +, NULL +, NULL +, NULL +, NULL +, 'tool/lakalt11/images/icon_kaltura.swf' +, NULL +, NULL +, NULL +, 'org.lamsfoundation.lams.tool.kaltura.ApplicationResources' +) Index: lams_tool_kaltura/db/sql/create_lams_tool_kaltura.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/sql/create_lams_tool_kaltura.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/db/sql/create_lams_tool_kaltura.sql 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,180 @@ +-- CVS ID: $Id: create_lams_tool_kaltura.sql,v 1.1 2012/11/15 14:39:29 andreyb Exp $ + +SET FOREIGN_KEY_CHECKS=0; + +DROP TABLE IF EXISTS tl_lakalt11_attachment; +DROP TABLE IF EXISTS tl_lakalt11_kaltura; +DROP TABLE IF EXISTS tl_lakalt11_kaltura_item; +DROP TABLE IF EXISTS tl_lakalt11_comment; +DROP TABLE IF EXISTS tl_lakalt11_rating; +DROP TABLE IF EXISTS tl_lakalt11_item_log; +DROP TABLE IF EXISTS tl_lakalt11_session; +DROP TABLE IF EXISTS tl_lakalt11_user; + +CREATE TABLE tl_lakalt11_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, + kaltura_uid BIGINT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; +CREATE TABLE tl_lakalt11_kaltura ( + 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_contribute_videos BIT, + allow_seeing_other_users_recordings BIT, + learner_contribution_limit integer DEFAULT -1, + allow_comments BIT, + allow_ratings BIT, + online_instructions TEXT, + offline_instructions TEXT, + content_in_use BIT, + define_later BIT, + tool_content_id BIGINT, + submission_deadline DATETIME DEFAULT NULL, + reflect_on_activity BIT, + reflect_instructions TEXT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; +CREATE TABLE tl_lakalt11_kaltura_item ( + uid bigint not null AUTO_INCREMENT, + entry_id VARCHAR(255), + title VARCHAR(255), + duration INTEGER, + create_by BIGINT, + create_date DATETIME, + create_by_author TINYINT, + sequence_id INTEGER, + is_hidden TINYINT, + kaltura_uid BIGINT, + mark BIGINT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; +CREATE TABLE tl_lakalt11_comment ( + uid BIGINT not null AUTO_INCREMENT, + comment TEXT, + kaltura_item_uid BIGINT, + create_by BIGINT, + create_date DATETIME, + is_hidden TINYINT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; +CREATE TABLE tl_lakalt11_rating ( + uid BIGINT not null AUTO_INCREMENT, + rating FLOAT, + kaltura_item_uid BIGINT, + create_by BIGINT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; +CREATE TABLE tl_lakalt11_item_log ( + uid BIGINT not null AUTO_INCREMENT, + access_date DATETIME, + kaltura_item_uid BIGINT, + user_uid BIGINT, + complete TINYINT, + session_id BIGINT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; +CREATE TABLE tl_lakalt11_session ( + uid BIGINT NOT NULL AUTO_INCREMENT, + session_end_date DATETIME, + session_start_date DATETIME, + status INTEGER, + session_id BIGINT, + session_name VARCHAR(250), + kaltura_uid BIGINT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; +CREATE TABLE tl_lakalt11_user ( + uid BIGINT NOT NULL AUTO_INCREMENT, + user_id BIGINT, + last_name VARCHAR(255), + login_name VARCHAR(255), + first_name VARCHAR(255), + finishedActivity BIT, + kaltura_session_uid BIGINT, + kaltura_uid BIGINT, + PRIMARY KEY (uid) +)ENGINE=InnoDB; + +ALTER TABLE tl_lakalt11_kaltura ADD INDEX FK_NEW_174079131_89093BF758092FB (create_by), ADD CONSTRAINT FK_NEW_174079131_89093BF758092FB FOREIGN KEY (create_by) REFERENCES tl_lakalt11_user (uid); +ALTER TABLE tl_lakalt11_attachment ADD INDEX FK_NEW_1533935501_12090F57FC940906 (kaltura_uid), ADD CONSTRAINT FK_NEW_1533935501_12090F57FC940906 FOREIGN KEY (kaltura_uid) REFERENCES tl_lakalt11_kaltura (uid); +ALTER TABLE tl_lakalt11_session ADD INDEX FK_NEW_1533935501_B7C198E2FC940906 (kaltura_uid), ADD CONSTRAINT FK_NEW_1533935501_B7C198E2FC940906 FOREIGN KEY (kaltura_uid) REFERENCES tl_lakalt11_kaltura (uid); +ALTER TABLE tl_lakalt11_user ADD INDEX FK_tl_lakalt11_user_1 (kaltura_session_uid), ADD CONSTRAINT FK_tl_lakalt11_user_1 FOREIGN KEY (kaltura_session_uid) REFERENCES tl_lakalt11_session (uid); +ALTER TABLE tl_lakalt11_user ADD INDEX FK_tl_lakalt11_user_2 (kaltura_uid), ADD CONSTRAINT FK_tl_lakalt11_user_2 FOREIGN KEY (kaltura_uid) REFERENCES tl_lakalt11_kaltura (uid); +ALTER TABLE tl_lakalt11_kaltura_item ADD INDEX FK_tl_lakalt11_item_1 (create_by), ADD CONSTRAINT FK_tl_lakalt11_item_1 FOREIGN KEY (create_by) REFERENCES tl_lakalt11_user (uid); +ALTER TABLE tl_lakalt11_kaltura_item ADD INDEX FK_tl_lakalt11_item_2 (kaltura_uid), ADD CONSTRAINT FK_tl_lakalt11_item_2 FOREIGN KEY (kaltura_uid) REFERENCES tl_lakalt11_kaltura (uid); +ALTER TABLE tl_lakalt11_comment ADD INDEX FK_tl_lakalt11_comment_3 (kaltura_item_uid), ADD CONSTRAINT FK_tl_lakalt11_comment_3 FOREIGN KEY (kaltura_item_uid) REFERENCES tl_lakalt11_kaltura_item (uid); +ALTER TABLE tl_lakalt11_comment ADD INDEX FK_tl_lakalt11_comment_2 (create_by), ADD CONSTRAINT FK_tl_lakalt11_comment_2 FOREIGN KEY (create_by) REFERENCES tl_lakalt11_user (uid); +ALTER TABLE tl_lakalt11_rating ADD INDEX FK_tl_lakalt11_rating_3 (kaltura_item_uid), ADD CONSTRAINT FK_tl_lakalt11_rating_3 FOREIGN KEY (kaltura_item_uid) REFERENCES tl_lakalt11_kaltura_item (uid); +ALTER TABLE tl_lakalt11_rating ADD INDEX FK_tl_lakalt11_rating_2 (create_by), ADD CONSTRAINT FK_tl_lakalt11_rating_2 FOREIGN KEY (create_by) REFERENCES tl_lakalt11_user (uid); +ALTER TABLE tl_lakalt11_item_log ADD INDEX FK_tl_lakalt11_item_log_1 (kaltura_item_uid), ADD CONSTRAINT FK_tl_lakalt11_item_log_1 FOREIGN KEY (kaltura_item_uid) REFERENCES tl_lakalt11_kaltura_item (uid); +ALTER TABLE tl_lakalt11_item_log ADD INDEX FK_tl_lakalt11_item_log_2 (user_uid), ADD CONSTRAINT FK_tl_lakalt11_item_log_2 FOREIGN KEY (user_uid) REFERENCES tl_lakalt11_user (uid); + + +INSERT INTO tl_lakalt11_kaltura ( + uid, + title, + instructions, + online_instructions, + offline_instructions, + tool_content_id, + run_offline, + lock_on_finished, + allow_contribute_videos, + learner_contribution_limit, + content_in_use, + define_later, + allow_seeing_other_users_recordings, + allow_comments, + allow_ratings, + reflect_on_activity) +VALUES( + 1, + "Kaltura Video", + "Instructions", + "", + "", + ${default_content_id}, + 0, + 0, + 1, + -1, + 0, + 0, + 1, + 1, + 1, + 0 +); + +INSERT INTO tl_lakalt11_kaltura_item ( + entry_id, + title, + duration, + create_date, + create_by_author, + sequence_id, + is_hidden, + kaltura_uid) +VALUES( + "1_aepj00r4", + "Kaltura Video Tutorial", + 60, + NOW(), + 1, + 1, + 0, + 1 +); + +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_kaltura/db/sql/db_version_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/sql/db_version_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/db/sql/db_version_insert.sql 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,2 @@ +-- $Id: db_version_insert.sql,v 1.1 2012/11/15 14:39:29 andreyb Exp $ +INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F'); Index: lams_tool_kaltura/db/sql/drop_lams_tool_kaltura.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/sql/drop_lams_tool_kaltura.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/db/sql/drop_lams_tool_kaltura.sql 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,17 @@ +-- CVS ID: $Id: drop_lams_tool_kaltura.sql,v 1.1 2012/11/15 14:39:29 andreyb Exp $ + +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS tl_lakalt11_user; +DROP TABLE IF EXISTS tl_lakalt11_attachment; +DROP TABLE IF EXISTS tl_lakalt11_session; +DROP TABLE IF EXISTS tl_lakalt11_kaltura; +DROP TABLE IF EXISTS tl_lakalt11_kaltura_item; +DROP TABLE IF EXISTS tl_lakalt11_comment; +DROP TABLE IF EXISTS tl_lakalt11_rating; +DROP TABLE IF EXISTS tl_lakalt11_item_log; +SET FOREIGN_KEY_CHECKS=1; + + + + + Index: lams_tool_kaltura/db/sql/library_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/sql/library_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/db/sql/library_insert.sql 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,16 @@ +-- CVS ID: $Id: library_insert.sql,v 1.1 2012/11/15 14:39:29 andreyb Exp $ + +INSERT INTO lams_learning_library +( +description, +title, +valid_flag, +create_date_time +) +VALUES +( +'Kaltura Tool', +'Kaltura', +0, +NOW() +) Index: lams_tool_kaltura/db/sql/table-schema.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/sql/table-schema.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/db/sql/table-schema.sql 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_kaltura/db/sql/tool_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/db/sql/tool_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/db/sql/tool_insert.sql 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,62 @@ +-- CVS ID: $Id: tool_insert.sql,v 1.1 2012/11/15 14:39:29 andreyb Exp $ + +INSERT INTO lams_tool +( +tool_signature, +service_name, +tool_display_name, +description, +tool_identifier, +tool_version, +learning_library_id, +default_tool_content_id, +valid_flag, +grouping_support_type_id, +supports_run_offline_flag, +learner_url, +learner_preview_url, +learner_progress_url, +author_url, +monitor_url, +define_later_url, +export_pfolio_learner_url, +export_pfolio_class_url, +contribute_url, +moderation_url, +pedagogical_planner_url, +help_url, +language_file, +create_date_time, +modified_date_time, +supports_outputs +) +VALUES +( +'lakalt11', +'kalturaService', +'Kaltura', +'Kaltura', +'kaltura', +'@tool_version@', +NULL, +NULL, +0, +2, +1, +'tool/lakalt11/learning.do?mode=learner', +'tool/lakalt11/learning.do?mode=author', +'tool/lakalt11/learning.do?mode=teacher', +'tool/lakalt11/authoring.do', +'tool/lakalt11/monitoring.do', +'tool/lakalt11/authoring.do?mode=teacher', +'tool/lakalt11/exportPortfolio?mode=learner', +'tool/lakalt11/exportPortfolio?mode=teacher', +'tool/lakalt11/contribute.do', +'tool/lakalt11/moderate.do', +'tool/lakalt11/pedagogicalPlanner.do', +'http://wiki.lamsfoundation.org/display/lamsdocs/lakalt11', +'org.lamsfoundation.lams.tool.kaltura.ApplicationResources', +NOW(), +NOW(), +1 +) Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/kalturaApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/kalturaApplicationContext.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/kalturaApplicationContext.xml 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,110 @@ + + + + + + + + + + + + + org.lamsfoundation.lams.tool.kaltura.ApplicationResources + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED,readOnly + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED,readOnly + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaAttachmentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/Attic/IKalturaAttachmentDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaAttachmentDAO.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IKalturaAttachmentDAO.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; + +/** + * DAO for accessing the KalturaAttachment objects - interface defining methods to be implemented by the Hibernate or + * other implementation. + */ +public interface IKalturaAttachmentDAO extends IBaseDAO { + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaCommentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaCommentDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaCommentDAO.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,46 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: IKalturaCommentDAO.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaComment; + + +/** + * DAO interface for KalturaComment. + * + * @author Andrey Balan + * @see org.lamsfoundation.lams.tool.kaltura.model.KalturaComment + */ +public interface IKalturaCommentDAO extends IBaseDAO { + + /** + * Return KalturaComment by the given commentUid. + * + * @param commentUid + * @return + */ + KalturaComment getCommentByUid(Long commentUid); + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaDAO.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,44 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IKalturaDAO.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; + +/** + * DAO for accessing the Kaltura objects - interface defining methods to be implemented by the Hibernate or other + * implementation. + */ +public interface IKalturaDAO extends IBaseDAO { + + Kaltura getByContentId(Long toolContentId); + + void saveOrUpdate(Kaltura toContent); + + void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type); + + void releaseFromCache(Object o); + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaItemDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaItemDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaItemDAO.java 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,49 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: IKalturaItemDAO.java,v 1.1 2012/11/15 14:39:29 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao; + +import java.util.List; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItem; + +/** + * DAO interface for KalturaItem. + * + * @author Andrey Balan + * @see org.lamsfoundation.lams.tool.kaltura.model.KalturaItem + */ +public interface IKalturaItemDAO extends IBaseDAO { + + /** + * Return all kaltura items which is uploaded by author in given kalturaUid. + * + * @param kalturaUid + * @return + */ + List getAuthoringItems(Long kalturaUid); + + KalturaItem getByUid(Long kalturaItemUid); + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaItemVisitDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaItemVisitDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaItemVisitDAO.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,45 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: IKalturaItemVisitDAO.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao; + +import java.util.List; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItemVisitLog; + +/** + * DAO interface for KalturaItemVisitLog. + * + * @author Andrey Balan + * @see org.lamsfoundation.lams.tool.kaltura.model.KalturaItemVisitLog + */ +public interface IKalturaItemVisitDAO extends IBaseDAO { + + KalturaItemVisitLog getKalturaItemLog(Long itemUid, Long userId); + + int getUserViewLogCount(Long sessionId, Long userUid); + + List getKalturaItemLogBySession(Long sessionId, Long itemUid); + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaRatingDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaRatingDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaRatingDAO.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,67 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: IKalturaRatingDAO.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao; + +import java.util.List; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dto.AverageRatingDTO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaRating; + +/** + * DAO interface for KalturaRating. + * + * @author Andrey Balan + * @see org.lamsfoundation.lams.tool.kaltura.model.KalturaRating + */ +public interface IKalturaRatingDAO extends IBaseDAO { + + /** + * Return KalturaRating by the given itemUid and userId. + * + * @param itemUid + * @param userId + * @return + */ + KalturaRating getKalturaRatingByItemAndUser(Long itemUid, Long userId); + + /** + * Return list of KalturaRating by the the given itemUid. + * + * @param itemUid + * @param userId + * @return + */ + List getKalturaRatingsByItemUid(Long itemUid); + + /** + * Returns rating statistics by particular item + * + * @param itemUid + * @param sessionId + * @return + */ + AverageRatingDTO getAverageRatingDtoByItem(Long itemUid, Long sessionId); + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaSessionDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaSessionDAO.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,41 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IKalturaSessionDAO.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; + +/** + * DAO for accessing the KalturaSession objects - interface defining methods to be implemented by the Hibernate or other + * implementation. + */ +public interface IKalturaSessionDAO extends IBaseDAO { + + void saveOrUpdate(KalturaSession session); + + KalturaSession getBySessionId(Long toolSessionId); + + void deleteBySessionID(Long toolSessionID); +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaUserDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaUserDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/IKalturaUserDAO.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,61 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IKalturaUserDAO.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; + +/** + * DAO for accessing the KalturaUser objects - interface defining methods to be implemented by the Hibernate or other + * implementation. + */ +public interface IKalturaUserDAO extends IBaseDAO { + /** + * + * @param userId + * @param toolSessionId + * @return + */ + KalturaUser getByUserIdAndSessionId(Long userId, Long toolSessionId); + + void saveOrUpdate(KalturaUser kalturaUser); + + /** + * + * @param loginName + * @param sessionID + * @return + */ + KalturaUser getByLoginNameAndSessionId(String loginName, Long toolSessionId); + + /** + * + * @param uid + * @return + */ + KalturaUser getByUid(Long uid); + + KalturaUser getByUserIdAndContentId(Long userId, Long contentId); +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaAttachmentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/Attic/KalturaAttachmentDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaAttachmentDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaAttachmentDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaAttachmentDAO; + +/** + * DAO for accessing the KalturaAttachment objects - Hibernate specific code. + */ +public class KalturaAttachmentDAO extends BaseDAO implements IKalturaAttachmentDAO { + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaCommentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaCommentDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaCommentDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,49 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaCommentDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaCommentDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaComment; + +/** + * Hibernate implementation of IKalturaCommentDAO. + * + * @author Andrey Balan + * @see org.lamsfoundation.lams.tool.kaltura.dao.IKalturaCommentDAO + */ +public class KalturaCommentDAO extends BaseDAO implements IKalturaCommentDAO { + + private static final String FIND_BY_UID = "from " + KalturaComment.class.getName() + " as r where r.uid = ?"; + + public KalturaComment getCommentByUid(Long commentUid) { + List list = getHibernateTemplate().find(FIND_BY_UID, commentUid); + if (list == null || list.size() == 0) + return null; + return (KalturaComment) list.get(0); + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,80 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import java.util.List; + +import org.hibernate.FlushMode; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaDAO; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaAttachment; +import org.springframework.orm.hibernate3.HibernateTemplate; + +/** + * DAO for accessing the Kaltura objects - Hibernate specific code. + */ +public class KalturaDAO extends BaseDAO implements IKalturaDAO { + + private static final String FIND_FORUM_BY_CONTENTID = "from Kaltura kaltura where kaltura.toolContentId=?"; + + private static final String FIND_INSTRUCTION_FILE = "from " + KalturaAttachment.class.getName() + + " as i where tool_content_id=? and i.file_uuid=? and i.file_version_id=? and i.file_type=?"; + + public Kaltura getByContentId(Long toolContentId) { + List list = getHibernateTemplate().find(KalturaDAO.FIND_FORUM_BY_CONTENTID, toolContentId); + if (list != null && list.size() > 0) { + return (Kaltura) list.get(0); + } else { + return null; + } + } + + public void saveOrUpdate(Kaltura kaltura) { + this.getHibernateTemplate().saveOrUpdate(kaltura); + this.getHibernateTemplate().flush(); + } + + public void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type) { + HibernateTemplate templ = this.getHibernateTemplate(); + if (toolContentId != null && uuid != null && versionId != null) { + List list = getSession().createQuery(KalturaDAO.FIND_INSTRUCTION_FILE) + .setLong(0, toolContentId.longValue()).setLong(1, uuid.longValue()) + .setLong(2, versionId.longValue()).setString(3, type).list(); + if (list != null && list.size() > 0) { + KalturaAttachment file = (KalturaAttachment) list.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + templ.delete(file); + templ.flush(); + } + } + + } + + public void releaseFromCache(Object o) { + getSession().evict(o); + + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaItemDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaItemDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaItemDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,46 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaItemDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaItemDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItem; + +public class KalturaItemDAO extends BaseDAO implements IKalturaItemDAO { + + private static final String FIND_AUTHORING_ITEMS = "from " + KalturaItem.class.getName() + + " where kaltura_uid = ? and create_by_author = 1 order by create_date asc"; + + @Override + public List getAuthoringItems(Long kalturaUid) { + return this.getHibernateTemplate().find(FIND_AUTHORING_ITEMS, kalturaUid); + } + + @Override + public KalturaItem getByUid(Long kalturaItemUid) { + return (KalturaItem) this.getHibernateTemplate().get(KalturaItem.class, kalturaItemUid); + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaItemVisitDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaItemVisitDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaItemVisitDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,68 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaItemVisitDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaItemVisitDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItemVisitLog; + +/** + * Hibernate implementation of IKalturaItemVisitDAO. + * + * @author Andrey Balan + * @see org.lamsfoundation.lams.tool.kaltura.dao.IKalturaItemVisitDAO + */ +public class KalturaItemVisitDAO extends BaseDAO implements IKalturaItemVisitDAO { + + private static final String FIND_BY_ITEM_AND_USER = "from " + KalturaItemVisitLog.class.getName() + + " as r where r.user.userId = ? and r.kalturaItem.uid=?"; + + private static final String FIND_BY_ITEM_BYSESSION = "from " + KalturaItemVisitLog.class.getName() + + " as r where r.sessionId = ? and r.kalturaItem.uid=?"; + + private static final String FIND_VIEW_COUNT_BY_USER = "select count(*) from " + + KalturaItemVisitLog.class.getName() + " as r where r.sessionId=? and r.user.userId =?"; + + public KalturaItemVisitLog getKalturaItemLog(Long itemUid, Long userId) { + List list = getHibernateTemplate().find(FIND_BY_ITEM_AND_USER, new Object[] { userId, itemUid }); + if (list == null || list.size() == 0) + return null; + return (KalturaItemVisitLog) list.get(0); + } + + public int getUserViewLogCount(Long toolSessionId, Long userUid) { + List list = getHibernateTemplate().find(FIND_VIEW_COUNT_BY_USER, new Object[] { toolSessionId, userUid }); + if (list == null || list.size() == 0) + return 0; + return ((Number) list.get(0)).intValue(); + } + + public List getKalturaItemLogBySession(Long sessionId, Long itemUid) { + + return getHibernateTemplate().find(FIND_BY_ITEM_BYSESSION, new Object[] { sessionId, itemUid }); + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaRatingDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaRatingDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaRatingDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,79 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaRatingDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import java.text.NumberFormat; +import java.util.List; +import java.util.Locale; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaRatingDAO; +import org.lamsfoundation.lams.tool.kaltura.dto.AverageRatingDTO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaRating; + +/** + * Hibernate implementation of IKalturaRatingDAO. + * + * @author Andrey Balan + * @see org.lamsfoundation.lams.tool.kaltura.dao.IKalturaRatingDAO + */ +public class KalturaRatingDAO extends BaseDAO implements IKalturaRatingDAO { + + private static final String FIND_BY_ITEM_AND_USER = "from " + KalturaRating.class.getName() + + " as r where r.createBy.userId = ? and r.kalturaItem.uid=?"; + + private static final String FIND_BY_ITEM_UID = "from " + KalturaRating.class.getName() + + " as r where r.kalturaItem.uid=?"; + + private static final String FIND_AVERAGE_RATING_BY_MESSAGE = "SELECT AVG(r.rating), COUNT(*) from " + + KalturaRating.class.getName() + " as r where r.kalturaItem.uid=? and r.createBy.session.sessionId=?"; + + @Override + public KalturaRating getKalturaRatingByItemAndUser(Long itemUid, Long userId) { + List list = getHibernateTemplate().find(FIND_BY_ITEM_AND_USER, new Object[] { userId, itemUid }); + if (list == null || list.size() == 0) + return null; + return (KalturaRating) list.get(0); + } + + @Override + public List getKalturaRatingsByItemUid(Long itemUid) { + return getHibernateTemplate().find(FIND_BY_ITEM_UID, itemUid); + } + + @Override + public AverageRatingDTO getAverageRatingDtoByItem(Long itemUid, Long sessionId) { + List list = getHibernateTemplate().find(FIND_AVERAGE_RATING_BY_MESSAGE, new Object[] { itemUid, sessionId }); + Object[] results = list.get(0); + + Object averageRatingObj = (results[0] == null) ? 0 : results[0]; + NumberFormat numberFormat = NumberFormat.getInstance(Locale.US); + numberFormat.setMaximumFractionDigits(1); + String averageRating = numberFormat.format(averageRatingObj); + + String numberOfVotes = (results[1] == null) ? "0" : String.valueOf(results[1]); + return new AverageRatingDTO(averageRating, numberOfVotes); + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaSessionDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaSessionDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,60 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaSessionDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaSessionDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; + +/** + * DAO for accessing the KalturaSession objects - Hibernate specific code. + */ +public class KalturaSessionDAO extends BaseDAO implements IKalturaSessionDAO { + + public static final String SQL_QUERY_FIND_BY_SESSION_ID = "from " + KalturaSession.class.getName() + + " where session_id=?"; + + public void saveOrUpdate(KalturaSession session) { + this.getHibernateTemplate().saveOrUpdate(session); + this.getHibernateTemplate().flush(); + } + + public KalturaSession getBySessionId(Long toolSessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_SESSION_ID, toolSessionId); + if (list == null || list.isEmpty()) + return null; + return (KalturaSession) list.get(0); + } + + public void deleteBySessionID(Long toolSessionID) { + KalturaSession session = getBySessionId(toolSessionID); + if (session != null) { + this.getHibernateTemplate().delete(session); + this.getHibernateTemplate().flush(); + } + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaUserDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaUserDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dao/hibernate/KalturaUserDAO.java 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,96 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaUserDAO.java,v 1.1 2012/11/15 14:39:30 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaUserDAO; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; + +/** + * DAO for accessing the KalturaUser objects - Hibernate specific code. + */ +public class KalturaUserDAO extends BaseDAO implements IKalturaUserDAO { + + public static final String SQL_QUERY_FIND_BY_USER_ID_SESSION_ID = "from " + KalturaUser.class.getName() + " as f" + + " where user_id=? and f.session.sessionId=?"; + + public static final String SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID = "from " + KalturaUser.class.getName() + + " as f where login_name=? and f.session.sessionId=?"; + + private static final String SQL_QUERY_FIND_BY_UID = "from " + KalturaUser.class.getName() + " where uid=?"; + + private static final String FIND_BY_USER_ID_CONTENT_ID = "from " + KalturaUser.class.getName() + + " as u where u.userId =? and u.kaltura.toolContentId=?"; + + @Override + public KalturaUser getByUserIdAndSessionId(Long userId, Long toolSessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_USER_ID_SESSION_ID, + new Object[] { userId, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (KalturaUser) list.get(0); + } + + @Override + public KalturaUser getByLoginNameAndSessionId(String loginName, Long toolSessionId) { + + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID, + new Object[] { loginName, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (KalturaUser) list.get(0); + + } + + @Override + public KalturaUser getByUserIdAndContentId(Long userId, Long contentId) { + List list = this.getHibernateTemplate().find(FIND_BY_USER_ID_CONTENT_ID, new Object[] { userId, contentId }); + if (list == null || list.size() == 0) + return null; + return (KalturaUser) list.get(0); + } + + @Override + public void saveOrUpdate(KalturaUser kalturaUser) { + this.getHibernateTemplate().saveOrUpdate(kalturaUser); + this.getHibernateTemplate().flush(); + } + + @Override + public KalturaUser getByUid(Long uid) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_UID, new Object[] { uid }); + + if (list == null || list.isEmpty()) + return null; + + return (KalturaUser) list.get(0); + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dbupdates/autopatchContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dbupdates/autopatchContext.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dbupdates/autopatchContext.xml 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + + + + + + Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/AverageRatingDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/AverageRatingDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/AverageRatingDTO.java 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,52 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: AverageRatingDTO.java,v 1.1 2012/11/15 14:39:29 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.dto; + +public class AverageRatingDTO { + + private String rating; + private String numberOfVotes; + + public AverageRatingDTO(String rating, String numberOfVotes) { + this.rating = rating; + this.numberOfVotes = numberOfVotes; + } + + public String getNumberOfVotes() { + return numberOfVotes; + } + + public void setNumberOfVotes(String numberOfVotes) { + this.numberOfVotes = numberOfVotes; + } + + public String getRating() { + return rating; + } + + public void setRating(String total) { + this.rating = total; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/KalturaSessionDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/KalturaSessionDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/KalturaSessionDTO.java 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,118 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaSessionDTO.java,v 1.1 2012/11/15 14:39:29 andreyb Exp $ */ + +package org.lamsfoundation.lams.tool.kaltura.dto; + +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; + +public class KalturaSessionDTO implements Comparable { + + private Long sessionID; + + private String sessionName; + + private Set userDTOs = new TreeSet(); + + private int numberOfLearners; + + private int numberOfFinishedLearners; + + public KalturaSessionDTO(KalturaSession session) { + this.sessionID = session.getSessionId(); + this.sessionName = session.getSessionName(); + + for (Iterator iterator = session.getKalturaUsers().iterator(); iterator.hasNext();) { + KalturaUser user = (KalturaUser) iterator.next(); + KalturaUserDTO userDTO = new KalturaUserDTO(user); + if (userDTO.isFinishedActivity()) { + numberOfFinishedLearners++; + } + + userDTOs.add(userDTO); + } + + numberOfLearners = userDTOs.size(); + + } + + public KalturaSessionDTO() { + } + + public Long getSessionID() { + return sessionID; + } + + public void setSessionID(Long sessionID) { + this.sessionID = sessionID; + } + + public String getSessionName() { + return sessionName; + } + + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + public int compareTo(Object o) { + int returnValue; + KalturaSessionDTO toSession = (KalturaSessionDTO) o; + returnValue = this.sessionName.compareTo(toSession.sessionName); + if (returnValue == 0) { + returnValue = this.sessionID.compareTo(toSession.sessionID); + } + return returnValue; + } + + public Set getUserDTOs() { + return userDTOs; + } + + public void setUserDTOs(Set kalturaUsers) { + this.userDTOs = kalturaUsers; + } + + public int getNumberOfLearners() { + return numberOfLearners; + } + + public void setNumberOfLearners(int numberOfLearners) { + this.numberOfLearners = numberOfLearners; + } + + public int getNumberOfFinishedLearners() { + return numberOfFinishedLearners; + } + + public void setNumberOfFinishedLearners(int numberOfFinishedLearners) { + this.numberOfFinishedLearners = numberOfFinishedLearners; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/KalturaUserDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/KalturaUserDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/KalturaUserDTO.java 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,119 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaUserDTO.java,v 1.1 2012/11/15 14:39:29 andreyb Exp $ */ + +package org.lamsfoundation.lams.tool.kaltura.dto; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; + +public class KalturaUserDTO implements Comparable { + + private Long uid; + + private String loginName; + + private String firstName; + + private String lastName; + + private boolean finishedActivity; + + private NotebookEntryDTO entryDTO; + + public KalturaUserDTO(KalturaUser user, NotebookEntry entry) { + this.uid = user.getUid(); + this.loginName = user.getLoginName(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.finishedActivity = user.isFinishedActivity(); + this.entryDTO = new NotebookEntryDTO(entry); + } + + public KalturaUserDTO(KalturaUser user) { + this.uid = user.getUid(); + this.loginName = user.getLoginName(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.finishedActivity = user.isFinishedActivity(); + } + + public int compareTo(Object o) { + int returnValue; + KalturaUserDTO toUser = (KalturaUserDTO) o; + returnValue = this.lastName.compareTo(toUser.lastName); + if (returnValue == 0) { + returnValue = this.uid.compareTo(toUser.uid); + } + return returnValue; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public NotebookEntryDTO getEntryDTO() { + return entryDTO; + } + + public void setEntryDTO(NotebookEntryDTO entryDTO) { + this.entryDTO = entryDTO; + } + + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/NotebookEntryDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/NotebookEntryDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dto/NotebookEntryDTO.java 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,56 @@ +package org.lamsfoundation.lams.tool.kaltura.dto; + +import java.util.Date; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; + +public class NotebookEntryDTO { + + private Long uid; + + private String entry; + + private Date createDate; + + private Date lastModified; + + public NotebookEntryDTO(NotebookEntry entry) { + this.uid = entry.getUid(); + this.entry = entry.getEntry(); + this.createDate = entry.getCreateDate(); + this.lastModified = entry.getLastModified(); + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getEntry() { + return entry; + } + + public void setEntry(String entry) { + this.entry = entry; + } + + public Date getLastModified() { + return lastModified; + } + + public void setLastModified(Date lastModified) { + this.lastModified = lastModified; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/Kaltura.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/Kaltura.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/Kaltura.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,522 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: Kaltura.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.kaltura.service.KalturaService; + +/** + * @hibernate.class table="tl_lakalt11_kaltura" + */ + +public class Kaltura implements java.io.Serializable, Cloneable { + + public static final int TYPE_LEARNER_CONTRIBUTION_LIMIT_UNLIMITED = -1; + + private static final long serialVersionUID = 579733009969321015L; + + static Logger log = Logger.getLogger(KalturaService.class.getName()); + + // Fields + private Long uid; + + private Date createDate; + + private Date updateDate; + + private KalturaUser createdBy; + + private String title; + + private String instructions; + + private boolean runOffline; + + private boolean lockOnFinished; + + private boolean allowContributeVideos; + + private boolean allowSeeingOtherUsersRecordings; + + private int learnerContributionLimit; + + private boolean allowComments; + + private boolean allowRatings; + + private String onlineInstructions; + + private String offlineInstructions; + + private boolean contentInUse; + + private boolean defineLater; + + private Date submissionDeadline; + + private Long toolContentId; + + private boolean reflectOnActivity; + + private String reflectInstructions; + + private Set kalturaAttachments; + + private Set kalturaSessions; + + private Set kalturaItems; + + // *********** NON Persisit fields + private IToolContentHandler toolContentHandler; + + private List onlineFileList; + + private List offlineFileList; + + // Constructors + + /** default constructor */ + public Kaltura() { + kalturaItems = new HashSet(); + } + + public void toDTO() { + onlineFileList = new ArrayList(); + offlineFileList = new ArrayList(); + Set fileSet = this.getKalturaAttachments(); + if (fileSet != null) { + for (KalturaAttachment file : fileSet) { + if (StringUtils.equalsIgnoreCase(file.getFileType(), IToolContentHandler.TYPE_OFFLINE)) { + offlineFileList.add(file); + } else { + onlineFileList.add(file); + } + } + } + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="create_date" + * + */ + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.property column="update_date" + * + */ + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + /** + * @hibernate.many-to-one cascade="save-update" column="create_by" + * + */ + public KalturaUser getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(KalturaUser createdBy) { + this.createdBy = createdBy; + } + + /** + * @hibernate.property column="title" length="255" + * + */ + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.property column="instructions" length="65535" + * + */ + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + /** + * @hibernate.property column="run_offline" length="1" + */ + public boolean isRunOffline() { + return runOffline; + } + + public void setRunOffline(boolean runOffline) { + this.runOffline = runOffline; + } + + /** + * @hibernate.property column="lock_on_finished" length="1" + */ + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + /** + * @hibernate.property column="allow_contribute_videos" length="1" + */ + public boolean isAllowContributeVideos() { + return allowContributeVideos; + } + + public void setAllowContributeVideos(boolean allowContributeVideos) { + this.allowContributeVideos = allowContributeVideos; + } + + /** + * @hibernate.property column="allow_seeing_other_users_recordings" length="1" + */ + public boolean isAllowSeeingOtherUsersRecordings() { + return allowSeeingOtherUsersRecordings; + } + + public void setAllowSeeingOtherUsersRecordings(boolean allowSeeingOtherUsersRecordings) { + this.allowSeeingOtherUsersRecordings = allowSeeingOtherUsersRecordings; + } + + /** + * @hibernate.property column="learner_contribution_limit" + * @return learnerContributionLimit can be from 1 to 10 or -1 in case of unlimited + */ + public int getLearnerContributionLimit() { + return learnerContributionLimit; + } + + public void setLearnerContributionLimit(int learnerContributionLimit) { + this.learnerContributionLimit = learnerContributionLimit; + } + + /** + * @hibernate.property column="allow_comments" length="1" + */ + public boolean isAllowComments() { + return allowComments; + } + + public void setAllowComments(boolean allowComments) { + this.allowComments = allowComments; + } + + /** + * @hibernate.property column="allow_ratings" length="1" + */ + public boolean isAllowRatings() { + return allowRatings; + } + + public void setAllowRatings(boolean allowRatings) { + this.allowRatings = allowRatings; + } + + /** + * @hibernate.property column="online_instructions" length="65535" + */ + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + /** + * @hibernate.property column="offline_instructions" length="65535" + */ + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + /** + * @hibernate.property column="content_in_use" length="1" + */ + public boolean isContentInUse() { + return contentInUse; + } + + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + /** + * @hibernate.property column="define_later" length="1" + */ + public boolean isDefineLater() { + return defineLater; + } + + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + public void setSubmissionDeadline(Date submissionDeadline) { + this.submissionDeadline = submissionDeadline; + } + + /** + * + * @hibernate.property column="submission_deadline" + * @return date submissionDeadline + */ + public Date getSubmissionDeadline() { + return submissionDeadline; + } + + /** + * @hibernate.property column="tool_content_id" length="20" + */ + public Long getToolContentId() { + return toolContentId; + } + + public void setToolContentId(Long toolContentId) { + this.toolContentId = toolContentId; + } + + /** + * @hibernate.property column="reflect_instructions" + * @return + */ + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + /** + * @hibernate.property column="reflect_on_activity" + * @return + */ + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + /** + * @hibernate.set lazy="true" inverse="false" cascade="all-delete-orphan" + * @hibernate.collection-key column="kaltura_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.kaltura.model.KalturaAttachment" + */ + public Set getKalturaAttachments() { + return kalturaAttachments; + } + + public void setKalturaAttachments(Set kalturaAttachments) { + this.kalturaAttachments = kalturaAttachments; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="kaltura_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.kaltura.model.KalturaSession" + */ + public Set getKalturaSessions() { + return kalturaSessions; + } + + public void setKalturaSessions(Set kalturaSessions) { + this.kalturaSessions = kalturaSessions; + } + + /** + * @hibernate.set lazy="true" inverse="false" cascade="all" order-by="create_date desc" + * @hibernate.collection-key column="kaltura_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.kaltura.model.KalturaItem" + */ + public Set getKalturaItems() { + return kalturaItems; + } + + public void setKalturaItems(Set kalturaItems) { + this.kalturaItems = kalturaItems; + } + + @Override + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("title").append("='").append(getTitle()).append("' "); + buffer.append("instructions").append("='").append(getInstructions()).append("' "); + buffer.append("toolContentId").append("='").append(getToolContentId()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (other == null) { + return false; + } + if (!(other instanceof Kaltura)) { + return false; + } + Kaltura castOther = (Kaltura) other; + + return this.getUid() == castOther.getUid() || this.getUid() != null && castOther.getUid() != null + && this.getUid().equals(castOther.getUid()); + } + + @Override + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public static Kaltura newInstance(Kaltura fromContent, Long toContentId, + IToolContentHandler kalturaToolContentHandler) { + Kaltura toContent = new Kaltura(); + fromContent.toolContentHandler = kalturaToolContentHandler; + toContent = (Kaltura) fromContent.clone(); + toContent.setToolContentId(toContentId); + toContent.setCreateDate(new Date()); + return toContent; + } + + @Override + protected Object clone() { + + Kaltura kaltura = null; + try { + kaltura = (Kaltura) super.clone(); + kaltura.setUid(null); + + if (kalturaItems != null) { + Iterator iter = kalturaItems.iterator(); + Set set = new HashSet(); + while (iter.hasNext()) { + KalturaItem item = (KalturaItem) iter.next(); + KalturaItem newItem = (KalturaItem) item.clone(); + // just clone old file without duplicate it in repository + set.add(newItem); + } + kaltura.kalturaItems = set; + } + + if (kalturaAttachments != null) { + // create a copy of the attachments + Iterator iter = kalturaAttachments.iterator(); + Set set = new HashSet(); + while (iter.hasNext()) { + KalturaAttachment originalFile = (KalturaAttachment) iter.next(); + KalturaAttachment newFile = (KalturaAttachment) originalFile.clone(); + set.add(newFile); + } + kaltura.kalturaAttachments = set; + } + // create an empty set for the kalturaSession + kaltura.kalturaSessions = new HashSet(); + + } catch (CloneNotSupportedException cnse) { + Kaltura.log.error("Error cloning " + Kaltura.class); + } + return kaltura; + } + + public IToolContentHandler getToolContentHandler() { + return toolContentHandler; + } + + public void setToolContentHandler(IToolContentHandler toolContentHandler) { + this.toolContentHandler = toolContentHandler; + } + + public List getOfflineFileList() { + return offlineFileList; + } + + public void setOfflineFileList(List offlineFileList) { + this.offlineFileList = offlineFileList; + } + + public List getOnlineFileList() { + return onlineFileList; + } + + public void setOnlineFileList(List onlineFileList) { + this.onlineFileList = onlineFileList; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaAttachment.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/Attic/KalturaAttachment.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaAttachment.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,222 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaAttachment.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.log4j.Logger; + +/** + * + * The details of files attached to the tool. In most cases this will be the online/offline instruction files. + * + * @hibernate.class table="tl_lakalt11_attachment" + * + */ + +public class KalturaAttachment implements java.io.Serializable, Cloneable { + + /** + * + */ + private static final long serialVersionUID = 47452859888067500L; + + private static final Logger log = Logger.getLogger(KalturaAttachment.class); + + /** + * + */ + private Long uid; + + private Long fileVersionId; + + private String fileType; + + private String fileName; + + private Long fileUuid; + + private Date createDate; + + private Kaltura kaltura; + + // Constructors + + /** default constructor */ + public KalturaAttachment() { + } + + /** Constructor setting up all the properties except for kaltura one */ + public KalturaAttachment(Long fileVersionId, String fileType, String fileName, Long fileUuid, Date createDate) { + this.fileVersionId = fileVersionId; + this.fileType = fileType; + this.fileName = fileName; + this.fileUuid = fileUuid; + this.createDate = createDate; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="file_version_id" length="20" + * + */ + + public Long getFileVersionId() { + return this.fileVersionId; + } + + public void setFileVersionId(Long fileVersionId) { + this.fileVersionId = fileVersionId; + } + + /** + * @hibernate.property column="file_type" length="255" + * + */ + + public String getFileType() { + return this.fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + /** + * @hibernate.property column="file_name" length="255" + * + */ + + public String getFileName() { + return this.fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /** + * @hibernate.property column="file_uuid" length="20" + * + */ + + public Long getFileUuid() { + return this.fileUuid; + } + + public void setFileUuid(Long fileUuid) { + this.fileUuid = fileUuid; + } + + /** + * @hibernate.property column="create_date" + * + */ + + public Date getCreateDate() { + return this.createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="kaltura_uid" + * + */ + + public Kaltura getKaltura() { + return this.kaltura; + } + + public void setKaltura(Kaltura kaltura) { + this.kaltura = kaltura; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("fileVersionId").append("='").append(getFileVersionId()).append("' "); + buffer.append("fileName").append("='").append(getFileName()).append("' "); + buffer.append("fileUuid").append("='").append(getFileUuid()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof KalturaAttachment)) + return false; + + final KalturaAttachment genericEntity = (KalturaAttachment) o; + + return new EqualsBuilder().append(this.uid, genericEntity.uid) + .append(this.fileVersionId, genericEntity.fileVersionId).append(this.fileName, genericEntity.fileName) + .append(this.fileType, genericEntity.fileType).append(this.createDate, genericEntity.createDate) + .isEquals(); + } + + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public Object clone() { + Object obj = null; + try { + obj = super.clone(); + ((KalturaAttachment) obj).setUid(null); + } catch (CloneNotSupportedException e) { + log.error("Failed to clone " + KalturaAttachment.class); + } + + return obj; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaComment.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaComment.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaComment.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,149 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaComment.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.log4j.Logger; + +/** + * KalturaComment + * + * @author Andrey Balan + * + * @hibernate.class table="tl_lakalt11_comment" + */ +public class KalturaComment implements Cloneable { + + private static final Logger log = Logger.getLogger(KalturaComment.class); + + private Long uid; + private String comment; + private KalturaUser createBy; + private Date createDate; + private boolean isHidden; + + // ********************************************************** + // Function method for TaskListItemComment + // ********************************************************** + + public Object clone() { + KalturaComment comment = null; + try { + comment = (KalturaComment) super.clone(); + ((KalturaComment) comment).setUid(null); + + // clone ImageGalleryUser as well + if (this.createBy != null) { + comment.setCreateBy((KalturaUser) this.createBy.clone()); + } + } catch (CloneNotSupportedException e) { + log.error("When clone " + KalturaComment.class + " failed"); + } + + return comment; + } + + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof KalturaComment)) + return false; + + final KalturaComment genericEntity = (KalturaComment) o; + + return new EqualsBuilder().append(this.uid, genericEntity.uid).append(this.comment, genericEntity.comment) + .append(this.createBy.getUserId(), genericEntity.createBy.getUserId()).isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(uid).append(comment).append(createBy).toHashCode(); + } + + // ********************************************************** + // Get/Set methods + // ********************************************************** + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the log Uid. + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="create_date" + * @return + */ + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.many-to-one column="create_by" cascade="none" + * @return + */ + public KalturaUser getCreateBy() { + return createBy; + } + + public void setCreateBy(KalturaUser createBy) { + this.createBy = createBy; + } + + /** + * @hibernate.property column="comment" type="text" + * @return + */ + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + /** + * @hibernate.property column="is_hidden" + * @return + */ + public boolean isHidden() { + return isHidden; + } + + public void setHidden(boolean isHidden) { + this.isHidden = isHidden; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaItem.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaItem.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaItem.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,319 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaItem.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.tool.kaltura.dto.AverageRatingDTO; + +/** + * KalturaItem + * + * @hibernate.class table="tl_lakalt11_kaltura_item" + * + * @author Andrey Balan + * + */ +public class KalturaItem implements Cloneable { + + private static final Logger log = Logger.getLogger(KalturaItem.class); + + private Long uid; + + private String title; + + private String entryId; + + private int duration; + + private int sequenceId; + + private boolean isHidden; + + private boolean isCreateByAuthor; + + private Date createDate; + + private KalturaUser createdBy; + + private Long kalturaUid; + + private Long mark; + + //Set of user comments + private Set comments; + + // *********************************************** + // Non persistant fields: + + private AverageRatingDTO averageRatingDto; + + private Set groupComments; + + /** + * Default contruction method. + * + */ + public KalturaItem() { + comments = new HashSet(); + groupComments = new HashSet(); + } + + @Override + public Object clone() { + KalturaItem item = null; + try { + item = (KalturaItem) super.clone(); + item.setUid(null); + // clone ImageGalleryUser as well + if (this.createdBy != null) { + item.setCreatedBy((KalturaUser) this.createdBy.clone()); + } + + // clone set of ImageComment + if (comments != null) { + Iterator iter = comments.iterator(); + Set set = new HashSet(); + while (iter.hasNext()) { + KalturaComment comment = (KalturaComment) iter.next(); + KalturaComment newComment = (KalturaComment) comment.clone(); + // just clone old file without duplicate it in repository + set.add(newComment); + } + item.comments = set; + } + + } catch (CloneNotSupportedException e) { + log.error("When clone " + KalturaItem.class + " failed"); + } + + return item; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof KalturaItem)) { + return false; + } + + final KalturaItem genericEntity = (KalturaItem) o; + + return new EqualsBuilder().append(this.getUid(), genericEntity.getUid()).append(this.getSequenceId(), genericEntity.getSequenceId()).isEquals(); + } + + // ********************************************************** + // Get/Set methods + // ********************************************************** + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the uid. + */ + public Long getUid() { + return uid; + } + + /** + * @param uid + * The uid to set. + */ + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="title" length="255" + * @return + */ + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.property column="duration" + * @return duration of the corresponding Kaltura video + */ + public int getDuration() { + return duration; + } + + /** + * @param duration duration of the Kaltura video + */ + public void setDuration(int duration) { + this.duration = duration; + } + + public Date getDurationDate() { + return new Date(duration*1000); + } + + /** + * @hibernate.property column="entry_id" length="255" + * @return + */ + public String getEntryId() { + return entryId; + } + + public void setEntryId(String entryId) { + this.entryId = entryId; + } + + /** + * Returns item sequence number. + * + * @return item sequence number + * + * @hibernate.property column="sequence_id" + */ + public int getSequenceId() { + return sequenceId; + } + + /** + * Sets item sequence number. + * + * @param sequenceId + * item sequence number + */ + public void setSequenceId(int sequenceId) { + this.sequenceId = sequenceId; + } + + /** + * @hibernate.many-to-one cascade="none" column="create_by" + * + * @return + */ + public KalturaUser getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(KalturaUser createdBy) { + this.createdBy = createdBy; + } + + /** + * @hibernate.property column="create_date" + * @return + */ + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.property column="create_by_author" + * @return + */ + public boolean isCreateByAuthor() { + return isCreateByAuthor; + } + + public void setCreateByAuthor(boolean isCreateByAuthor) { + this.isCreateByAuthor = isCreateByAuthor; + } + + /** + * @hibernate.property type="java.lang.Long" column="kaltura_uid" + * @return + */ + public Long getKalturaUid() { + return kalturaUid; + } + + public void setKalturaUid(Long kalturaUid) { + this.kalturaUid = kalturaUid; + } + + /** + * @hibernate.property type="java.lang.Long" column="mark" + * @return + */ + public Long getMark() { + return mark; + } + + public void setMark(Long mark) { + this.mark = mark; + } + + /** + * @hibernate.property column="is_hidden" + * @return + */ + public boolean isHidden() { + return isHidden; + } + + public void setHidden(boolean isHidden) { + this.isHidden = isHidden; + } + + /** + * @hibernate.set lazy="true" cascade="all" inverse="false" order-by="create_date asc" + * @hibernate.collection-key column="kaltura_item_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.kaltura.model.KalturaComment" + * + * @return a set of Comments to this Image. + */ + public Set getComments() { + return comments; + } + + public void setComments(Set comments) { + this.comments = comments; + } + + public AverageRatingDTO getAverageRatingDto() { + return averageRatingDto; + } + + public void setAverageRatingDto(AverageRatingDTO averageRatingDto) { + this.averageRatingDto = averageRatingDto; + } + + public Set getGroupComments() { + return groupComments; + } + + public void setGroupComments(Set groupComments) { + this.groupComments = groupComments; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaItemVisitLog.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaItemVisitLog.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaItemVisitLog.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,117 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaItemVisitLog.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.model; + +import java.util.Date; + +/** + * KalturaItemVisitLog + * + * @author Andrey Balan + * + * @hibernate.class table="tl_lakalt11_item_log" + * + */ +public class KalturaItemVisitLog { + + private Long uid; + private KalturaUser user; + private KalturaItem kalturaItem; + private boolean complete; + private Date accessDate; + private Long sessionId; + + /** + * @hibernate.property column="access_date" + * @return + */ + public Date getAccessDate() { + return accessDate; + } + + public void setAccessDate(Date accessDate) { + this.accessDate = accessDate; + } + + /** + * @hibernate.many-to-one column="kaltura_item_uid" cascade="none" + * @return + */ + public KalturaItem getKalturaItem() { + return kalturaItem; + } + + public void setKalturaItem(KalturaItem kalturaItem) { + this.kalturaItem = kalturaItem; + } + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the log Uid. + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.many-to-one column="user_uid" cascade="none" + * @return + */ + public KalturaUser getUser() { + return user; + } + + public void setUser(KalturaUser user) { + this.user = user; + } + + /** + * @hibernate.property column="complete" + * @return + */ + public boolean isComplete() { + return complete; + } + + public void setComplete(boolean complete) { + this.complete = complete; + } + + /** + * @hibernate.property column="session_id" + * @return + */ + public Long getSessionId() { + return sessionId; + } + + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaRating.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaRating.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaRating.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,135 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaRating.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.model; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.log4j.Logger; + +/** + * KalturaRating + * + * @author Andrey Balan + * + * @hibernate.class table="tl_lakalt11_rating" + */ +public class KalturaRating implements Cloneable { + + private static final Logger log = Logger.getLogger(KalturaRating.class); + + private Long uid; + private float rating; + private KalturaUser createBy; + private KalturaItem kalturaItem; + + // ********************************************************** + // Function method for ImageRating + // ********************************************************** + + public Object clone() { + KalturaRating rating = null; + try { + rating = (KalturaRating) super.clone(); + ((KalturaRating) rating).setUid(null); + + // clone ImageGalleryUser as well + if (this.createBy != null) { + rating.setCreateBy((KalturaUser) this.createBy.clone()); + } + } catch (CloneNotSupportedException e) { + log.error("When clone " + KalturaRating.class + " failed"); + } + + return rating; + } + + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof KalturaRating)) + return false; + + final KalturaRating genericEntity = (KalturaRating) o; + + return new EqualsBuilder().append(this.uid, genericEntity.uid).append(this.rating, genericEntity.rating) + .append(this.createBy, genericEntity.createBy).isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(uid).append(rating).append(createBy).toHashCode(); + } + + // ********************************************************** + // Get/Set methods + // ********************************************************** + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the log Uid. + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.many-to-one column="create_by" cascade="none" + * @return + */ + public KalturaUser getCreateBy() { + return createBy; + } + + public void setCreateBy(KalturaUser createBy) { + this.createBy = createBy; + } + + /** + * @hibernate.property column="rating" + * @return + */ + public float getRating() { + return rating; + } + + public void setRating(float rating) { + this.rating = rating; + } + + /** + * @hibernate.many-to-one column="kaltura_item_uid" cascade="none" + * @return + */ + public KalturaItem getKalturaItem() { + return kalturaItem; + } + + public void setKalturaItem(KalturaItem item) { + this.kalturaItem = item; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaSession.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaSession.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaSession.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,238 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaSession.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import org.apache.log4j.Logger; + +/** + * + * Represents the tool session. + * + * @hibernate.class table="tl_lakalt11_session" + */ + +public class KalturaSession implements java.io.Serializable { + + private static Logger log = Logger.getLogger(KalturaSession.class); + private static final long serialVersionUID = 4407078136514639026L; + + // Fields + private Long uid; + + private Date sessionEndDate; + + private Date sessionStartDate; + + private Integer status; + + private Long sessionId; + + private String sessionName; + + private Kaltura kaltura; + + private Set kalturaUsers; + + // Constructors + + /** default constructor */ + public KalturaSession() { + } + + /** full constructor */ + public KalturaSession(Date sessionEndDate, Date sessionStartDate, Integer status, Long sessionId, + String sessionName, Kaltura kaltura, Set kalturaUsers) { + this.sessionEndDate = sessionEndDate; + this.sessionStartDate = sessionStartDate; + this.status = status; + this.sessionId = sessionId; + this.sessionName = sessionName; + this.kaltura = kaltura; + this.kalturaUsers = kalturaUsers; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="session_end_date" + * + */ + + public Date getSessionEndDate() { + return this.sessionEndDate; + } + + public void setSessionEndDate(Date sessionEndDate) { + this.sessionEndDate = sessionEndDate; + } + + /** + * @hibernate.property column="session_start_date" + * + */ + + public Date getSessionStartDate() { + return this.sessionStartDate; + } + + public void setSessionStartDate(Date sessionStartDate) { + this.sessionStartDate = sessionStartDate; + } + + /** + * @hibernate.property column="status" length="11" + * + */ + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + /** + * @hibernate.property column="session_id" length="20" + * + */ + + public Long getSessionId() { + return this.sessionId; + } + + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + + /** + * @hibernate.property column="session_name" length="250" + * + */ + + public String getSessionName() { + return this.sessionName; + } + + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="kaltura_uid" + * + */ + + public Kaltura getKaltura() { + return this.kaltura; + } + + public void setKaltura(Kaltura kaltura) { + this.kaltura = kaltura; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="kaltura_session_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.kaltura.model.KalturaUser" + * + */ + + public Set getKalturaUsers() { + return this.kalturaUsers; + } + + public void setKalturaUsers(Set kalturaUsers) { + this.kalturaUsers = kalturaUsers; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("sessionEndDate").append("='").append(getSessionEndDate()).append("' "); + buffer.append("sessionStartDate").append("='").append(getSessionStartDate()).append("' "); + buffer.append("status").append("='").append(getStatus()).append("' "); + buffer.append("sessionID").append("='").append(getSessionId()).append("' "); + buffer.append("sessionName").append("='").append(getSessionName()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object other) { + if ((this == other)) + return true; + if ((other == null)) + return false; + if (!(other instanceof KalturaSession)) + return false; + KalturaSession castOther = (KalturaSession) other; + + return ((this.getUid() == castOther.getUid()) || (this.getUid() != null && castOther.getUid() != null && this + .getUid().equals(castOther.getUid()))); + } + + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public Object clone() { + + KalturaSession session = null; + try { + session = (KalturaSession) super.clone(); + session.kalturaUsers = new HashSet(); + } catch (CloneNotSupportedException e) { + log.error("When clone " + KalturaSession.class + " failed"); + } + return session; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaUser.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaUser.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/model/KalturaUser.java 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,230 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaUser.java,v 1.1 2012/11/15 14:39:32 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.model; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * + * Caches the user details. This allows the tool to be more efficient at displaying user names but means that when + * people's names change, they won't change in the "old" tool data. + * + * @hibernate.class table="tl_lakalt11_user" + */ + +public class KalturaUser implements java.io.Serializable { + + private static final long serialVersionUID = -3701664859818409197L; + private static Logger log = Logger.getLogger(KalturaUser.class); + + // Fields + private Long uid; + + private Long userId; + + private String lastName; + + private String firstName; + + private String loginName; + + private KalturaSession session; + + private Kaltura kaltura; + + private boolean finishedActivity; + + // Constructors + + /** default constructor */ + public KalturaUser() { + } + + public KalturaUser(UserDTO user, KalturaSession session) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.session = session; + this.finishedActivity = false; + } + + public KalturaUser(UserDTO user, Kaltura kaltura) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.session = null; + this.kaltura = kaltura; + this.finishedActivity = false; + } + + @Override + public Object clone() { + + KalturaUser user = null; + try { + user = (KalturaUser) super.clone(); + user.setUid(null); + // never clone session + user.setSession(null); + } catch (CloneNotSupportedException e) { + log.error("When clone " + KalturaUser.class + " failed"); + } + + return user; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof KalturaUser)) { + return false; + } + + final KalturaUser user = (KalturaUser) obj; + + return new EqualsBuilder().append(this.uid, user.uid).append(this.firstName, user.firstName).append( + this.lastName, user.lastName).append(this.loginName, user.loginName).isEquals(); + } + + @Override + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("userId").append("='").append(getUserId()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + @Override + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + */ + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="user_id" length="20" + * + */ + public Long getUserId() { + return this.userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + /** + * @hibernate.property column="last_name" length="255" + * + */ + public String getLastName() { + return this.lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * @hibernate.property column="login_name" length="255" + * + */ + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + /** + * @hibernate.property column="first_name" length="255" + * + */ + public String getFirstName() { + return this.firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * @hibernate.property column="finishedActivity" + */ + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="kaltura_session_uid" + * + */ + public KalturaSession getSession() { + return this.session; + } + + public void setSession(KalturaSession kalturaSession) { + this.session = kalturaSession; + } + + /** + * @hibernate.many-to-one column="kaltura_uid" cascade="none" + */ + public Kaltura getKaltura() { + return kaltura; + } + + public void setKaltura(Kaltura kaltura) { + this.kaltura = kaltura; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/IKalturaService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/IKalturaService.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/IKalturaService.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,223 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IKalturaService.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.service; + +import java.util.Set; + +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.kaltura.dto.AverageRatingDTO; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaAttachment; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItem; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaException; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * Defines the services available to the web layer from the Kaltura Service + */ +public interface IKalturaService { + /** + * Makes a copy of the default content and assigns it a newContentID + * + * @params newContentID + * @return + */ + Kaltura copyDefaultContent(Long newContentID); + + /** + * Returns an instance of the Kaltura tools default content. + * + * @return + */ + Kaltura getDefaultContent(); + + /** + * @param toolSignature + * @return + */ + Long getDefaultContentIdBySignature(String toolSignature); + + /** + * @param toolContentID + * @return + */ + Kaltura getKalturaByContentId(Long toolContentID); + + /** + * @param toolContentId + * @param file + * @param type + * @return + */ + KalturaAttachment uploadFileToContent(Long toolContentId, FormFile file, String type); + + /** + * @param uuid + * @param versionID + */ + void deleteFromRepository(Long uuid, Long versionID) throws KalturaException; + + /** + * @param contentID + * @param uuid + * @param versionID + * @param type + */ + void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type); + + /** + * @param kaltura + */ + void saveOrUpdateKaltura(Kaltura kaltura); + + /** + * @param toolSessionId + * @return + */ + KalturaSession getSessionBySessionId(Long toolSessionId); + + /** + * @param kalturaSession + */ + void saveOrUpdateKalturaSession(KalturaSession kalturaSession); + + /** + * + * @param userId + * @param toolSessionId + * @return + */ + KalturaUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId); + + /** + * + * @param uid + * @return + */ + KalturaUser getUserByUid(Long uid); + + KalturaUser getUserByUserIdAndContentId(Long userId, Long contentId); + + /** + * + * @param kalturaUser + */ + void saveOrUpdateKalturaUser(KalturaUser kalturaUser); + + /** + * + * @param user + * @param kalturaSession + * @return + */ + KalturaUser createKalturaUser(UserDTO user, KalturaSession kalturaSession); + + /** + * + * @param id + * @param idType + * @param signature + * @param userID + * @param title + * @param entry + * @return + */ + Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry); + + NotebookEntry getEntry(Long sessionId, Integer userId); + + void updateEntry(NotebookEntry notebookEntry); + + String finishToolSession(Long toolSessionId, Long userId) throws KalturaException; + + boolean isGroupedActivity(long toolContentID); + + void deleteKalturaItem(Long uid); + + KalturaItem getKalturaItem(Long itemUid); + + void saveKalturaItem(KalturaItem item); + + /** + * Return all items submitted by the users of a group plus all authored items. + * + * @param toolContentId + * @param toolSessionId + * @param useId + * @param isMonitoring if true show all items from the group regardless of hidden and isAllowSeeingOtherUsersRecordings parameters. + * @return + */ + Set getGroupItems(Long toolContentId, Long toolSessionId, Long useId, boolean isMonitoring); + + String getLocalisedMessage(String key, Object[] args); + + /** + * Creates new KalturaItemVisitLog object with information about this item access. + * + * @param itemUid + * @param userId + * @param toolSessionId + */ + void logItemWatched(Long itemUid, Long userId, Long toolSessionId); + + AverageRatingDTO rateMessage(Long itemUid, Long userId, Long toolSessionID, float rating); + + /** + * Calculates AverageRatingDTO by the given itemUid. + * + * @param itemUid + * @param sessionId + * @return + */ + AverageRatingDTO getAverageRatingDto(Long itemUid, Long sessionId); + + /** + * Update item mark. + * + * @param itemUid + * @param mark + */ + void markItem(Long itemUid, Long mark); + + /** + * Hide/show item. + * + * @param itemUid + * @param isHiding true if item needs to be hidden, false - otherwise + */ + void hideItem(Long itemUid, boolean isHiding); + + /** + * Hide/show comment. + * + * @param commentUid + * @param isHiding true if comment needs to be hidden, false - otherwise + */ + void hideComment(Long commentUid, boolean isHiding); + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaOutputFactory.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaOutputFactory.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaOutputFactory.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,139 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaOutputFactory.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.service; + +import java.util.List; +import java.util.SortedMap; +import java.util.TreeMap; + +import org.lamsfoundation.lams.tool.OutputFactory; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants; + +/** + * Output factory for Kaltura tool. Currently it provides only one type of output - the entry that user provided. + * + * @author Andrey Balan + */ +public class KalturaOutputFactory extends OutputFactory { + + /** + * {@inheritDoc} + */ + @Override + public SortedMap getToolOutputDefinitions(Object toolContentObject, int definitionType) + throws ToolException { + SortedMap definitionMap = new TreeMap(); + Class stringArrayClass = new String[] {}.getClass(); + switch (definitionType) { + case ToolOutputDefinition.DATA_OUTPUT_DEFINITION_TYPE_CONDITION: + if (toolContentObject != null) { + ToolOutputDefinition kalturaEntryDefinition = buildStringOutputDefinition(KalturaConstants.USER_ENTRY_DEFINITION_NAME); + kalturaEntryDefinition.setShowConditionNameOnly(true); + definitionMap.put(KalturaConstants.USER_ENTRY_DEFINITION_NAME, kalturaEntryDefinition); + } + case ToolOutputDefinition.DATA_OUTPUT_DEFINITION_TYPE_DATA_FLOW: + ToolOutputDefinition allUsersEntriesDefinition = buildComplexOutputDefinition( + KalturaConstants.ALL_USERS_ENTRIES_DEFINITION_NAME, stringArrayClass); + definitionMap.put(KalturaConstants.ALL_USERS_ENTRIES_DEFINITION_NAME, allUsersEntriesDefinition); + break; + } + + return definitionMap; + } + + /** + * Follows {@link KalturaService#getToolOutput(List, Long, Long)}. + * + */ + public SortedMap getToolOutput(List names, IKalturaService kalturaService, + Long toolSessionId, Long learnerId) { + + TreeMap outputs = new TreeMap(); + // tool output cache + TreeMap baseOutputs = new TreeMap(); + if (names == null) { + // TODO have a look if we'll have any outputs what should be done + } else { + for (String name : names) { + String[] nameParts = splitConditionName(name); + if (baseOutputs.get(nameParts[0]) != null) { + outputs.put(name, baseOutputs.get(nameParts[0])); + } else { + ToolOutput output = getToolOutput(name, kalturaService, toolSessionId, learnerId); + if (output != null) { + outputs.put(name, output); + baseOutputs.put(nameParts[0], output); + } + } + } + } + return outputs; + + } + + public ToolOutput getToolOutput(String name, IKalturaService kalturaService, Long toolSessionId, Long learnerId) { + String[] nameParts = splitConditionName(name); +// if (KalturaConstants.USER_ENTRY_DEFINITION_NAME.equals(nameParts[0])) { +// // entry is loaded from DB +// Kaltura kaltura = kalturaService.getSessionBySessionId(toolSessionId).getKaltura(); +// +// KalturaUser user = kalturaService.getUserByUserIdAndSessionId(learnerId, toolSessionId); +// +// if (user != null) { +// NotebookEntry entry = kalturaService.getEntry(user.getEntryUID()); +// +// String value = entry == null ? null : entry.getEntry(); +// +// return new ToolOutput(name, getI18NText(KalturaConstants.USER_ENTRY_DEFINITION_NAME, true), value); +// } +// } else if (KalturaConstants.ALL_USERS_ENTRIES_DEFINITION_NAME.equals(nameParts[0])) { +// Set users = kalturaService.getSessionBySessionId(toolSessionId).getKalturaUsers(); +// String[] usersEntries = new String[users.size()]; +// int userIndex = 0; +// for (KalturaUser user : users) { +// Long entryUid = user.getEntryUID(); +// if (entryUid != null) { +// NotebookEntry entry = kalturaService.getEntry(entryUid); +// usersEntries[userIndex] = entry.getEntry(); +// } +// userIndex++; +// } +// return new ToolOutput(name, getI18NText(KalturaConstants.ALL_USERS_ENTRIES_DEFINITION_NAME, true), +// usersEntries, false); +// } + return null; + } + + @Override + protected String[] splitConditionName(String conditionName) { + return super.splitConditionName(conditionName); + } + + protected String buildUserEntryConditionName(String uniquePart) { + return super.buildConditionName(KalturaConstants.USER_ENTRY_DEFINITION_NAME, uniquePart); + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaService.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaService.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,768 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaService.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.service; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.sql.Timestamp; +import java.util.Date; +import java.util.Hashtable; +import java.util.List; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeSet; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.contentrepository.AccessDeniedException; +import org.lamsfoundation.lams.contentrepository.ICredentials; +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.InvalidParameterException; +import org.lamsfoundation.lams.contentrepository.LoginException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; +import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials; +import org.lamsfoundation.lams.learning.service.ILearnerService; +import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; +import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; +import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; +import org.lamsfoundation.lams.tool.ToolContentImport102Manager; +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.ToolSessionExportOutputData; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.exception.DataMissingException; +import org.lamsfoundation.lams.tool.exception.SessionDataExistsException; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaAttachmentDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaCommentDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaItemDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaItemVisitDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaRatingDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaSessionDAO; +import org.lamsfoundation.lams.tool.kaltura.dao.IKalturaUserDAO; +import org.lamsfoundation.lams.tool.kaltura.dto.AverageRatingDTO; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaAttachment; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaComment; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItem; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItemVisitLog; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaRating; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaException; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaItemComparator; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaToolContentHandler; +import org.lamsfoundation.lams.tool.service.ILamsToolService; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; +import org.lamsfoundation.lams.util.MessageService; +import org.lamsfoundation.lams.util.audit.IAuditService; + +/** + * An implementation of the IKalturaService interface. + * + * As a requirement, all LAMS tool's service bean must implement ToolContentManager and ToolSessionManager. + */ + +public class KalturaService implements ToolSessionManager, ToolContentManager, IKalturaService, + ToolContentImport102Manager { + + static Logger logger = Logger.getLogger(KalturaService.class.getName()); + + private IKalturaDAO kalturaDao = null; + + private IKalturaItemDAO kalturaItemDao = null; + + private IKalturaItemVisitDAO kalturaItemVisitDao = null; + + private IKalturaCommentDAO kalturaCommentDao = null; + + private IKalturaRatingDAO kalturaRatingDao = null; + + private IKalturaSessionDAO kalturaSessionDao = null; + + private IKalturaUserDAO kalturaUserDao = null; + + private IKalturaAttachmentDAO kalturaAttachmentDao = null; + + private ILearnerService learnerService; + + private ILamsToolService toolService; + + private IUserManagementService userManagementService; + + private MessageService messageService; + + private IToolContentHandler kalturaToolContentHandler = null; + + private IRepositoryService repositoryService = null; + + private IAuditService auditService = null; + + private IExportToolContentService exportContentService; + + private ICoreNotebookService coreNotebookService; + + private KalturaOutputFactory kalturaOutputFactory; + + public KalturaService() { + super(); + } + + /* ************ Methods from ToolSessionManager ************* */ + @Override + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { + if (logger.isDebugEnabled()) { + logger.debug("entering method createToolSession:" + " toolSessionId = " + toolSessionId + + " toolSessionName = " + toolSessionName + " toolContentId = " + toolContentId); + } + + KalturaSession session = new KalturaSession(); + session.setSessionId(toolSessionId); + session.setSessionName(toolSessionName); + // learner starts + Kaltura kaltura = kalturaDao.getByContentId(toolContentId); + session.setKaltura(kaltura); + kalturaSessionDao.saveOrUpdate(session); + } + + @Override + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { + return learnerService.completeToolSession(toolSessionId, learnerId); + } + + @Override + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException { + return null; + } + + @Override + public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException, + ToolException { + return null; + } + + @Override + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { + kalturaSessionDao.deleteBySessionID(toolSessionId); + } + + @Override + public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { + return getKalturaOutputFactory().getToolOutput(names, this, toolSessionId, learnerId); + } + + @Override + public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { + return getKalturaOutputFactory().getToolOutput(name, this, toolSessionId, learnerId); + } + + /* ************ Methods from ToolContentManager ************************* */ + + @Override + public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { + + if (logger.isDebugEnabled()) { + logger.debug("entering method copyToolContent:" + " fromContentId=" + fromContentId + + " toContentId=" + toContentId); + } + + if (toContentId == null) { + String error = "Failed to copy tool content: toContentID is null"; + throw new ToolException(error); + } + + Kaltura fromContent = null; + if (fromContentId != null) { + fromContent = kalturaDao.getByContentId(fromContentId); + } + if (fromContent == null) { + // create the fromContent using the default tool content + fromContent = getDefaultContent(); + } + Kaltura toContent = Kaltura.newInstance(fromContent, toContentId, kalturaToolContentHandler); + kalturaDao.saveOrUpdate(toContent); + } + + @Override + public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Kaltura kaltura = kalturaDao.getByContentId(toolContentId); + if (kaltura == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + kaltura.setDefineLater(value); + kalturaDao.saveOrUpdate(kaltura); + } + + @Override + public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Kaltura kaltura = kalturaDao.getByContentId(toolContentId); + if (kaltura == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + kaltura.setRunOffline(value); + kalturaDao.saveOrUpdate(kaltura); + } + + @Override + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, + ToolException { + } + + @Override + public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { + Kaltura kaltura = kalturaDao.getByContentId(toolContentId); + if (kaltura == null) { + kaltura = getDefaultContent(); + } + if (kaltura == null) { + throw new DataMissingException("Unable to find default content for the kaltura tool"); + } + + // set ResourceToolContentHandler as null to avoid copy file node in + // repository again. + kaltura = Kaltura.newInstance(kaltura, toolContentId, null); + kaltura.setToolContentHandler(null); + kaltura.setKalturaSessions(null); + Set atts = kaltura.getKalturaAttachments(); + for (KalturaAttachment att : atts) { + att.setKaltura(null); + } + try { + exportContentService.registerFileClassForExport(KalturaAttachment.class.getName(), "fileUuid", + "fileVersionId"); + exportContentService.exportToolContent(toolContentId, kaltura, kalturaToolContentHandler, rootPath); + } catch (ExportToolContentException e) { + throw new ToolException(e); + } + } + + @Override + public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion, + String toVersion) throws ToolException { + try { + exportContentService.registerFileClassForImport(KalturaAttachment.class.getName(), "fileUuid", + "fileVersionId", "fileName", "fileType", null, null); + + Object toolPOJO = exportContentService.importToolContent(toolContentPath, kalturaToolContentHandler, + fromVersion, toVersion); + if (!(toolPOJO instanceof Kaltura)) { + throw new ImportToolContentException("Import Kaltura tool content failed. Deserialized object is " + + toolPOJO); + } + Kaltura kaltura = (Kaltura) toolPOJO; + + // reset it to new toolContentId + kaltura.setToolContentId(toolContentId); + KalturaUser user = kalturaUserDao.getByUserIdAndContentId(new Long(newUserUid.longValue()), + toolContentId); + if (user == null) { + user = new KalturaUser(); + UserDTO sysUser = ((User) userManagementService.findById(User.class, newUserUid)).getUserDTO(); + user.setFirstName(sysUser.getFirstName()); + user.setLastName(sysUser.getLastName()); + user.setLoginName(sysUser.getLogin()); + user.setUserId(new Long(newUserUid.longValue())); + user.setKaltura(kaltura); + } + kaltura.setCreatedBy(user); + + // reset all assessmentquestion createBy user + Set items = kaltura.getKalturaItems(); + for (KalturaItem item : items) { + item.setCreatedBy(user); + } + + kalturaDao.saveOrUpdate(kaltura); + } catch (ImportToolContentException e) { + throw new ToolException(e); + } + } + + @Override + public SortedMap getToolOutputDefinitions(Long toolContentId, int definitionType) + throws ToolException { + Kaltura kaltura = kalturaDao.getByContentId(toolContentId); + if (kaltura == null) { + kaltura = getDefaultContent(); + } + return getKalturaOutputFactory().getToolOutputDefinitions(kaltura, definitionType); + } + + /* ********** IKalturaService Methods ********************************* */ + @Override + public Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId, + String entryText) { + return coreNotebookService.createNotebookEntry(sessionId, notebookToolType, toolSignature, userId, "", + entryText); + } + + @Override + public NotebookEntry getEntry(Long sessionId, Integer userId) { + List list = coreNotebookService.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + KalturaConstants.TOOL_SIGNATURE, userId); + if (list == null || list.isEmpty()) { + return null; + } else { + return list.get(0); + } + } + + @Override + public void updateEntry(NotebookEntry notebookEntry) { + coreNotebookService.updateEntry(notebookEntry); + } + + @Override + public String finishToolSession(Long toolSessionId, Long userId) throws KalturaException { + KalturaUser user = kalturaUserDao.getByUserIdAndSessionId(userId, toolSessionId); + user.setFinishedActivity(true); + kalturaUserDao.saveOrUpdate(user); + + String nextUrl = null; + try { + nextUrl = this.leaveToolSession(toolSessionId, userId); + } catch (DataMissingException e) { + throw new KalturaException(e); + } catch (ToolException e) { + throw new KalturaException(e); + } + return nextUrl; + } + + @Override + public AverageRatingDTO rateMessage(Long itemUid, Long userId, Long toolSessionId, float rating) { + KalturaUser user = getUserByUserIdAndSessionId(userId, toolSessionId); + KalturaRating itemRating = kalturaRatingDao.getKalturaRatingByItemAndUser(itemUid, userId); + KalturaItem item = getKalturaItem(itemUid); + + //persist KalturaRating changes in DB + if (itemRating == null) { // add + itemRating = new KalturaRating(); + itemRating.setCreateBy(user); + itemRating.setKalturaItem(item); + } + itemRating.setRating(rating); + kalturaRatingDao.insertOrUpdate(itemRating); + + //to make available new changes be visible in jsp page + return kalturaRatingDao.getAverageRatingDtoByItem(itemUid, toolSessionId); + } + + @Override + public AverageRatingDTO getAverageRatingDto(Long itemUid, Long sessionId) { + return kalturaRatingDao.getAverageRatingDtoByItem(itemUid, sessionId); + } + + @Override + public void deleteKalturaItem(Long uid) { + kalturaItemDao.deleteById(KalturaItem.class, uid); + } + + @Override + public KalturaItem getKalturaItem(Long itemUid) { + return kalturaItemDao.getByUid(itemUid); + } + + @Override + public void saveKalturaItem(KalturaItem item) { + kalturaItemDao.insertOrUpdate(item); + } + + @Override + public Set getGroupItems(Long toolContentId, Long toolSessionId, Long useId, boolean isMonitoring) { + TreeSet groupItems = new TreeSet(new KalturaItemComparator()); + + Kaltura kaltura = getKalturaByContentId(toolContentId); + Set allItems = kaltura.getKalturaItems(); + + for (KalturaItem item : allItems) { + //hide hidden items from learner and ignore this parameter for teacher + boolean isHidden = isMonitoring || !isMonitoring && !item.isHidden(); + + //remove hidden + if (isHidden && + //show authored items + (item.isCreateByAuthor() + //user should see his own items + || item.getCreatedBy().getUserId().equals(useId) + //filter items from other groups + || item.getCreatedBy().getSession().getSessionId().equals(toolSessionId) && (kaltura.isAllowSeeingOtherUsersRecordings() || isMonitoring) )) { + + groupItems.add(item); + } + } + + return groupItems; + } + + @Override + public void logItemWatched(Long itemUid, Long userId, Long toolSessionId) { + KalturaItemVisitLog log = kalturaItemVisitDao.getKalturaItemLog(itemUid, userId); + if (log == null) { + log = new KalturaItemVisitLog(); + KalturaItem item = kalturaItemDao.getByUid(itemUid); + log.setKalturaItem(item); + KalturaUser user = kalturaUserDao.getByUserIdAndSessionId(userId, toolSessionId); + log.setUser(user); + log.setComplete(false); + log.setSessionId(toolSessionId); + log.setAccessDate(new Timestamp(new Date().getTime())); + kalturaItemVisitDao.insert(log); + } + } + + @Override + public void markItem(Long itemUid, Long mark) { + KalturaItem item = kalturaItemDao.getByUid(itemUid); + item.setMark(mark); + kalturaItemDao.update(item); + } + + @Override + public void hideItem(Long itemUid, boolean isHiding) { + KalturaItem item = kalturaItemDao.getByUid(itemUid); + if (item != null) { + item.setHidden(isHiding); + kalturaItemDao.update(item); + } + } + + @Override + public void hideComment(Long commentUid, boolean isHiding) { + KalturaComment comment = kalturaCommentDao.getCommentByUid(commentUid); + if (comment != null) { + comment.setHidden(isHiding); + kalturaCommentDao.update(comment); + } + } + + @Override + public Long getDefaultContentIdBySignature(String toolSignature) { + Long toolContentId = null; + toolContentId = new Long(toolService.getToolDefaultContentIdBySignature(toolSignature)); + if (toolContentId == null) { + String error = "Could not retrieve default content id for this tool"; + logger.error(error); + throw new KalturaException(error); + } + return toolContentId; + } + + @Override + public Kaltura getDefaultContent() { + Long defaultContentID = getDefaultContentIdBySignature(KalturaConstants.TOOL_SIGNATURE); + Kaltura defaultContent = getKalturaByContentId(defaultContentID); + if (defaultContent == null) { + String error = "Could not retrieve default content record for this tool"; + logger.error(error); + throw new KalturaException(error); + } + return defaultContent; + } + + @Override + public Kaltura copyDefaultContent(Long newContentID) { + + if (newContentID == null) { + String error = "Cannot copy the Kaltura tools default content: + " + "newContentID is null"; + logger.error(error); + throw new KalturaException(error); + } + + Kaltura defaultContent = getDefaultContent(); + // create new kaltura using the newContentID + Kaltura newContent = new Kaltura(); + newContent = Kaltura.newInstance(defaultContent, newContentID, kalturaToolContentHandler); + kalturaDao.saveOrUpdate(newContent); + return newContent; + } + + @Override + public Kaltura getKalturaByContentId(Long toolContentID) { + Kaltura kaltura = kalturaDao.getByContentId(toolContentID); + if (kaltura == null) { + logger.debug("Could not find the content with toolContentID:" + toolContentID); + } + return kaltura; + } + + @Override + public KalturaSession getSessionBySessionId(Long toolSessionId) { + KalturaSession kalturaSession = kalturaSessionDao.getBySessionId(toolSessionId); + if (kalturaSession == null) { + logger.debug("Could not find the kaltura session with toolSessionID:" + toolSessionId); + } + return kalturaSession; + } + + @Override + public KalturaUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId) { + return kalturaUserDao.getByUserIdAndSessionId(userId, toolSessionId); + } + + @Override + public KalturaUser getUserByUid(Long uid) { + return kalturaUserDao.getByUid(uid); + } + + @Override + public KalturaUser getUserByUserIdAndContentId(Long userId, Long contentId) { + return kalturaUserDao.getByUserIdAndContentId(userId, contentId); + } + + @Override + public KalturaAttachment uploadFileToContent(Long toolContentId, FormFile file, String type) { + if (file == null || StringUtils.isEmpty(file.getFileName())) { + throw new KalturaException("Could not find upload file: " + file); + } + + NodeKey nodeKey = processFile(file, type); + + KalturaAttachment attachment = new KalturaAttachment(nodeKey.getVersion(), type, file.getFileName(), + nodeKey.getUuid(), new Date()); + return attachment; + } + + @Override + public void deleteFromRepository(Long uuid, Long versionID) throws KalturaException { + ITicket ticket = getRepositoryLoginTicket(); + try { + repositoryService.deleteVersion(ticket, uuid, versionID); + } catch (Exception e) { + throw new KalturaException("Exception occured while deleting files from" + " the repository " + + e.getMessage()); + } + } + + @Override + public void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type) { + kalturaDao.deleteInstructionFile(contentID, uuid, versionID, type); + + } + + @Override + public void saveOrUpdateKaltura(Kaltura kaltura) { + kalturaDao.saveOrUpdate(kaltura); + } + + @Override + public void saveOrUpdateKalturaSession(KalturaSession kalturaSession) { + kalturaSessionDao.saveOrUpdate(kalturaSession); + } + + @Override + public void saveOrUpdateKalturaUser(KalturaUser kalturaUser) { + kalturaUserDao.saveOrUpdate(kalturaUser); + } + + @Override + public KalturaUser createKalturaUser(UserDTO user, KalturaSession kalturaSession) { + KalturaUser kalturaUser = new KalturaUser(user, kalturaSession); + saveOrUpdateKalturaUser(kalturaUser); + return kalturaUser; + } + + public IAuditService getAuditService() { + return auditService; + } + + public void setAuditService(IAuditService auditService) { + this.auditService = auditService; + } + + @Override + public String getLocalisedMessage(String key, Object[] args) { + return messageService.getMessage(key, args); + } + + private NodeKey processFile(FormFile file, String type) { + NodeKey node = null; + if (file != null && !StringUtils.isEmpty(file.getFileName())) { + String fileName = file.getFileName(); + try { + node = kalturaToolContentHandler.uploadFile(file.getInputStream(), fileName, + file.getContentType(), type); + } catch (InvalidParameterException e) { + throw new KalturaException("InvalidParameterException occured while trying to upload File" + + e.getMessage()); + } catch (FileNotFoundException e) { + throw new KalturaException("FileNotFoundException occured while trying to upload File" + e.getMessage()); + } catch (RepositoryCheckedException e) { + throw new KalturaException("RepositoryCheckedException occured while trying to upload File" + + e.getMessage()); + } catch (IOException e) { + throw new KalturaException("IOException occured while trying to upload File" + e.getMessage()); + } + } + return node; + } + + /** + * This method verifies the credentials of the SubmitFiles Tool and gives it the Ticket to login and + * access the Content Repository. + * + * A valid ticket is needed in order to access the content from the repository. This method would be called evertime + * the tool needs to upload/download files from the content repository. + * + * @return ITicket The ticket for repostory access + * @throws SubmitFilesException + */ + private ITicket getRepositoryLoginTicket() throws KalturaException { + ICredentials credentials = new SimpleCredentials(KalturaToolContentHandler.repositoryUser, + KalturaToolContentHandler.repositoryId); + try { + ITicket ticket = repositoryService.login(credentials, KalturaToolContentHandler.repositoryWorkspaceName); + return ticket; + } catch (AccessDeniedException ae) { + throw new KalturaException("Access Denied to repository." + ae.getMessage()); + } catch (WorkspaceNotFoundException we) { + throw new KalturaException("Workspace not found." + we.getMessage()); + } catch (LoginException e) { + throw new KalturaException("Login failed." + e.getMessage()); + } + } + + /* ===============Methods implemented from ToolContentImport102Manager =============== */ + + /** + * Import the data for a 1.0.2 Kaltura + */ + public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) { + } + + @Override + public void setReflectiveData(Long toolContentId, String title, String description) throws ToolException, + DataMissingException { + + logger.warn("Setting the reflective field on a kaltura. This doesn't make sense as the kaltura is for reflection and we don't reflect on reflection!"); + Kaltura kaltura = getKalturaByContentId(toolContentId); + if (kaltura == null) { + throw new DataMissingException("Unable to set reflective data titled " + title + + " on activity toolContentId " + toolContentId + " as the tool content does not exist."); + } + + kaltura.setInstructions(description); + } + + // ========================================================================================= + /* ********** Used by Spring to "inject" the linked objects ************* */ + + public void setKalturaAttachmentDao(IKalturaAttachmentDAO attachmentDAO) { + kalturaAttachmentDao = attachmentDAO; + } + + public void setKalturaDao(IKalturaDAO kalturaDAO) { + this.kalturaDao = kalturaDAO; + } + + public void setKalturaItemDao(IKalturaItemDAO kalturaItemDAO) { + this.kalturaItemDao = kalturaItemDAO; + } + + public void setKalturaItemVisitDao(IKalturaItemVisitDAO kalturaItemVisitDAO) { + this.kalturaItemVisitDao = kalturaItemVisitDAO; + } + + public void setKalturaCommentDao(IKalturaCommentDAO kalturaCommentDAO) { + this.kalturaCommentDao = kalturaCommentDAO; + } + + public void setKalturaRatingDao(IKalturaRatingDAO kalturaRatingDAO) { + this.kalturaRatingDao = kalturaRatingDAO; + } + + public void setKalturaToolContentHandler(IToolContentHandler kalturaToolContentHandler) { + this.kalturaToolContentHandler = kalturaToolContentHandler; + } + + public void setKalturaSessionDao(IKalturaSessionDAO sessionDAO) { + kalturaSessionDao = sessionDAO; + } + + public void setToolService(ILamsToolService toolService) { + this.toolService = toolService; + } + + public void setKalturaUserDao(IKalturaUserDAO userDAO) { + kalturaUserDao = userDAO; + } + + public void setLearnerService(ILearnerService learnerService) { + this.learnerService = learnerService; + } + + public IExportToolContentService getExportContentService() { + return exportContentService; + } + + public void setExportContentService(IExportToolContentService exportContentService) { + this.exportContentService = exportContentService; + } + + public void setUserManagementService(IUserManagementService userManagementService) { + this.userManagementService = userManagementService; + } + + public void setCoreNotebookService(ICoreNotebookService coreNotebookService) { + this.coreNotebookService = coreNotebookService; + } + + public void setRepositoryService(IRepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + public KalturaOutputFactory getKalturaOutputFactory() { + return kalturaOutputFactory; + } + + public void setKalturaOutputFactory(KalturaOutputFactory kalturaOutputFactory) { + this.kalturaOutputFactory = kalturaOutputFactory; + } + + public void setMessageService(MessageService messageService) { + this.messageService = messageService; + } + + public boolean isGroupedActivity(long toolContentID) { + return toolService.isGroupedActivity(toolContentID); + } + + public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) { + return getKalturaOutputFactory().getSupportedDefinitionClasses(definitionType); + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaServiceProxy.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaServiceProxy.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/service/KalturaServiceProxy.java 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,77 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaServiceProxy.java,v 1.1 2012/11/15 14:39:28 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.service; + +import javax.servlet.ServletContext; + +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + *

+ * This class act as the proxy between web layer and service layer. It is designed to decouple the presentation logic + * and business logic completely. In this way, the presentation tier will no longer be aware of the changes in service + * layer. Therefore we can feel free to switch the business logic implementation. + *

+ */ + +public class KalturaServiceProxy { + + public static final IKalturaService getKalturaService(ServletContext servletContext) { + return (IKalturaService) getKalturaDomainService(servletContext); + } + + private static Object getKalturaDomainService(ServletContext servletContext) { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean("kalturaService"); + } + + /* + * Return the kaltura tool version of tool session manager implementation. It will delegate to the Spring helper + * method to retrieve the proper bean from Spring bean factory. + * + * @param servletContext the servletContext for current application + * + * @return noticeboard service object. + */ + public static final ToolSessionManager getKalturaSessionManager(ServletContext servletContext) { + return (ToolSessionManager) getKalturaDomainService(servletContext); + } + + /* + * Return the kaltura tool version of tool content manager implementation. It will delegate to the Spring helper + * method to retrieve the proper bean from Spring bean factory. + * + * @param servletContext the servletContext for current application + * + * @return noticeboard service object. + */ + public static final ToolContentManager getKalturaContentManager(ServletContext servletContext) { + return (ToolContentManager) getKalturaDomainService(servletContext); + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaCommentComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaCommentComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaCommentComparator.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,46 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaCommentComparator.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.kaltura.model.KalturaComment; + +/** + * Comparator for ImageComment. + * + * @author Andrey Balan + */ +public class KalturaCommentComparator implements Comparator { + + @Override + public int compare(KalturaComment o1, KalturaComment o2) { + if (o1 != null && o2 != null) { + return o1.getCreateDate().compareTo(o2.getCreateDate()); + } else if (o1 != null) + return 1; + else + return -1; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaConstants.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaConstants.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,96 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaConstants.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.util; + +public interface KalturaConstants { + public static final String TOOL_SIGNATURE = "lakalt11"; + + // Kaltura session status + public static final Integer SESSION_NOT_STARTED = new Integer(0); + public static final Integer SESSION_IN_PROGRESS = new Integer(1); + public static final Integer SESSION_COMPLETED = new Integer(2); + + public static final String AUTHORING_DEFAULT_TAB = "1"; + public static final String ATTACHMENT_LIST = "attachmentList"; + public static final String DELETED_ATTACHMENT_LIST = "deletedAttachmentList"; + public static final String AUTH_SESSION_ID_COUNTER = "authoringSessionIdCounter"; + public static final String AUTH_SESSION_ID = "authoringSessionId"; + + public static final int MONITORING_SUMMARY_MAX_MESSAGES = 5; + + // Attribute names + public static final String ATTR_MESSAGE = "message"; + public static final String ATTR_SESSION_MAP = "sessionMap"; + public static final String ATTR_KALTURA = "kaltura"; + public static final String ATTR_ITEM = "item"; + public static final String ATTR_ITEMS = "items"; + public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; + public static final String ATTR_SUBMISSION_DEADLINE = "submissionDeadline"; + public static final String ATTR_IS_SUBMISSION_DEADLINE_PASSED = "isSubmissionDeadlinePassed"; + public static final String ATTR_ITEM_LIST = "itemList"; + public static final String ATTR_DELETED_ITEM_LIST = "deletedItemList"; + public static final String ATTR_REFLECTION_ON = "reflectOn"; + public static final String ATTR_REFLECTION_INSTRUCTION = "reflectInstructions"; + public static final String ATTR_REFLECTION_ENTRY = "reflectEntry"; + public static final String ATTR_REFLECT_LIST = "reflectList"; + public static final String ATTR_NEXT_ACTIVITY_URL = "nextActivityUrl"; + public static final String ATTR_FINISHED_LOCK = "finishedLock"; + public static final String ATTR_LOCK_ON_FINISH = "lockOnFinish"; + public static final String ATTR_USER_FINISHED = "userFinished"; + public static final String ATTR_COMMENT = "comment"; + public static final String ATTR_IS_ALLOW_UPLOADS = "isAllowUpload"; + public static final String ATTR_IS_USER_ITEM_AUTHOR = "isUserItemAuthor"; + public static final String ATTR_IS_GROUP_MONITORING = "isGroupMonitoring"; + + // Parameter names + public static final String PARAM_PARENT_PAGE = "parentPage"; + public static final String PARAM_ORDER_ID = "orderId"; + public static final String PARAM_ITEM_INDEX = "itemIndex"; + public static final String PARAM_ITEM_UID = "itemUid"; + public static final String PARAM_ITEM_TITLE = "itemTitle"; + public static final String PARAM_ITEM_DURATION = "itemDuration"; + public static final String PARAM_ITEM_ENTRY_ID = "itemEntryId"; + public static final String PARAM_COMMENT_UID = "commentUid"; + public static final String PARAM_IS_HIDING = "isHiding"; + public static final String USER_ENTRY_DEFINITION_NAME = "user.entry.output.definition.kaltura"; + public static final String USER_ENTRY_DEFAULT_CONDITION_DISPLAY_NAME_KEY = "user.entry.output.definition.kaltura.default.condition"; + public static final String ALL_USERS_ENTRIES_DEFINITION_NAME = "all.users.entries.definition.kaltura"; + + //forward names + public static final String SUCCESS = "success"; + public static final String VIEW_ITEM = "viewitem"; + public static final String COMMENT_LIST = "commentlist"; + public static final String ITEM_LIST = "itemlist"; + public static final String PREVIEW = "preview"; + public static final String NOTEBOOK = "notebook"; + public static final String FINISH = "finish"; + public static final String GROUP_LEARNING = "groupLearning"; + + public static final String ERROR_MSG_CONDITION = "error.condition"; + public static final String ERROR_MSG_NAME_BLANK = "error.condition.name.blank"; + public static final String ERROR_MSG_NAME_DUPLICATED = "error.condition.duplicated.name"; + public static final String ERROR_MSG_COMMENT_BLANK = "error.resource.image.comment.blank"; + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaException.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaException.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaException.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,57 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaException.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.util; + +/** + * + * @author Andrey Balan + * + */ +public class KalturaException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = -5518806968051758859L; + + public KalturaException(String message) { + super(message); + } + + public KalturaException(String message, Throwable cause) { + super(message, cause); + } + + public KalturaException() { + super(); + + } + + public KalturaException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaItemComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaItemComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaItemComparator.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,47 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaItemComparator.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItem; + +/** + * Comparator for KalturaItem. + * + * @author Andrey Balan + */ +public class KalturaItemComparator implements Comparator { + + @Override + public int compare(KalturaItem o1, KalturaItem o2) { + if (o1 != null && o2 != null) { + return o1.getSequenceId() - o2.getSequenceId(); + } else if (o1 != null) + return 1; + else + return -1; + } + +} \ No newline at end of file Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaToolContentHandler.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaToolContentHandler.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/util/KalturaToolContentHandler.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,76 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: KalturaToolContentHandler.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + */ +public class KalturaToolContentHandler extends ToolContentHandler { + + // TODO these three fields were changed to public, since accessor methods + // cannot be made static. Check if we can do this a better way. + public static String repositoryWorkspaceName = "kalturaworkspace"; + + public static String repositoryUser = "kaltura"; + + public static char[] repositoryId = { 'l', 'a', 'm', 's', '-', 'e', 'x' }; + + /** + * + */ + public KalturaToolContentHandler() { + super(); + } + + /* + * (non-Javadoc) + * + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryWorkspaceName() + */ + public String getRepositoryWorkspaceName() { + return repositoryWorkspaceName; + } + + /* + * (non-Javadoc) + * + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryUser() + */ + public String getRepositoryUser() { + return repositoryUser; + } + + /* + * (non-Javadoc) + * + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryId() + */ + public char[] getRepositoryId() { + return repositoryId; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/AuthoringAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/AuthoringAction.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,625 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: AuthoringAction.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.web.actions; + +import java.io.IOException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.math.NumberUtils; +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.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.apache.tomcat.util.json.JSONException; +import org.lamsfoundation.lams.authoring.web.AuthoringConstants; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaAttachment; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItem; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; +import org.lamsfoundation.lams.tool.kaltura.service.IKalturaService; +import org.lamsfoundation.lams.tool.kaltura.service.KalturaServiceProxy; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaException; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaItemComparator; +import org.lamsfoundation.lams.tool.kaltura.web.forms.AuthoringForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.FileValidatorUtil; +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; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @author Andrey Balan + * + * @struts.action path="/authoring" name="authoringForm" parameter="dispatch" scope="request" validate="false" + * + * @struts.action-forward name="success" path="tiles:/authoring/main" + * @struts.action-forward name="itemlist" path="/pages/authoring/itemlist.jsp" + * @struts.action-forward name="preview" path="/pages/authoring/preview.jsp" + */ +public class AuthoringAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(AuthoringAction.class); + + public IKalturaService kalturaService; + + // Authoring SessionMap key names + private static final String KEY_TOOL_CONTENT_ID = "toolContentID"; + private static final String KEY_CONTENT_FOLDER_ID = "contentFolderID"; + private static final String KEY_MODE = "mode"; + private static final String KEY_ONLINE_FILES = "onlineFiles"; + private static final String KEY_OFFLINE_FILES = "offlineFiles"; + private static final String KEY_UNSAVED_ONLINE_FILES = "unsavedOnlineFiles"; + private static final String KEY_UNSAVED_OFFLINE_FILES = "unsavedOfflineFiles"; + private static final String KEY_DELETED_FILES = "deletedFiles"; + + @Override + protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // Extract toolContentID from parameters. + Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + + ToolAccessMode mode = getAccessMode(request); + + // set up kalturaService + if (kalturaService == null) { + kalturaService = KalturaServiceProxy.getKalturaService(this.getServlet().getServletContext()); + } + + // retrieving Kaltura with given toolContentID + Kaltura kaltura = kalturaService.getKalturaByContentId(toolContentID); + if (kaltura == null) { + kaltura = kalturaService.copyDefaultContent(toolContentID); + kaltura.setCreateDate(new Date()); + kalturaService.saveOrUpdateKaltura(kaltura); + } + + if (mode != null && mode.isTeacher()) { + // Set the defineLater flag so that learners cannot use content + // while we + // are editing. This flag is released when updateContent is called. + kaltura.setDefineLater(true); + kalturaService.saveOrUpdateKaltura(kaltura); + } + + // Set up the authForm. + AuthoringForm authForm = (AuthoringForm) form; + authForm.setTitle(kaltura.getTitle()); + authForm.setInstructions(kaltura.getInstructions()); + authForm.setOnlineInstruction(kaltura.getOnlineInstructions()); + authForm.setOfflineInstruction(kaltura.getOfflineInstructions()); + authForm.setLockOnFinished(kaltura.isLockOnFinished()); + authForm.setAllowContributeVideos(kaltura.isAllowContributeVideos()); + authForm.setAllowSeeingOtherUsersRecordings(kaltura.isAllowSeeingOtherUsersRecordings()); + authForm.setLearnerContributionLimit(kaltura.getLearnerContributionLimit()); + authForm.setAllowComments(kaltura.isAllowComments()); + authForm.setAllowRatings(kaltura.isAllowRatings()); + authForm.setReflectOnActivity(kaltura.isReflectOnActivity()); + authForm.setReflectInstructions(kaltura.getReflectInstructions()); + + // Set up sessionMap + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP, sessionMap); + authForm.setSessionMapID(sessionMap.getSessionID()); + + sessionMap.put(AuthoringAction.KEY_MODE, mode); + sessionMap.put(AuthoringAction.KEY_CONTENT_FOLDER_ID, contentFolderID); + sessionMap.put(AuthoringAction.KEY_TOOL_CONTENT_ID, toolContentID); + sessionMap.put(AuthoringAction.KEY_ONLINE_FILES, new LinkedList()); + sessionMap.put(AuthoringAction.KEY_OFFLINE_FILES, new LinkedList()); + sessionMap.put(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, new LinkedList()); + sessionMap.put(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, new LinkedList()); + sessionMap.put(AuthoringAction.KEY_DELETED_FILES, new LinkedList()); + + Iterator iter = kaltura.getKalturaAttachments().iterator(); + while (iter.hasNext()) { + KalturaAttachment attachment = (KalturaAttachment) iter.next(); + String type = attachment.getFileType(); + if (type.equals(IToolContentHandler.TYPE_OFFLINE)) { + getAttList(AuthoringAction.KEY_OFFLINE_FILES, sessionMap).add(attachment); + } + if (type.equals(IToolContentHandler.TYPE_ONLINE)) { + getAttList(AuthoringAction.KEY_ONLINE_FILES, sessionMap).add(attachment); + } + } + + Set items = kaltura.getKalturaItems(); + // init taskList item list + SortedSet taskListItemList = getItemList(sessionMap); + taskListItemList.clear(); + taskListItemList.addAll(items); + + return mapping.findForward("success"); + } + + public ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // get authForm and session map. + AuthoringForm authForm = (AuthoringForm) form; + SessionMap sessionMap = getSessionMap(request, authForm); + + // get kaltura content. + Long toolContentId = (Long) sessionMap.get(AuthoringAction.KEY_TOOL_CONTENT_ID); + Kaltura kaltura = kalturaService.getKalturaByContentId(toolContentId); + + // update kaltura content using form inputs. + ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AuthoringAction.KEY_MODE); + kaltura.setTitle(authForm.getTitle()); + kaltura.setInstructions(authForm.getInstructions()); + if (mode.isAuthor()) { // Teacher cannot modify following + kaltura.setOfflineInstructions(authForm.getOfflineInstruction()); + kaltura.setOnlineInstructions(authForm.getOnlineInstruction()); + kaltura.setLockOnFinished(authForm.isLockOnFinished()); + kaltura.setAllowContributeVideos(authForm.isAllowContributeVideos()); + kaltura.setLearnerContributionLimit(authForm.getLearnerContributionLimit()); + kaltura.setAllowSeeingOtherUsersRecordings(authForm.isAllowSeeingOtherUsersRecordings()); + kaltura.setAllowComments(authForm.isAllowComments()); + kaltura.setAllowRatings(authForm.isAllowRatings()); + kaltura.setReflectOnActivity(authForm.isReflectOnActivity()); + kaltura.setReflectInstructions(authForm.getReflectInstructions()); + } + + // *******************************Handle user******************* + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + KalturaUser kalturaUser = kalturaService.getUserByUserIdAndContentId(new Long(user.getUserID().intValue()), + toolContentId); + if (kalturaUser == null) { + kalturaUser = new KalturaUser(user, kaltura); + } + + kaltura.setCreatedBy(kalturaUser); + + // remove attachments marked for deletion. + Set attachments = kaltura.getKalturaAttachments(); + if (attachments == null) { + attachments = new HashSet(); + } + + for (KalturaAttachment att : getAttList(AuthoringAction.KEY_DELETED_FILES, sessionMap)) { + // remove from db, leave in repository + attachments.remove(att); + } + + // add unsaved attachments + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, sessionMap)); + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, sessionMap)); + + // set attachments in case it didn't exist + kaltura.setKalturaAttachments(attachments); + + // ************************* Handle taskList items ******************* + Set itemList = new LinkedHashSet(); + SortedSet items = getItemList(sessionMap); + for (KalturaItem item : items) { + if (item != null) { + // This flushs user UID info to message if this user is a new user. + item.setCreatedBy(kalturaUser); + itemList.add(item); + } + } + kaltura.setKalturaItems(itemList); + + // delete KalturaItems from database. + for (KalturaItem item: getDeletedItemList(sessionMap)) { + if (item.getUid() != null) { + kalturaService.deleteKalturaItem(item.getUid()); + } + } + + // set the update date + kaltura.setUpdateDate(new Date()); + + // releasing defineLater flag so that learner can start using the tool. + kaltura.setDefineLater(false); + + kalturaService.saveOrUpdateKaltura(kaltura); + + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE); + + // add the sessionMapID to form + authForm.setSessionMapID(sessionMap.getSessionID()); + + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP, sessionMap); + + return mapping.findForward("success"); + } + + /** + * Stores uploaded entryId(s). + */ + public ActionForward addItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws JSONException, IOException { + + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMapID); + + // check whether it is "edit(old item)" or "add(new item)" + SortedSet itemList = getItemList(sessionMap); + KalturaItem item = new KalturaItem(); + item.setCreateDate(new Timestamp(new Date().getTime())); + int maxSeq = 1; + if (itemList != null && itemList.size() > 0) { + KalturaItem last = itemList.last(); + maxSeq = last.getSequenceId() + 1; + } + item.setSequenceId(maxSeq); + itemList.add(item); + + String title = WebUtil.readStrParam(request, KalturaConstants.PARAM_ITEM_TITLE); + if (StringUtils.isBlank(title)) { + String itemLocalized = kalturaService.getLocalisedMessage("label.authoring.item", null); + title = itemLocalized + " " + maxSeq; + } + item.setTitle(title); + + int duration = WebUtil.readIntParam(request, KalturaConstants.PARAM_ITEM_DURATION); + item.setDuration(duration); + + String entryId = WebUtil.readStrParam(request, KalturaConstants.PARAM_ITEM_ENTRY_ID); + if (StringUtils.isBlank(entryId)) { + String errorMsg = "Add item failed due to missing entityId (received from Kaltura server)."; + logger.error(errorMsg); + throw new KalturaException(errorMsg); + } + item.setEntryId(entryId); + + item.setCreateByAuthor(true); + item.setHidden(false); + + return mapping.findForward(KalturaConstants.ITEM_LIST); + } + + /** + * Preview uploaded entryId. + */ + public ActionForward preview(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws JSONException, IOException { + + // get back sessionMAP + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + + int itemIdx = NumberUtils.stringToInt(request.getParameter(KalturaConstants.PARAM_ITEM_INDEX), -1); + if (itemIdx != -1) { + SortedSet itemList = getItemList(sessionMap); + List rList = new ArrayList(itemList); + KalturaItem item = rList.get(itemIdx); + request.setAttribute(KalturaConstants.ATTR_ITEM, item); + } + + return mapping.findForward(KalturaConstants.PREVIEW); + } + + /** + * Remove kaltura item from HttpSession list and update page display. As authoring rule, all persist only happen + * when user submit whole page. So this remove is just impact HttpSession values. + */ + public ActionForward removeItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // get back sessionMAP + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMapID); + + int itemIdx = NumberUtils.stringToInt(request.getParameter(KalturaConstants.PARAM_ITEM_INDEX), -1); + if (itemIdx != -1) { + SortedSet itemList = getItemList(sessionMap); + List rList = new ArrayList(itemList); + KalturaItem item = rList.remove(itemIdx); + itemList.clear(); + itemList.addAll(rList); + // add to delList + List delList = getDeletedItemList(sessionMap); + delList.add(item); + } + + return mapping.findForward(KalturaConstants.ITEM_LIST); + } + + /** + * Move up current item. + */ + public ActionForward upItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return switchItem(mapping, request, true); + } + + /** + * Move down current item. + */ + public ActionForward downItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return switchItem(mapping, request, false); + } + + private ActionForward switchItem(ActionMapping mapping, HttpServletRequest request, boolean up) { + // get back sessionMAP + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMapID); + + int itemIdx = NumberUtils.stringToInt(request.getParameter(KalturaConstants.PARAM_ITEM_INDEX), -1); + if (itemIdx != -1) { + SortedSet kalturaList = getItemList(sessionMap); + List rList = new ArrayList(kalturaList); + // get current and the target item, and switch their sequnece + KalturaItem item = rList.get(itemIdx); + KalturaItem repItem; + if (up) { + repItem = rList.get(--itemIdx); + } else { + repItem = rList.get(++itemIdx); + } + int upSeqId = repItem.getSequenceId(); + repItem.setSequenceId(item.getSequenceId()); + item.setSequenceId(upSeqId); + + // put back list, it will be sorted again + kalturaList.clear(); + kalturaList.addAll(rList); + } + + return mapping.findForward(KalturaConstants.ITEM_LIST); + } + + public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward deleteOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward deleteOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward removeUnsavedOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward removeUnsavedOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + /* ========== Private Methods ********** */ + + private ActionForward uploadFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + FormFile file; + List unsavedFiles; + List savedFiles; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + file = authForm.getOfflineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + file = authForm.getOnlineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + // validate file max size + ActionMessages errors = new ActionMessages(); + FileValidatorUtil.validateFileSize(file, true, errors); + if (!errors.isEmpty()) { + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP, map); + this.saveErrors(request, errors); + return mapping.findForward("success"); + } + + if (file.getFileName().length() != 0) { + + // upload file to repository + KalturaAttachment newAtt = kalturaService.uploadFileToContent( + (Long) map.get(AuthoringAction.KEY_TOOL_CONTENT_ID), file, type); + + // Add attachment to unsavedFiles + // check to see if file with same name exists + KalturaAttachment currAtt; + Iterator iter = savedFiles.iterator(); + while (iter.hasNext()) { + currAtt = (KalturaAttachment) iter.next(); + if (StringUtils.equals(currAtt.getFileName(), newAtt.getFileName()) + && StringUtils.equals(currAtt.getFileType(), newAtt.getFileType())) { + // move from this this list to deleted list. + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(currAtt); + iter.remove(); + break; + } + } + unsavedFiles.add(newAtt); + + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + } + return mapping.findForward("success"); + } + + private ActionForward deleteFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List fileList; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + fileList = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + fileList = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + Iterator iter = fileList.iterator(); + + while (iter.hasNext()) { + KalturaAttachment att = (KalturaAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // move to delete file list, deleted at next updateContent + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(att); + + // remove from this list + iter.remove(); + break; + } + } + + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + private ActionForward removeUnsaved(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List unsavedFiles; + + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + } else { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + } + + Iterator iter = unsavedFiles.iterator(); + while (iter.hasNext()) { + KalturaAttachment att = (KalturaAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // delete from repository and list + kalturaService.deleteFromRepository(att.getFileUuid(), att.getFileVersionId()); + iter.remove(); + break; + } + } + + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + /** + * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode. + */ + private ToolAccessMode getAccessMode(HttpServletRequest request) { + ToolAccessMode mode; + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if (StringUtils.equalsIgnoreCase(modeStr, ToolAccessMode.TEACHER.toString())) { + mode = ToolAccessMode.TEACHER; + } else { + mode = ToolAccessMode.AUTHOR; + } + return mode; + } + + /** + * Retrieves a List of attachments from the map using the key. + */ + private List getAttList(String key, SessionMap map) { + List list = (List) map.get(key); + return list; + } + + /** + * Retrieve the SessionMap from the HttpSession. + */ + private SessionMap getSessionMap(HttpServletRequest request, AuthoringForm authForm) { + return (SessionMap) request.getSession().getAttribute(authForm.getSessionMapID()); + } + + /** + * List save current taskList items. + */ + private SortedSet getItemList(SessionMap sessionMap) { + SortedSet list = (SortedSet) sessionMap.get(KalturaConstants.ATTR_ITEM_LIST); + if (list == null) { + list = new TreeSet(new KalturaItemComparator()); + sessionMap.put(KalturaConstants.ATTR_ITEM_LIST, list); + } + return list; + } + + /** + * List save deleted taskList items, which could be persisted or non-persisted items. + */ + private List getDeletedItemList(SessionMap sessionMap) { + return getListFromSession(sessionMap, KalturaConstants.ATTR_DELETED_ITEM_LIST); + } + + /** + * Get java.util.List from HttpSession by given name. + */ + private List getListFromSession(SessionMap sessionMap, String name) { + List list = (List) sessionMap.get(name); + if (list == null) { + list = new ArrayList(); + sessionMap.put(name, list); + } + return list; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/ClearSessionAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/ClearSessionAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/ClearSessionAction.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,49 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: ClearSessionAction.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.web.actions; + +import javax.servlet.http.HttpSession; + +import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction; +import org.lamsfoundation.lams.tool.ToolAccessMode; + +/** + * This class give a chance to clear HttpSession when user save/close authoring page. + * + * @author Andrey Balan + * + * @struts:action path="/clearsession" validate="false" + * + */ +public class ClearSessionAction extends LamsAuthoringFinishAction { + + @Override + public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) { + if (mode.isAuthor()) { + session.removeAttribute(customiseSessionID); + } + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/LearningAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/LearningAction.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,606 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: LearningAction.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.web.actions; + +import java.io.IOException; +import java.sql.Timestamp; +import java.util.Date; +import java.util.Set; +import java.util.TimeZone; +import java.util.TreeSet; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.action.ActionRedirect; +import org.apache.tomcat.util.json.JSONException; +import org.apache.tomcat.util.json.JSONObject; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.kaltura.dto.AverageRatingDTO; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaComment; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaItem; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; +import org.lamsfoundation.lams.tool.kaltura.service.IKalturaService; +import org.lamsfoundation.lams.tool.kaltura.service.KalturaServiceProxy; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaCommentComparator; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaException; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaItemComparator; +import org.lamsfoundation.lams.tool.kaltura.web.forms.ReflectionForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.DateUtil; +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; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @author Andrey Balan + * + * @struts.action path="/learning" parameter="dispatch" scope="request" name="reflectionForm" validate="false" + * @struts.action-forward name="success" path="tiles:/learning/main" + * @struts:action-forward name ="viewitem" path="/learning.do?dispatch=viewItem" redirect="true" + * @struts.action-forward name="commentlist" path="/pages/learning/commentlist.jsp" + * @struts.action-forward name="runOffline" path="tiles:/learning/runOffline" + * @struts.action-forward name="defineLater" path="tiles:/learning/defineLater" + * @struts.action-forward name="notebook" path="tiles:/learning/notebook" + * @struts.action-forward name="finish" path="tiles:/learning/finish" + */ +public class LearningAction extends LamsDispatchAction { + + private static Logger log = Logger.getLogger(LearningAction.class); + + private IKalturaService service; + + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + initKalturaService(); + + // initialize Session Map + SessionMap sessionMap = new SessionMap(); + String sessionMapId = sessionMap.getSessionID(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMapId); + + // 'toolSessionID' and 'mode' paramters are expected to be present. + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, false); + sessionMap.put(AttributeNames.PARAM_MODE, mode); + Long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + sessionMap.put(AttributeNames.PARAM_TOOL_SESSION_ID, toolSessionId); + + // Retrieve the session and content. + KalturaSession kalturaSession = service.getSessionBySessionId(toolSessionId); + if (kalturaSession == null) { + throw new KalturaException("Cannot retrieve session with toolSessionID" + toolSessionId); + } + Kaltura kaltura = kalturaSession.getKaltura(); + //init getCreatedBy to avoid session close error in proxy object + kaltura.getCreatedBy().getLoginName(); + + //if this parameter true - this request is sent when Monitoring Group + boolean isGroupMonitoring = WebUtil.readBooleanParam(request, KalturaConstants.ATTR_IS_GROUP_MONITORING, false); + sessionMap.put(KalturaConstants.ATTR_IS_GROUP_MONITORING, isGroupMonitoring); + + KalturaUser user; + if (mode.equals(ToolAccessMode.TEACHER) && !isGroupMonitoring) { + Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); + user = service.getUserByUserIdAndSessionId(userID, toolSessionId); + } else { + //in case of lerning and group monitoring create new user + user = getCurrentUser(toolSessionId); + } + + // check defineLater + if (kaltura.isDefineLater()) { + return mapping.findForward("defineLater"); + } + + // Set the content in use flag. + if (!kaltura.isContentInUse()) { + kaltura.setContentInUse(new Boolean(true)); + service.saveOrUpdateKaltura(kaltura); + } + + // check runOffline + if (kaltura.isRunOffline()) { + return mapping.findForward("runOffline"); + } + + // reflection information + String entryText = new String(); + NotebookEntry notebookEntry = service.getEntry(toolSessionId, user.getUserId().intValue()); + if (notebookEntry != null) { + entryText = notebookEntry.getEntry(); + } + sessionMap.put(KalturaConstants.ATTR_REFLECTION_ON, kaltura.isReflectOnActivity()); + sessionMap.put(KalturaConstants.ATTR_REFLECTION_INSTRUCTION, kaltura.getReflectInstructions()); + sessionMap.put(KalturaConstants.ATTR_REFLECTION_ENTRY, entryText); + + // check whehter finish lock is on/off + boolean lockOnFinish = kaltura.isLockOnFinished() && user != null && user.isFinishedActivity(); + sessionMap.put(KalturaConstants.ATTR_FINISHED_LOCK, lockOnFinish); + sessionMap.put(KalturaConstants.ATTR_LOCK_ON_FINISH, kaltura.isLockOnFinished()); + sessionMap.put(KalturaConstants.ATTR_USER_FINISHED, user != null && user.isFinishedActivity()); + + // date and time restriction + Date submissionDeadline = kaltura.getSubmissionDeadline(); + if (submissionDeadline != null) { + // store submission deadline to sessionMap + sessionMap.put(KalturaConstants.ATTR_SUBMISSION_DEADLINE, submissionDeadline); + + HttpSession ss = SessionManager.getSession(); + UserDTO learnerDto = (UserDTO) ss.getAttribute(AttributeNames.USER); + TimeZone learnerTimeZone = learnerDto.getTimeZone(); + Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, submissionDeadline); + Date currentLearnerDate = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, new Date()); + + // calculate whether deadline has passed, and if so forward to "runOffline" + if (currentLearnerDate.after(tzSubmissionDeadline)) { + return mapping.findForward("runOffline"); + } + } + + sessionMap.put(KalturaConstants.ATTR_KALTURA, kaltura); + sessionMap.put(AttributeNames.USER, user); + + TreeSet items = getItems(mode, kaltura, toolSessionId, user.getUserId()); + //skip the next parameter if the tool doesn't contain videos + if (items.isEmpty()) { + KalturaItem item = new KalturaItem(); + item.setUid(new Long(-1)); + sessionMap.put(KalturaConstants.ATTR_ITEM, item); + sessionMap.put(KalturaConstants.ATTR_IS_ALLOW_UPLOADS, isAllowUpload(sessionMap, items)); + return mapping.findForward(KalturaConstants.SUCCESS); + } + + ActionRedirect redirect = new ActionRedirect(mapping.findForwardConfig(KalturaConstants.VIEW_ITEM)); + redirect.addParameter(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMapId); + redirect.addParameter(KalturaConstants.PARAM_ITEM_UID, items.first().getUid()); + return redirect; + } + + public ActionForward viewItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + initKalturaService(); + + // get back SessionMap + String sessionMapID = request.getParameter(KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); + KalturaUser user = (KalturaUser) sessionMap.get(AttributeNames.USER); + Long userId = user.getUserId(); + Long toolSessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + Kaltura kaltura = (Kaltura) sessionMap.get(KalturaConstants.ATTR_KALTURA); + ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE); + + //get back item + Long itemUid = WebUtil.readLongParam(request, KalturaConstants.PARAM_ITEM_UID); + KalturaItem item = service.getKalturaItem(itemUid); + if (mode.isLearner()) { + service.logItemWatched(item.getUid(), userId, toolSessionId); + } + + //items from DB + TreeSet items = getItems(mode, kaltura, toolSessionId, userId); + + //filter comments and store current item comments to sessionMap + if (kaltura.isAllowComments()) { + + //filter out comments from the other groups. We need this to display number of comments + for (KalturaItem dbItem : items) { + Set groupComments = getGroupComments(dbItem, toolSessionId, mode); + //set to groupComments to avoid session flushing changes to DB + dbItem.setGroupComments(groupComments); + } + } + + if (kaltura.isAllowRatings()) { + boolean isUserItemAuthor = (item.getCreatedBy() == null) && kaltura.getCreatedBy().getUserId().equals(userId) + || (item.getCreatedBy() != null) && item.getCreatedBy().equals(user); + sessionMap.put(KalturaConstants.ATTR_IS_USER_ITEM_AUTHOR, isUserItemAuthor); + + for (KalturaItem dbItem : items) { + AverageRatingDTO averageRatingDto = service.getAverageRatingDto(dbItem.getUid(), toolSessionId); + dbItem.setAverageRatingDto(averageRatingDto); + } + } + + sessionMap.put(KalturaConstants.ATTR_IS_ALLOW_UPLOADS, isAllowUpload(sessionMap, items)); + + //refresh items + items.remove(item); + sessionMap.put(KalturaConstants.ATTR_ITEM, item); + sessionMap.put(KalturaConstants.ATTR_ITEMS, items); + + return mapping.findForward(KalturaConstants.SUCCESS); + } + + /** + * Stores uploaded entryId(s). + */ + public ActionForward saveNewItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws JSONException, IOException { + initKalturaService(); + + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + KalturaUser user = (KalturaUser) sessionMap.get(AttributeNames.USER); + Long toolSessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + + KalturaSession kalturaSession = service.getSessionBySessionId(toolSessionId); + Kaltura kaltura = kalturaSession.getKaltura(); + TreeSet allItems = new TreeSet(new KalturaItemComparator()); + allItems.addAll(kaltura.getKalturaItems()); + + // check user can upload item + boolean isAllowUpload = isAllowUpload(sessionMap, allItems); + if (!isAllowUpload) { + return null; + } + + KalturaItem item = new KalturaItem(); + item.setCreateDate(new Timestamp(new Date().getTime())); + int maxSeq = 1; + if (allItems != null && allItems.size() > 0) { + KalturaItem last = allItems.last(); + maxSeq = last.getSequenceId() + 1; + } + item.setSequenceId(maxSeq); + + String title = WebUtil.readStrParam(request, KalturaConstants.PARAM_ITEM_TITLE); + if (StringUtils.isBlank(title)) { + String itemLocalized = service.getLocalisedMessage("label.authoring.item", null); + title = itemLocalized + " " + maxSeq; + } + item.setTitle(title); + + int duration = WebUtil.readIntParam(request, KalturaConstants.PARAM_ITEM_DURATION); + item.setDuration(duration); + + String entryId = WebUtil.readStrParam(request, KalturaConstants.PARAM_ITEM_ENTRY_ID); + if (StringUtils.isBlank(entryId)) { + String errorMsg = "Add item failed due to missing entityId (received from Kaltura server)."; + log.error(errorMsg); + throw new KalturaException(errorMsg); + } + item.setEntryId(entryId); + + item.setCreatedBy(user); + item.setCreateByAuthor(false); + item.setHidden(false); + item.setKalturaUid(kaltura.getUid()); + service.saveKalturaItem(item); + + JSONObject JSONObject = new JSONObject(); + JSONObject.put(KalturaConstants.PARAM_ITEM_UID, item.getUid()); + response.setContentType("application/x-json"); + response.getWriter().print(JSONObject); + return null; + } + + /** + *Comment current item. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward commentItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + initKalturaService(); + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + Long toolSessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE); + String commentMessage = WebUtil.readStrParam(request, KalturaConstants.ATTR_COMMENT, true); + + if (StringUtils.isBlank(commentMessage)) { + ActionErrors errors = new ActionErrors(); + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(KalturaConstants.ERROR_MSG_COMMENT_BLANK)); + this.addErrors(request, errors); + return mapping.findForward(KalturaConstants.SUCCESS); + } + + KalturaComment comment = new KalturaComment(); + comment.setComment(commentMessage); + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + KalturaUser kalturaUser = service.getUserByUserIdAndSessionId(new Long(user.getUserID().intValue()), toolSessionId); + comment.setCreateBy(kalturaUser); + comment.setCreateDate(new Timestamp(new Date().getTime())); + + // persist Kaltura changes in DB + Long currentItemUid = new Long(request.getParameter(KalturaConstants.PARAM_ITEM_UID)); + KalturaItem item = service.getKalturaItem(currentItemUid); + Set dbComments = item.getComments(); + dbComments.add(comment); + service.saveKalturaItem(item); + + //refresh comments in the sessisonMap + KalturaItem sessionMapItem = (KalturaItem) sessionMap.get(KalturaConstants.ATTR_ITEM); + Set groupComments = getGroupComments(item, toolSessionId, mode); + sessionMapItem.setGroupComments(groupComments); + + request.setAttribute(KalturaConstants.ATTR_SESSION_MAP_ID, sessionMapID); + return mapping.findForward(KalturaConstants.COMMENT_LIST); + } + + /** + * Rates items submitted by other learners. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws JSONException + * @throws IOException + * @throws ServletException + * @throws ToolException + */ + public ActionForward rateItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws JSONException, IOException { + + initKalturaService(); + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + Long toolSessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + KalturaUser user = (KalturaUser) sessionMap.get(AttributeNames.USER); + + float rating = Float.parseFloat((String) request.getParameter("rate")); + Long itemUid = WebUtil.readLongParam(request, "idBox"); + + AverageRatingDTO averageRatingDto = service.rateMessage(itemUid, user.getUserId(), toolSessionId, rating); + + //refresh averageRatingDto in sessionMap + KalturaItem item = (KalturaItem) sessionMap.get(KalturaConstants.ATTR_ITEM); + item.setAverageRatingDto(averageRatingDto); + + JSONObject JSONObject = new JSONObject(); + JSONObject.put("averageRating", averageRatingDto.getRating()); + JSONObject.put("numberOfVotes", averageRatingDto.getNumberOfVotes()); + response.setContentType("application/x-json"); + response.getWriter().print(JSONObject); + return null; + } + + /** + * Display empty reflection form. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward newReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + initKalturaService(); + + // get session value + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + + ReflectionForm refForm = (ReflectionForm) form; + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + + refForm.setUserID(user.getUserID()); + refForm.setSessionMapID(sessionMapID); + + SessionMap map = (SessionMap) request.getSession().getAttribute(sessionMapID); + Long toolSessionID = (Long) map.get(AttributeNames.PARAM_TOOL_SESSION_ID); + NotebookEntry entry = service.getEntry(toolSessionID, user.getUserID()); + + if (entry != null) { + refForm.setEntryText(entry.getEntry()); + } + + return mapping.findForward(KalturaConstants.NOTEBOOK); + } + + /** + * Submit reflection form input database. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + initKalturaService(); + + ReflectionForm refForm = (ReflectionForm) form; + Integer userId = refForm.getUserID(); + + String sessionMapID = WebUtil.readStrParam(request, KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute( + sessionMapID); + Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + + // check for existing notebook entry + NotebookEntry entry = service.getEntry(sessionId, userId); + + if (entry == null) { + // create new entry + service.createNotebookEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + KalturaConstants.TOOL_SIGNATURE, userId, refForm.getEntryText()); + } else { + // update existing entry + entry.setEntry(refForm.getEntryText()); + entry.setLastModified(new Date()); + service.updateEntry(entry); + } + + return finishActivity(mapping, form, request, response); + } + + public ActionForward finishActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + initKalturaService(); + + // get back SessionMap + String sessionMapID = request.getParameter(KalturaConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute( + sessionMapID); + + Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + + // get sessionId from HttpServletRequest + String nextActivityUrl = null; + try { + HttpSession ss = SessionManager.getSession(); + UserDTO userDTO = (UserDTO) ss.getAttribute(AttributeNames.USER); + Long userID = new Long(userDTO.getUserID().longValue()); + + nextActivityUrl = service.finishToolSession(sessionId, userID); + request.setAttribute(KalturaConstants.ATTR_NEXT_ACTIVITY_URL, nextActivityUrl); + } catch (KalturaException e) { + LearningAction.log.error("Failed get next activity url:" + e.getMessage()); + } + + return mapping.findForward(KalturaConstants.FINISH); + } + + // ************************************************************************************* + // Private methods + // ************************************************************************************* + + /** + * Gets items from the DB. IF the mode is learner filters them based on the group sessionId + */ + private TreeSet getItems(ToolAccessMode mode, Kaltura kaltura, Long toolSessionId, Long userId) { + + // Create set of images, along with this filtering out items added by users from other groups + TreeSet items = new TreeSet(new KalturaItemComparator()); + items.addAll(service.getGroupItems(kaltura.getToolContentId(), toolSessionId, userId, mode.isTeacher())); + + for (KalturaItem item : items) { + // initialize login name to avoid session close error in proxy object + if (item.getCreatedBy() != null) { + item.getCreatedBy().getLoginName(); + } + } + + return items; + } + + /** + * Checks whether further upload is allowed. + */ + private boolean isAllowUpload(SessionMap sessionMap, Set items) { + Kaltura kaltura = (Kaltura) sessionMap.get(KalturaConstants.ATTR_KALTURA); + ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE); + KalturaUser user = (KalturaUser) sessionMap.get(AttributeNames.USER); + + boolean isAllowUpload = false; + if (kaltura.isAllowContributeVideos() && !mode.equals(ToolAccessMode.TEACHER)) { + int numberOfUploadedItems = 0; + for (KalturaItem item : items) { + if (item.getCreatedBy() != null && item.getCreatedBy().equals(user)) { + numberOfUploadedItems++; + } + } + int learnerContributionLimit = kaltura.getLearnerContributionLimit(); + isAllowUpload = (learnerContributionLimit == Kaltura.TYPE_LEARNER_CONTRIBUTION_LIMIT_UNLIMITED) + || (numberOfUploadedItems < kaltura.getLearnerContributionLimit()); + } + + return isAllowUpload; + } + + /** + * Returns all comments done by teacher and learners of the specified group. + */ + private Set getGroupComments(KalturaItem item, Long sessionId, ToolAccessMode mode) { + TreeSet comments = new TreeSet(new KalturaCommentComparator()); + Set itemComments = item.getComments(); + + //only authored items can be seen by different groups + if (item.isCreateByAuthor()) { + for (KalturaComment comment : itemComments) { + + //skip hidden comments + if (comment.isHidden() && mode.isLearner()) { + continue; + + // if made by teacher - add + } else if (comment.getCreateBy() == null) { + comments.add(comment); + + // if made by learner of the specified group - also add + } else if (comment.getCreateBy().getSession().getSessionId().equals(sessionId)) { + comments.add(comment); + } + } + + } else { + comments.addAll(itemComments); + } + + return comments; + } + + private void initKalturaService() { + if (service == null) { + service = KalturaServiceProxy.getKalturaService(this.getServlet().getServletContext()); + } + } + + private KalturaUser getCurrentUser(Long toolSessionId) { + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + + // attempt to retrieve user using userId and toolSessionId + KalturaUser kalturaUser = service.getUserByUserIdAndSessionId(new Long(user.getUserID().intValue()), + toolSessionId); + + if (kalturaUser == null) { + KalturaSession kalturaSession = service.getSessionBySessionId(toolSessionId); + kalturaUser = service.createKalturaUser(user, kalturaSession); + } + + return kalturaUser; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/MonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/MonitoringAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/MonitoringAction.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,224 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MonitoringAction.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.web.actions; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Set; +import java.util.TimeZone; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +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.apache.struts.action.ActionRedirect; +import org.lamsfoundation.lams.tool.kaltura.dto.KalturaSessionDTO; +import org.lamsfoundation.lams.tool.kaltura.dto.KalturaUserDTO; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaUser; +import org.lamsfoundation.lams.tool.kaltura.service.IKalturaService; +import org.lamsfoundation.lams.tool.kaltura.service.KalturaServiceProxy; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.DateUtil; +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; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @author Andrey Balan + * + * @struts.action path="/monitoring" parameter="dispatch" scope="request" + * + * @struts.action-forward name="success" path="tiles:/monitoring/main" + * @struts.action-forward name="kalturaDisplay" path="tiles:/monitoring/kalturaDisplay" + * @struts:action-forward name ="groupLearning" path="/learning.do" redirect="true" + * + */ +public class MonitoringAction extends LamsDispatchAction { + + private static Logger log = Logger.getLogger(MonitoringAction.class); + + public IKalturaService kalturaService; + + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + request.setAttribute("initialTabId", WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true)); + Long toolContentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + + Kaltura kaltura = kalturaService.getKalturaByContentId(toolContentID); + kaltura.toDTO(); + boolean isGroupedActivity = kalturaService.isGroupedActivity(toolContentID); + request.setAttribute(KalturaConstants.ATTR_KALTURA, kaltura); + request.setAttribute("contentFolderID", contentFolderID); + request.setAttribute("isGroupedActivity", isGroupedActivity); + + List sessionDTOs = new ArrayList(); + for (KalturaSession session : (Set)kaltura.getKalturaSessions()) { + KalturaSessionDTO sessionDTO = new KalturaSessionDTO(session); + sessionDTOs.add(sessionDTO); + } + request.setAttribute("sessionDTOs", sessionDTOs); + + Date submissionDeadline = kaltura.getSubmissionDeadline(); + if (submissionDeadline != null) { + HttpSession ss = SessionManager.getSession(); + UserDTO teacher = (UserDTO) ss.getAttribute(AttributeNames.USER); + TimeZone teacherTimeZone = teacher.getTimeZone(); + Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(teacherTimeZone, submissionDeadline); + request.setAttribute(KalturaConstants.ATTR_SUBMISSION_DEADLINE, tzSubmissionDeadline.getTime()); + } + + return mapping.findForward("success"); + } + + public ActionForward showGroupLearning(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + String toolSessionID = WebUtil.readStrParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + + ActionRedirect redirect = new ActionRedirect(mapping.findForwardConfig(KalturaConstants.GROUP_LEARNING)); + //to distinguish from opening learning page from monitor's Learners tab pass this parameter + redirect.addParameter(KalturaConstants.ATTR_IS_GROUP_MONITORING, true); + redirect.addParameter(AttributeNames.PARAM_MODE, "teacher"); + redirect.addParameter(AttributeNames.PARAM_TOOL_SESSION_ID, toolSessionID); + redirect.addParameter(AttributeNames.PARAM_USER_ID, user.getUserID()); + return redirect; + } + + public ActionForward showNotebookEntry(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + Long uid = new Long(WebUtil.readLongParam(request, "userUID")); + KalturaUser user = kalturaService.getUserByUid(uid); + KalturaUserDTO userDTO = new KalturaUserDTO(user); + request.setAttribute("userDTO", userDTO); + + return mapping.findForward("kalturaDisplay"); + } + + /** + * Update item's mark. If it's not long then store 0. + */ + public ActionForward markItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + String markStr = WebUtil.readStrParam(request, "content"); + try { + Long mark = Long.parseLong(markStr); + Long itemUid = WebUtil.readLongParam(request, KalturaConstants.PARAM_ITEM_UID); + kalturaService.markItem(itemUid, mark); + } catch (NumberFormatException e) { + log.debug(e.getMessage()); + } + + return null; + + } + + public ActionForward setItemVisibility(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + Long itemUid = WebUtil.readLongParam(request, KalturaConstants.PARAM_ITEM_UID); + boolean isHide = WebUtil.readBooleanParam(request, KalturaConstants.PARAM_IS_HIDING); + kalturaService.hideItem(itemUid, isHide); + + return null; + } + + public ActionForward setCommentVisibility(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + Long commentUid = WebUtil.readLongParam(request, KalturaConstants.PARAM_COMMENT_UID); + boolean isHide = WebUtil.readBooleanParam(request, KalturaConstants.PARAM_IS_HIDING); + kalturaService.hideComment(commentUid, isHide); + + return null; + } + + /** + * Set Submission Deadline + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward setSubmissionDeadline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + Long contentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + + Kaltura kaltura = kalturaService.getKalturaByContentId(contentID); + + Long dateParameter = WebUtil.readLongParam(request, KalturaConstants.ATTR_SUBMISSION_DEADLINE, true); + Date tzSubmissionDeadline = null; + if (dateParameter != null) { + Date submissionDeadline = new Date(dateParameter); + HttpSession ss = SessionManager.getSession(); + org.lamsfoundation.lams.usermanagement.dto.UserDTO teacher = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) ss + .getAttribute(AttributeNames.USER); + TimeZone teacherTimeZone = teacher.getTimeZone(); + tzSubmissionDeadline = DateUtil.convertFromTimeZoneToDefault(teacherTimeZone, submissionDeadline); + } + kaltura.setSubmissionDeadline(tzSubmissionDeadline); + kalturaService.saveOrUpdateKaltura(kaltura); + return null; + } + + /** + * set up kalturaService + */ + private void setupService() { + if (kalturaService == null) { + kalturaService = KalturaServiceProxy.getKalturaService(this.getServlet().getServletContext()); + } + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/PedagogicalPlannerAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/PedagogicalPlannerAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/actions/PedagogicalPlannerAction.java 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,102 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: PedagogicalPlannerAction.java,v 1.1 2012/11/15 14:39:31 andreyb Exp $$ */ + +package org.lamsfoundation.lams.tool.kaltura.web.actions; + +import java.io.IOException; + +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.apache.struts.action.ActionMessages; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.service.IKalturaService; +import org.lamsfoundation.lams.tool.kaltura.service.KalturaServiceProxy; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants; +import org.lamsfoundation.lams.tool.kaltura.web.forms.KalturaPedagogicalPlannerForm; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.util.AttributeNames; + +/** + * @author Andrey Balan + * + * @struts.action path="/pedagogicalPlanner" name="pedagogicalPlannerForm" parameter="dispatch" scope="request" + * validate="false" + * + * @struts.action-forward name="success" path="/pages/authoring/pedagogicalPlannerForm.jsp" + */ +public class PedagogicalPlannerAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(PedagogicalPlannerAction.class); + + public IKalturaService kalturaService; + + @Override + protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + if (kalturaService == null) { + kalturaService = KalturaServiceProxy.getKalturaService(this.getServlet().getServletContext()); + } + return initPedagogicalPlannerForm(mapping, form, request, response); + } + + public ActionForward initPedagogicalPlannerForm(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + KalturaPedagogicalPlannerForm plannerForm = (KalturaPedagogicalPlannerForm) form; + Long toolContentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + Kaltura kaltura = getKalturaService().getKalturaByContentId(toolContentID); + plannerForm.fillForm(kaltura); + String contentFolderId = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + plannerForm.setContentFolderID(contentFolderId); + return mapping.findForward(KalturaConstants.SUCCESS); + } + + public ActionForward saveOrUpdatePedagogicalPlannerForm(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws IOException { + KalturaPedagogicalPlannerForm plannerForm = (KalturaPedagogicalPlannerForm) form; + ActionMessages errors = plannerForm.validate(); + if (errors.isEmpty()) { + String instructions = plannerForm.getInstructions(); + Long toolContentID = plannerForm.getToolContentID(); + Kaltura kaltura = getKalturaService().getKalturaByContentId(toolContentID); + kaltura.setInstructions(instructions); + getKalturaService().saveOrUpdateKaltura(kaltura); + } else { + saveErrors(request, errors); + } + return mapping.findForward(KalturaConstants.SUCCESS); + } + + private IKalturaService getKalturaService() { + if (kalturaService == null) { + kalturaService = KalturaServiceProxy.getKalturaService(this.getServlet().getServletContext()); + } + return kalturaService; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/AuthoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/AuthoringForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/AuthoringForm.java 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,244 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: AuthoringForm.java,v 1.1 2012/11/15 14:39:33 andreyb Exp $ */ + +package org.lamsfoundation.lams.tool.kaltura.web.forms; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @struts.form name="authoringForm" + */ +public class AuthoringForm extends ActionForm { + + private static final long serialVersionUID = 3950453134542135495L; + + // Properties + + private String title; + + private String instructions; + + private String offlineInstruction; + + private String onlineInstruction; + + private boolean lockOnFinished; + + private boolean allowContributeVideos; + + private boolean allowSeeingOtherUsersRecordings; + + private int learnerContributionLimit; + + private boolean allowComments; + + private boolean allowRatings; + + private FormFile onlineFile; + + private FormFile offlineFile; + + private String currentTab; + + private String dispatch; + + private String sessionMapID; + + private Long deleteFileUuid; + + private boolean reflectOnActivity; + + private String reflectInstructions; + + private SessionMap sessionMap; + + @Override + public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) { + ActionErrors ac = new ActionErrors(); + ac.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("this is an error")); + + return ac; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + + public String getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(String currentTab) { + this.currentTab = currentTab; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + public boolean isAllowContributeVideos() { + return allowContributeVideos; + } + + public void setAllowContributeVideos(boolean allowContributeVideos) { + this.allowContributeVideos = allowContributeVideos; + } + + public FormFile getOfflineFile() { + return offlineFile; + } + + public void setOfflineFile(FormFile offlineFile) { + this.offlineFile = offlineFile; + } + + public String getOfflineInstruction() { + return offlineInstruction; + } + + public void setOfflineInstruction(String offlineInstruction) { + this.offlineInstruction = offlineInstruction; + } + + public FormFile getOnlineFile() { + return onlineFile; + } + + public void setOnlineFile(FormFile onlineFile) { + this.onlineFile = onlineFile; + } + + public String getOnlineInstruction() { + return onlineInstruction; + } + + public void setOnlineInstruction(String onlineInstruction) { + this.onlineInstruction = onlineInstruction; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setSessionMap(SessionMap sessionMap) { + this.sessionMap = sessionMap; + } + + public SessionMap getSessionMap() { + return sessionMap; + } + + public Long getDeleteFileUuid() { + return deleteFileUuid; + } + + public void setDeleteFileUuid(Long deleteFile) { + this.deleteFileUuid = deleteFile; + } + + public boolean isAllowSeeingOtherUsersRecordings() { + return allowSeeingOtherUsersRecordings; + } + + public void setAllowSeeingOtherUsersRecordings(boolean allowSeeingOtherUsersRecordings) { + this.allowSeeingOtherUsersRecordings = allowSeeingOtherUsersRecordings; + } + + public int getLearnerContributionLimit() { + return learnerContributionLimit; + } + + public void setLearnerContributionLimit(int learnerContributionLimit) { + this.learnerContributionLimit = learnerContributionLimit; + } + + public boolean isAllowComments() { + return allowComments; + } + + public void setAllowComments(boolean allowComments) { + this.allowComments = allowComments; + } + + public boolean isAllowRatings() { + return allowRatings; + } + + public void setAllowRatings(boolean allowRatings) { + this.allowRatings = allowRatings; + } + + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/KalturaPedagogicalPlannerForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/KalturaPedagogicalPlannerForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/KalturaPedagogicalPlannerForm.java 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,58 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: KalturaPedagogicalPlannerForm.java,v 1.1 2012/11/15 14:39:33 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.web.forms; + +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.web.planner.PedagogicalPlannerActivityForm; + +/** + * @struts.form name="pedagogicalPlannerForm" + */ +public class KalturaPedagogicalPlannerForm extends PedagogicalPlannerActivityForm { + String instructions; + String contentFolderID; + + public String getContentFolderID() { + return contentFolderID; + } + + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public void fillForm(Kaltura kaltura) { + if (kaltura != null) { + setInstructions(kaltura.getInstructions()); + setToolContentID(kaltura.getToolContentId()); + } + } +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/ReflectionForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/ReflectionForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/forms/ReflectionForm.java 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,68 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: ReflectionForm.java,v 1.1 2012/11/15 14:39:33 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.web.forms; + +import org.apache.log4j.Logger; +import org.apache.struts.validator.ValidatorForm; + +/** + * + * Reflection Form. + * + * @struts.form name="reflectionForm" + * + */ +public class ReflectionForm extends ValidatorForm { + private static final long serialVersionUID = -9054365604649146735L; + private static Logger logger = Logger.getLogger(ReflectionForm.class.getName()); + + private Integer userID; + private String sessionMapID; + private String entryText; + + public String getEntryText() { + return entryText; + } + + public void setEntryText(String entryText) { + this.entryText = entryText; + } + + public Integer getUserID() { + return userID; + } + + public void setUserID(Integer userUid) { + this.userID = userUid; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + +} Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/servlets/ExportServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/servlets/ExportServlet.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/web/servlets/ExportServlet.java 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,115 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: ExportServlet.java,v 1.1 2012/11/15 14:39:33 andreyb Exp $ */ + +package org.lamsfoundation.lams.tool.kaltura.web.servlets; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.kaltura.model.Kaltura; +import org.lamsfoundation.lams.tool.kaltura.model.KalturaSession; +import org.lamsfoundation.lams.tool.kaltura.service.IKalturaService; +import org.lamsfoundation.lams.tool.kaltura.service.KalturaServiceProxy; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaException; +import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; +import org.lamsfoundation.lams.web.util.AttributeNames; + +public class ExportServlet extends AbstractExportPortfolioServlet { + + private static final long serialVersionUID = -2829707715037631881L; + + private static Logger logger = Logger.getLogger(ExportServlet.class); + + private final String FILENAME = "kaltura_main.html"; + + private IKalturaService kalturaService; + + protected String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) { + + if (kalturaService == null) { + kalturaService = KalturaServiceProxy.getKalturaService(getServletContext()); + } + + try { + if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.LEARNER); + doLearnerExport(request, response, directoryName, cookies); + } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER.toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER); + doTeacherExport(request, response, directoryName, cookies); + } + } catch (KalturaException e) { + logger.error("Cannot perform export for kaltura tool."); + } + + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + request.getContextPath(); + writeResponseToFile(basePath + "/pages/export/exportPortfolio.jsp", directoryName, FILENAME, cookies); + + return FILENAME; + } + + protected String doOfflineExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) { + if (toolContentID == null && toolSessionID == null) { + logger.error("Tool content Id or and session Id are null. Unable to activity title"); + } else { + if (kalturaService == null) { + kalturaService = KalturaServiceProxy.getKalturaService(getServletContext()); + } + + Kaltura content = null; + if (toolContentID != null) { + content = kalturaService.getKalturaByContentId(toolContentID); + } else { + KalturaSession session = kalturaService.getSessionBySessionId(toolSessionID); + if (session != null) + content = session.getKaltura(); + } + if (content != null) { + activityTitle = content.getTitle(); + } + } + return super.doOfflineExport(request, response, directoryName, cookies); + } + + private void doLearnerExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) throws KalturaException { + + logger.debug("doExportLearner: toolContentID:" + toolSessionID); + } + + private void doTeacherExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) throws KalturaException { + + logger.debug("doExportTeacher: toolContentID:" + toolContentID); + } + +} Index: lams_tool_kaltura/test/java/org/lamsfoundation/lams/tool/kaltura/selenium/TestKaltura.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/test/java/org/lamsfoundation/lams/tool/kaltura/selenium/Attic/TestKaltura.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/test/java/org/lamsfoundation/lams/tool/kaltura/selenium/TestKaltura.java 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,93 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: TestKaltura.java,v 1.1 2012/11/15 14:39:33 andreyb Exp $ */ +package org.lamsfoundation.lams.tool.kaltura.selenium; + +import junit.framework.TestSuite; + +import org.lamsfoundation.lams.selenium.AbstractSeleniumTestCase; +import org.lamsfoundation.lams.selenium.SeleniumTestSuite; +import org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants; + +public class TestKaltura extends AbstractSeleniumTestCase { + + @Override + protected String getToolSignature() { + return KalturaConstants.TOOL_SIGNATURE; + } + + @Override + protected String getLearningDesignName() { + return "bueno"; + } + + public static TestSuite suite() { + String[] testSequence = { "testAuthoring", "testCreateNewLesson", "testLearning", "testMonitoring" }; + return new SeleniumTestSuite(TestKaltura.class, testSequence); + } + + public void testAuthoring() throws Exception { + loginToLams(); + setUpAuthoring(); + + assertEquals("Kaltura", AbstractSeleniumTestCase.selenium.getTitle()); + + AbstractSeleniumTestCase.selenium.type("title", "leave your comment2222"); + AbstractSeleniumTestCase.selenium + .runScript("CKEDITOR.instances[\"instructions\").setData(\"invent a new way of using Flash\")"); + AbstractSeleniumTestCase.selenium.click("tab-middle-link-2"); + AbstractSeleniumTestCase.selenium.click("lockOnFinished"); + AbstractSeleniumTestCase.selenium.click("tab-middle-link-3"); + AbstractSeleniumTestCase.selenium.type("onlineInstruction__lamstextarea", "online instructions"); + + storeLearningDesign(); + } + + public void testCreateNewLesson() throws Exception { + createNewLesson(); + } + + public void testLearning() throws Exception { + setUpLearning(); + assertEquals("Kaltura", AbstractSeleniumTestCase.selenium.getTitle()); + assertEquals("LAMS Learner", AbstractSeleniumTestCase.selenium.isElementPresent("//a[@id='finishButton']")); + AbstractSeleniumTestCase.selenium.type("entryText", "have fun"); + AbstractSeleniumTestCase.selenium.click("//a[@id='finishButton']/span"); + waitForLearning(); + + assertTrue(AbstractSeleniumTestCase.selenium.isTextPresent("Congratulations")); + assertFalse(AbstractSeleniumTestCase.selenium.isElementPresent("entryText")); + tearDownLearning(); + + setUpLearning(); + assertTrue(AbstractSeleniumTestCase.selenium.isTextPresent("Congratulations")); + assertFalse(AbstractSeleniumTestCase.selenium.isElementPresent("entryText")); + } + + public void testMonitoring() { + setUpMonitoring(); + + assertEquals("Kaltura", AbstractSeleniumTestCase.selenium.getTitle()); + } + +} Index: lams_tool_kaltura/web/403.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/403.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/403.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,25 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + Index: lams_tool_kaltura/web/404.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/404.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/404.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,27 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + Index: lams_tool_kaltura/web/error.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/error.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/error.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,91 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> + + + +<%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + +<%-- Catch JSP Servlet Exception --%> +<% +if (exception != null) { +%> + + <%=exception.getMessage()%> + + + <%=exception.getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + exception.printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} else if ((Exception) request.getAttribute("javax.servlet.error.exception") != null) { +%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage()%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage() + .getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + ((Exception) request.getAttribute("javax.servlet.error.exception")).printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} +%> + +
+ + + +
+ + + +
Index: lams_tool_kaltura/web/WEB-INF/tiles-defs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tiles-defs.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tiles-defs.xml 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/urlrewrite.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/urlrewrite.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/urlrewrite.xml 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,26 @@ + + + + + + + + + The rule means that requests to tool's learning jsp will be redirected to /learning/mobile/ folder + containing mobile version of jsps. + Regexes are taken from http://detectmobilebrowser.com/download/jsp. and we might need to update it somewhere in the future. + + .*(android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino).*?i + ^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|e\\-|e\\/|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\\-|2|g)|yas\\-|your|zeto|zte\\-).*?i + ^/layouts/learningLayout.jsp$ + /layouts/mobileLearningLayout.jsp + + + + Index: lams_tool_kaltura/web/WEB-INF/validator-rules.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/validator-rules.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/validator-rules.xml 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/AuthoringButton.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/AuthoringButton.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/AuthoringButton.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,129 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * AuthoringButton.tag + * Author: Dapeng Ni + * Description: Creates the save/cancel button for authoring page + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="tags-lams" prefix="lams"%> + +<%@ attribute name="formID" required="true" rtexprvalue="true" %> +<%@ attribute name="toolSignature" required="true" rtexprvalue="true" %> +<%@ attribute name="toolContentID" required="true" rtexprvalue="true" %> +<%@ attribute name="contentFolderID" required="true" rtexprvalue="true" %> +<%@ attribute name="clearSessionActionUrl" required="true" rtexprvalue="true" %> + +<%-- Optional attribute --%> +<%@ attribute name="accessMode" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelConfirmMsgKey" required="false" rtexprvalue="true" %> +<%@ attribute name="defineLater" required="false" rtexprvalue="true" %> +<%@ attribute name="customiseSessionID" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + + + + + + +

+ + + + + + +

+ Index: lams_tool_kaltura/web/WEB-INF/tags/CKEditor.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/CKEditor.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/CKEditor.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,88 @@ +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="true" rtexprvalue="true"%> +<%@ attribute name="toolbarSet" required="false" rtexprvalue="true"%> +<%@ attribute name="height" required="false" rtexprvalue="true"%> +<%@ attribute name="width" required="false" rtexprvalue="true"%> +<%@ attribute name="contentFolderID" required="false" rtexprvalue="true"%> +<%@ attribute name="displayExpanded" required="false" rtexprvalue="true"%> +<%@ attribute name="resizeParentFrameName" required="false" rtexprvalue="true"%> + + + + + + + + + + + + + + + + + + + + + + + + + ckeditor/ + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/Date.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/Date.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/Date.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,52 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Author: Fiona Malikoff + * Description: Format a date, using the locale, based on standard parameters. + * Need to use long for the date otherwise the AU locale comes out as 1/2/06 and + * full is needed to include the timezone. + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="value" required="true" rtexprvalue="true" type="java.util.Date" %> +<%@ attribute name="style" required="false" rtexprvalue="true"%> +<%@ attribute name="type" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/DefineLater.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/DefineLater.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/DefineLater.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,58 @@ + +<% + /**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * DefineLater.tag + * Author: Fiona Malikoff + * Description: Layout for "Define Later" screens - to be used in learning. + * A suggested layout - unless the tool has special requirements, this layout should be used. + * Expects to be used inside
+ */ +%> + +<%@ tag body-content="scriptless"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-core" prefix="c"%> + +<%@ attribute name="defineLaterMessageKey" required="false" + rtexprvalue="true"%> +<%@ attribute name="buttonTryAgainKey" required="false" + rtexprvalue="true"%> + +<%-- Default value for I18N keys --%> + + + + + + + +

+ +

+
+ +
Index: lams_tool_kaltura/web/WEB-INF/tags/Head.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/Head.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/Head.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,41 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Head.tag + * Author: Fiona Malikoff + * Description: Sets up the non-cache pragma statements and the UTF-8 + * encoding. Use in place of the normal head tag. + */ +%> + +<%@ tag body-content="scriptless"%> + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/ImgButtonWrapper.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/ImgButtonWrapper.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/ImgButtonWrapper.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,37 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * ImgButtonWrapper.tag + * Author: Mitchell Seaton + * Description: Simple wrapper that will display buttons correctly when RTL page rendering is used. + */ + + %> +<%@ tag body-content="scriptless" %> +
+
+ +
+
Index: lams_tool_kaltura/web/WEB-INF/tags/Passon.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/Attic/Passon.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/Passon.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,86 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Passon + * Author: Mitchell Seaton + * Description: Passes on progress data to the Flash Learner to update the progress bar. + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="progress" required="true" rtexprvalue="true" type="java.lang.String" %> +<%@ attribute name="version" required="false" rtexprvalue="true" %> +<%@ attribute name="id" required="true" rtexprvalue="true" %> +<%@ attribute name="redirect" required="false" rtexprvalue="true" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/Tab.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/Tab.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/Tab.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,85 @@ +<% + /**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Tab.tag + * Author: Mitchell Seaton + * Description: Creates a tab element. + * Wiki: + */ +%> +<%@ tag body-content="empty"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="false" rtexprvalue="true"%> +<%@ attribute name="key" required="false" rtexprvalue="true"%> +<%@ attribute name="inactive" required="false" rtexprvalue="true"%> +<%@ attribute name="methodCall" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + +<%-- Check if bundle is set --%> + + + + + + + + + + +<%-- + Usually methodCall is selectTab, but the calling code can override methodCall if desired. + this is handy if the page needs different logic on initialisation and user switching tabs +--%> + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/TabBody.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/TabBody.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/TabBody.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,52 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * TabBody.tag + * Author: Mitchell Seaton + * Description: Creates the body container for a tab element + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="tabTitle" required="false" rtexprvalue="true"%> +<%@ attribute name="titleKey" required="false" rtexprvalue="true"%> +<%@ attribute name="page" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-bean" prefix="bean"%> + + +
+ + + + + + + + + +
+ Index: lams_tool_kaltura/web/WEB-INF/tags/TabName.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/TabName.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/TabName.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,59 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * TabName Tag + * Author: Mitchell Seaton + * Description: Shortens name that are too long to fit inside a tab + */ + + %> +<%@ tag body-content="scriptless" %> + +<%@ attribute name="url" required="true" rtexprvalue="true"%> +<%@ attribute name="highlight" required="false" rtexprvalue="true" %> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-function" prefix="fn"%> + +12 + + + + + + + + + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/Tabs.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/Tabs.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/Tabs.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,69 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Tabs.tag + * Author: Mitchell Seaton + * Description: Create a tab list from a input collection or nested Tab tags. + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="collection" type="java.util.Collection" required="false" rtexprvalue="true"%> +<%@ attribute name="control" required="false" rtexprvalue="true"%> +<%@ attribute name="useKey" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/TextSearch.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/TextSearch.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/TextSearch.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,136 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * TextSearch.tag + * Author: Marcin Cieslak + * Description: Displays form for creating text search conditions. + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +<%-- Required attributes --%> +<%@ attribute name="sessionMapID" required="true" rtexprvalue="true" %> +<%@ attribute name="wrapInFormTag" required="true" rtexprvalue="true" %> + +<%-- Optional attributes --%> +<%@ attribute name="action" required="false" rtexprvalue="true" %> +<%@ attribute name="formID" required="false" rtexprvalue="true" %> +<%@ attribute name="headingLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="allWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="phraseLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="anyWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="excludedWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelAction" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +

+ + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tags/headItems.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/headItems.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tags/headItems.tag 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,47 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Standard Head Items + * Author: Fiona Malikoff + * Description: Includes all the standard head items e.g. the + * lams css files, sets the content type, standard javascript files. + */ +%> +<%@ tag body-content="empty"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/jstl/c.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/jstl/c.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/jstl/c.tld 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,563 @@ + + + + + JSTL 1.1 core library + JSTL core + 1.1 + c + http://java.sun.com/jsp/jstl/core + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + + + + Catches any Throwable that occurs in its body and optionally + exposes it. + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + +Name of the exported scoped variable for the +exception thrown from a nested action. The type of the +scoped variable is the type of the exception thrown. + + var + false + false + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + +The test condition that determines whether or +not the body content should be processed. + + test + true + true + boolean + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + +The URL of the survey to import. + + url + true + true + + + +Name of the exported scoped variable for the +survey's content. The type of the scoped +variable is String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Name of the exported scoped variable for the +survey's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL survey that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +survey. + + charEncoding + false + true + + + + + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + +Collection of items to iterate over. + + items + false + true + java.lang.Object + + + +If items specified: +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. +If items not specified: +Iteration begins with index set at the value +specified. + + begin + false + true + int + + + +If items specified: +Iteration ends at the item located at the +specified index (inclusive). +If items not specified: +Iteration ends when index reaches the value +specified. + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. Its type depends +on the object of the underlying collection. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Iterates over tokens, separated by the supplied delimeters + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + +String of tokens to iterate over. + + items + true + true + java.lang.String + + + +The set of delimiters (the characters that +separate the tokens in the string). + + delims + true + true + java.lang.String + + + +Iteration begins at the token located at the +specified index. First token has index 0. + + begin + false + true + int + + + +Iteration ends at the token located at the +specified index (inclusive). + + end + false + true + int + + + +Iteration will only process every step tokens +of the string, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of +type +javax.servlet.jsp.jstl.core.LoopTag +Status. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Like <%= ... >, but for expressions. + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + +Expression to be evaluated. + + value + true + true + + + +Default value if the resulting value is null. + + default + false + true + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default value is +true. + + escapeXml + false + true + + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'import' tag's URL. + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + +Name of the query string parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Redirects to a new URL. + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + +The URL of the survey to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +survey that belongs to a foreign context. + + context + false + true + + + + + + Removes a scoped variable (from a particular scope, if specified). + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + +Name of the scoped variable to be removed. + + var + true + false + + + +Scope for var. + + scope + false + false + + + + + + Sets the result of an expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + +Name of the exported scoped variable to hold the value +specified in the action. The type of the scoped variable is +whatever type the value expression evaluates to. + + var + false + false + + + +Expression to be evaluated. + + value + false + true + + + +Target object whose property will be set. Must evaluate to +a JavaBeans object with setter property property, or to a +java.util.Map object. + + target + false + true + + + +Name of the property to be set in the target object. + + property + false + true + + + +Scope for var. + + scope + false + false + + + + + + Creates a URL with optional query parameters. + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + +Name of the exported scoped variable for the +processed url. The type of the scoped variable is +String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +URL to be processed. + + value + false + true + + + +Name of the context when specifying a relative URL +survey that belongs to a foreign context. + + context + false + true + + + + + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + +The test condition that determines whether or not the +body content should be processed. + + test + true + true + boolean + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/jstl/fmt.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/jstl/fmt.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/jstl/fmt.tld 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,671 @@ + + + + + JSTL 1.1 i18n-capable formatting library + JSTL fmt + 1.1 + fmt + http://java.sun.com/jsp/jstl/fmt + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + + + + Sets the request character encoding + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + +Name of character encoding to be applied when +decoding request parameters. + + value + false + true + + + + + + Stores the given locale in the locale configuration variable + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + +A String value is interpreted as the +printable representation of a locale, which +must contain a two-letter (lower-case) +language code (as defined by ISO-639), +and may contain a two-letter (upper-case) +country code (as defined by ISO-3166). +Language and country codes must be +separated by hyphen (-) or underscore +(_). + + value + true + true + + + +Vendor- or browser-specific variant. +See the java.util.Locale javadocs for +more information on variants. + + variant + false + true + + + +Scope of the locale configuration variable. + + scope + false + false + + + + + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See +java.util.TimeZone for more information on +supported time zone formats. + + value + true + true + + + + + + Stores the given time zone in the time zone configuration variable + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See java.util.TimeZone for +more information on supported time zone +formats. + + value + true + true + + + +Name of the exported scoped variable which +stores the time zone of type +java.util.TimeZone. + + var + false + false + + + +Scope of var or the time zone configuration +variable. + + scope + false + false + + + + + + Loads a survey bundle to be used by its tag body + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + +Survey bundle base name. This is the bundle's +fully-qualified survey name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Prefix to be prepended to the value of the message +key of any nested <fmt:message> action. + + prefix + false + true + + + + + + Loads a survey bundle and stores it in the named scoped variable or + the bundle configuration variable + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + +Survey bundle base name. This is the bundle's +fully-qualified survey name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Name of the exported scoped variable which stores +the i18n localization context of type +javax.servlet.jsp.jstl.fmt.LocalizationC +ontext. + + var + false + false + + + +Scope of var or the localization context +configuration variable. + + scope + false + false + + + + + + Maps key to localized message and performs parametric replacement + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + +Message key to be looked up. + + key + false + true + + + +Localization context in whose survey +bundle the message key is looked up. + + bundle + false + true + + + +Name of the exported scoped variable +which stores the localized message. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Supplies an argument for parametric replacement to a containing + <message> tag + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + +Argument used for parametric replacement. + + value + false + true + + + + + + Formats a numeric value as a number, currency, or percentage + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + +Numeric value to be formatted. + + value + false + true + + + +Specifies whether the value is to be +formatted as number, currency, or +percentage. + + type + false + true + + + +Custom formatting pattern. + + pattern + false + true + + + +ISO 4217 currency code. Applied only +when formatting currencies (i.e. if type is +equal to "currency"); ignored otherwise. + + currencyCode + false + true + + + +Currency symbol. Applied only when +formatting currencies (i.e. if type is equal +to "currency"); ignored otherwise. + + currencySymbol + false + true + + + +Specifies whether the formatted output +will contain any grouping separators. + + groupingUsed + false + true + + + +Maximum number of digits in the integer +portion of the formatted output. + + maxIntegerDigits + false + true + + + +Minimum number of digits in the integer +portion of the formatted output. + + minIntegerDigits + false + true + + + +Maximum number of digits in the +fractional portion of the formatted output. + + maxFractionDigits + false + true + + + +Minimum number of digits in the +fractional portion of the formatted output. + + minFractionDigits + false + true + + + +Name of the exported scoped variable +which stores the formatted result as a +String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a number, currency, or percentage + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + +String to be parsed. + + value + false + true + + + +Specifies whether the string in the value +attribute should be parsed as a number, +currency, or percentage. + + type + false + true + + + +Custom formatting pattern that determines +how the string in the value attribute is to be +parsed. + + pattern + false + true + + + +Locale whose default formatting pattern (for +numbers, currencies, or percentages, +respectively) is to be used during the parse +operation, or to which the pattern specified +via the pattern attribute (if present) is +applied. + + parseLocale + false + true + + + +Specifies whether just the integer portion of +the given value should be parsed. + + integerOnly + false + true + + + +Name of the exported scoped variable which +stores the parsed result (of type +java.lang.Number). + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Formats a date and/or time using the supplied styles and pattern + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + +Date and/or time to be formatted. + + value + true + true + + + +Specifies whether the time, the date, or both +the time and date components of the given +date are to be formatted. + + type + false + true + + + +Predefined formatting style for dates. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a date or both a date and +time (i.e. if type is missing or is equal to +"date" or "both"); ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting style for times. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a time or both a date and +time (i.e. if type is equal to "time" or "both"); +ignored otherwise. + + timeStyle + false + true + + + +Custom formatting style for dates and times. + + pattern + false + true + + + +Time zone in which to represent the formatted +time. + + timeZone + false + true + + + +Name of the exported scoped variable which +stores the formatted result as a String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a date and/or time + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + +Date string to be parsed. + + value + false + true + + + +Specifies whether the date string in the +value attribute is supposed to contain a +time, a date, or both. + + type + false + true + + + +Predefined formatting style for days +which determines how the date +component of the date string is to be +parsed. Applied only when formatting a +date or both a date and time (i.e. if type +is missing or is equal to "date" or "both"); +ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting styles for times +which determines how the time +component in the date string is to be +parsed. Applied only when formatting a +time or both a date and time (i.e. if type +is equal to "time" or "both"); ignored +otherwise. + + timeStyle + false + true + + + +Custom formatting pattern which +determines how the date string is to be +parsed. + + pattern + false + true + + + +Time zone in which to interpret any time +information in the date string. + + timeZone + false + true + + + +Locale whose predefined formatting styles +for dates and times are to be used during +the parse operation, or to which the +pattern specified via the pattern +attribute (if present) is applied. + + parseLocale + false + true + + + +Name of the exported scoped variable in +which the parsing result (of type +java.util.Date) is stored. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/jstl/fn.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/jstl/fn.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/jstl/fn.tld 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,207 @@ + + + + + JSTL 1.1 functions library + JSTL functions + 1.1 + fn + http://java.sun.com/jsp/jstl/functions + + + + Tests if an input string contains the specified substring. + + contains + org.apache.taglibs.standard.functions.Functions + boolean contains(java.lang.String, java.lang.String) + + <c:if test="${fn:contains(name, searchString)}"> + + + + + + Tests if an input string contains the specified substring in a case insensitive way. + + containsIgnoreCase + org.apache.taglibs.standard.functions.Functions + boolean containsIgnoreCase(java.lang.String, java.lang.String) + + <c:if test="${fn:containsIgnoreCase(name, searchString)}"> + + + + + + Tests if an input string ends with the specified suffix. + + endsWith + org.apache.taglibs.standard.functions.Functions + boolean endsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:endsWith(filename, ".txt")}"> + + + + + + Escapes characters that could be interpreted as XML markup. + + escapeXml + org.apache.taglibs.standard.functions.Functions + java.lang.String escapeXml(java.lang.String) + + ${fn:escapeXml(param:info)} + + + + + + Returns the index withing a string of the first occurrence of a specified substring. + + indexOf + org.apache.taglibs.standard.functions.Functions + int indexOf(java.lang.String, java.lang.String) + + ${fn:indexOf(name, "-")} + + + + + + Joins all elements of an array into a string. + + join + org.apache.taglibs.standard.functions.Functions + java.lang.String join(java.lang.String[], java.lang.String) + + ${fn:join(array, ";")} + + + + + + Returns the number of items in a collection, or the number of characters in a string. + + length + org.apache.taglibs.standard.functions.Functions + int length(java.lang.Object) + + You have ${fn:length(shoppingCart.products)} in your shopping cart. + + + + + + Returns a string resulting from replacing in an input string all occurrences + of a "before" string into an "after" substring. + + replace + org.apache.taglibs.standard.functions.Functions + java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) + + ${fn:replace(text, "-", "•")} + + + + + + Splits a string into an array of substrings. + + split + org.apache.taglibs.standard.functions.Functions + java.lang.String[] split(java.lang.String, java.lang.String) + + ${fn:split(customerNames, ";")} + + + + + + Tests if an input string starts with the specified prefix. + + startsWith + org.apache.taglibs.standard.functions.Functions + boolean startsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:startsWith(product.id, "100-")}"> + + + + + + Returns a subset of a string. + + substring + org.apache.taglibs.standard.functions.Functions + java.lang.String substring(java.lang.String, int, int) + + P.O. Box: ${fn:substring(zip, 6, -1)} + + + + + + Returns a subset of a string following a specific substring. + + substringAfter + org.apache.taglibs.standard.functions.Functions + java.lang.String substringAfter(java.lang.String, java.lang.String) + + P.O. Box: ${fn:substringAfter(zip, "-")} + + + + + + Returns a subset of a string before a specific substring. + + substringBefore + org.apache.taglibs.standard.functions.Functions + java.lang.String substringBefore(java.lang.String, java.lang.String) + + Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} + + + + + + Converts all of the characters of a string to lower case. + + toLowerCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toLowerCase(java.lang.String) + + Product name: ${fn.toLowerCase(product.name)} + + + + + + Converts all of the characters of a string to upper case. + + toUpperCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toUpperCase(java.lang.String) + + Product name: ${fn.UpperCase(product.name)} + + + + + + Removes white spaces from both ends of a string. + + trim + org.apache.taglibs.standard.functions.Functions + java.lang.String trim(java.lang.String) + + Name: ${fn.trim(name)} + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/jstl/x.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/jstl/x.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/jstl/x.tld 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,448 @@ + + + + + JSTL 1.1 XML library + JSTL XML + 1.1 + x + http://java.sun.com/jsp/jstl/xml + + + + Provides validation features for JSTL XML tags. + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Like <%= ... >, but for XPath expressions. + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + +XPath expression to be evaluated. + + select + true + false + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default +value is true. + + escapeXml + false + true + + + + + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + +The test condition that tells whether or not the +body content should be processed. + + select + true + false + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + XML iteration tag. + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + +Name of the exported scoped variable for the +current item of the iteration. This scoped variable +has nested visibility. Its type depends on the +result of the XPath expression in the select +attribute. + + var + false + false + + + +XPath expression to be evaluated. + + select + true + false + + + +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. + + begin + false + true + int + + + +Iteration ends at the item located at the specified +index (inclusive). + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility. + + varStatus + false + false + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'transform' tag's Transformer + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + +Name of the transformation parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Parses XML content from 'source' attribute or 'body' + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is implementation +dependent. + + var + false + false + + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is +org.w3c.dom.Document. + + varDom + false + false + + + +Scope for var. + + scope + false + false + + + +Scope for varDom. + + scopeDom + false + false + + + +Deprecated. Use attribute 'doc' instead. + + xml + false + true + + + +Source XML document to be parsed. + + doc + false + true + + + +The system identifier (URI) for parsing the +XML document. + + systemId + false + true + + + +Filter to be applied to the source +document. + + filter + false + true + + + + + + Saves the result of an XPath expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + +Name of the exported scoped variable to hold +the value specified in the action. The type of the +scoped variable is whatever type the select +expression evaluates to. + + var + true + false + + + +XPath expression to be evaluated. + + select + false + false + + + +Scope for var. + + scope + false + false + + + + + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + +Name of the exported +scoped variable for the +transformed XML +document. The type of the +scoped variable is +org.w3c.dom.Document. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Result +Object that captures or +processes the transformation +result. + + result + false + true + + + +Deprecated. Use attribute +'doc' instead. + + xml + false + true + + + +Source XML document to be +transformed. (If exported by +<x:set>, it must correspond +to a well-formed XML +document, not a partial +document.) + + doc + false + true + + + +Deprecated. Use attribute +'docSystemId' instead. + + xmlSystemId + false + true + + + +The system identifier (URI) +for parsing the XML +document. + + docSystemId + false + true + + + +javax.xml.transform.Source +Transformation stylesheet as +a String, Reader, or +Source object. + + xslt + false + true + + + +The system identifier (URI) +for parsing the XSLT +stylesheet. + + xsltSystemId + false + true + + + + + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + +The test condition that tells whether or +not the body content should be +processed + + select + true + false + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/lams/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/lams/lams.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/lams/lams.tld 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,508 @@ + + + + + 1.0 + lams + + LAMSTags + + + + + Output the Server URL as defined in the lams.xml configuration file. + LAMS URL + + + LAMSURL + org.lamsfoundation.lams.web.tag.LAMSURLTag + empty + + + + + Converts text from \n or \r\n to <BR> before rendering + Converts text from \n or \r\n to <BR> before rendering + + + out + org.lamsfoundation.lams.web.tag.MultiLinesOutputTag + empty + + + Converts text from \n or \r\n to <BR> before rendering + value + true + + true + + + + Converts text from \n or \r\n to <BR> before rendering + escapeHtml + false + + true + + + + + + + Render html tag with direction and language + Render html tag with direction and language + + + html + org.lamsfoundation.lams.web.tag.HtmlTag + JSP + + + Render html tag with direction and language + xhtml + false + + true + + + + + + + Get the configuration value for the specified key + Configuration value + + + Configuration + org.lamsfoundation.lams.web.tag.ConfigurationTag + empty + + + Get the configuration value for the specified key + key + false + + true + + + + + + + Output a random number for the learner and passon flash movies to communicate directly. + generate unique ID + + + generateID + org.lamsfoundation.lams.web.tag.GenerateIDTag + empty + + + Output a random number for the learner and passon flash movies to communicate directly. + id + false + + true + + + + + + + Output the basic URL for the current webapp. e.g. http://server/lams/tool/nb11/ + Base URL for the current web app + + + WebAppURL + org.lamsfoundation.lams.web.tag.WebAppURLTag + empty + + + + + Converts role name into form usable as message resources key + Converts role name into form usable as message resources key + + + role + org.lamsfoundation.lams.web.tag.RoleTag + empty + + + Converts role name into form usable as message resources key + role + true + + true + + + + + + + Help tag + Help tag + + + help + org.lamsfoundation.lams.web.tag.HelpTag + empty + + + Help tag + module + false + + true + + + + Help tag + toolSignature + false + + true + + + + Help tag + page + false + + true + + + + Help tag + style + false + + true + + + + + + + Output details from the shared session UserDTO object + user details + + + user + org.lamsfoundation.lams.web.tag.UserTag + empty + + + Output details from the shared session UserDTO object + property + true + + true + + + + + + + Output stylesheet based on the user preferences. + User's chosen stylesheet + + + css + org.lamsfoundation.lams.web.tag.CssTag + empty + + + Output stylesheet based on the user preferences. + localLinkPath + false + + true + + + + Output stylesheet based on the user preferences. + style + false + + true + + + + + + + STRUTS-textarea + org.lamsfoundation.lams.web.tag.MultiLinesTextareaTag + empty + + accesskey + false + true + + + alt + false + true + + + altKey + false + true + + + bundle + false + true + + + cols + false + true + + + disabled + false + true + + + errorKey + false + true + + + errorStyle + false + true + + + errorStyleClass + false + true + + + errorStyleId + false + true + + + indexed + false + true + + + name + false + true + + + onblur + false + true + + + onchange + false + true + + + onclick + false + true + + + ondblclick + false + true + + + onfocus + false + true + + + onkeydown + false + true + + + onkeypress + false + true + + + onkeyup + false + true + + + onmousedown + false + true + + + onmousemove + false + true + + + onmouseout + false + true + + + onmouseover + false + true + + + onmouseup + false + true + + + property + true + true + + + readonly + false + true + + + rows + false + true + + + style + false + true + + + styleClass + false + true + + + styleId + false + true + + + tabindex + false + true + + + title + false + true + + + titleKey + false + true + + + value + false + true + + + + Tab + /WEB-INF/tags/Tab.tag + + + Tabs + /WEB-INF/tags/Tabs.tag + + + TabBody + /WEB-INF/tags/TabBody.tag + + + TabName + /WEB-INF/tags/TabName.tag + + + CKEditor + /WEB-INF/tags/CKEditor.tag + + + AuthoringButton + /WEB-INF/tags/AuthoringButton.tag + + + headItems + /WEB-INF/tags/headItems.tag + + + Passon + /WEB-INF/tags/Passon.tag + + + Date + /WEB-INF/tags/Date.tag + + + DefineLater + /WEB-INF/tags/DefineLater.tag + + + ImgButtonWrapper + /WEB-INF/tags/ImgButtonWrapper.tag + + + TextSearch + /WEB-INF/tags/TextSearch.tag + + + textarea + org.lamsfoundation.lams.web.tag.LAMSMultiLinesTextareaTag + JSP + true + + Render text exactly same as original input, which even won't escape the input HTML tag. + + + + + name + true + true + + + + + id + false + true + + + + + onchange + false + true + + + + Checks whether Flash enabled for learner + Checks whether Flash enabled for learner + + + LearnerFlashEnabled + org.lamsfoundation.lams.web.tag.LearnerFlashEnabledTag + empty + + + head + /WEB-INF/tags/Head.tag + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-bean-el.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-bean-el.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-bean-el.tld 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,212 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean-el + +include +org.apache.strutsel.taglib.bean.ELIncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.strutsel.taglib.bean.ELMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.strutsel.taglib.bean.ELPageTag +empty + +id +true +false + + +property +true +true + + + +resource +org.apache.strutsel.taglib.bean.ELResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.strutsel.taglib.bean.ELSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.strutsel.taglib.bean.ELStrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-bean.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-bean.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-bean.tld 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,382 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-html-el.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-html-el.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-html-el.tld 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html-el + +base +org.apache.strutsel.taglib.html.ELBaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.strutsel.taglib.html.ELButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.strutsel.taglib.html.ELCancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.strutsel.taglib.html.ELCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.strutsel.taglib.html.ELErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.strutsel.taglib.html.ELFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.strutsel.taglib.html.ELFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.strutsel.taglib.html.ELFrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.strutsel.taglib.html.ELHiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.strutsel.taglib.html.ELHtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.strutsel.taglib.html.ELImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.strutsel.taglib.html.ELImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.strutsel.taglib.html.ELJavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.strutsel.taglib.html.ELLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.strutsel.taglib.html.ELMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.strutsel.taglib.html.ELMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.strutsel.taglib.html.ELOptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.strutsel.taglib.html.ELOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.strutsel.taglib.html.ELOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.strutsel.taglib.html.ELPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.strutsel.taglib.html.ELRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.strutsel.taglib.html.ELResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.strutsel.taglib.html.ELRewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.strutsel.taglib.html.ELSelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.strutsel.taglib.html.ELSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.strutsel.taglib.html.ELTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.strutsel.taglib.html.ELTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-html.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-html.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-html.tld 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-logic-el.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-logic-el.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-logic-el.tld 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,382 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic-el + +forward +org.apache.strutsel.taglib.logic.ELForwardTag +empty + +name +true +true + + + +iterate +org.apache.strutsel.taglib.logic.ELIterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +match +org.apache.strutsel.taglib.logic.ELMatchTag +JSP + +cookie +false +true + + +expr +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.strutsel.taglib.logic.ELMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.strutsel.taglib.logic.ELMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notMatch +org.apache.strutsel.taglib.logic.ELNotMatchTag +JSP + +cookie +false +true + + +expr +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.strutsel.taglib.logic.ELNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.strutsel.taglib.logic.ELPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.strutsel.taglib.logic.ELRedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-logic.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-logic.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-logic.tld 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,652 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-nested.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-nested.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-nested.tld 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,3171 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-tiles-el.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-tiles-el.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-tiles-el.tld 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,343 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles-el + +insert +org.apache.strutsel.taglib.tiles.ELInsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.strutsel.taglib.tiles.ELDefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.strutsel.taglib.tiles.ELPutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.strutsel.taglib.tiles.ELPutListTag +JSP + +name +true +false + + + +add +org.apache.strutsel.taglib.tiles.ELAddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.strutsel.taglib.tiles.ELGetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.strutsel.taglib.tiles.ELGetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.strutsel.taglib.tiles.ELUseAttributeTag +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.strutsel.taglib.tiles.ELImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.strutsel.taglib.tiles.ELInitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-tiles.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-tiles.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/WEB-INF/tlds/struts/struts-tiles.tld 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,344 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_tool_kaltura/web/common/empty.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/common/empty.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/common/empty.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_kaltura/web/common/footer.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/common/footer.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/common/footer.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1 @@ +

Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org

Index: lams_tool_kaltura/web/common/header.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/common/header.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/common/header.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,17 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + Index: lams_tool_kaltura/web/common/learnerheader.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/common/learnerheader.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/common/learnerheader.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,18 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + + Index: lams_tool_kaltura/web/common/message.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/common/message.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/common/message.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,5 @@ +<%@ include file="/common/taglibs.jsp"%> + +

+ ${requestScope.message}; +

Index: lams_tool_kaltura/web/common/messages.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/common/messages.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/common/messages.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,8 @@ +<%-- Error Messages --%> + +

+ +
+
+

+
Index: lams_tool_kaltura/web/common/taglibs.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/common/taglibs.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/common/taglibs.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,12 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> + +<%@ taglib uri="tags-bean" prefix="bean"%> +<%@ taglib uri="tags-logic" prefix="logic"%> +<%@ taglib uri="tags-function" prefix="fn" %> +<%@ taglib uri="tags-tiles" prefix="tiles"%> +<%@ taglib uri="tags-html" prefix="html"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + + Index: lams_tool_kaltura/web/images/cross.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/images/cross.gif,v diff -u Binary files differ Index: lams_tool_kaltura/web/images/down.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/images/down.gif,v diff -u Binary files differ Index: lams_tool_kaltura/web/images/down_disabled.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/images/down_disabled.gif,v diff -u Binary files differ Index: lams_tool_kaltura/web/images/icon_kaltura.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/images/icon_kaltura.swf,v diff -u Binary files differ Index: lams_tool_kaltura/web/images/ksprite.png =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/images/ksprite.png,v diff -u Binary files differ Index: lams_tool_kaltura/web/images/up.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/images/up.gif,v diff -u Binary files differ Index: lams_tool_kaltura/web/images/up_disabled.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/images/up_disabled.gif,v diff -u Binary files differ Index: lams_tool_kaltura/web/includes/expressInstall.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/includes/expressInstall.swf,v diff -u Binary files differ Index: lams_tool_kaltura/web/includes/javascript/authoring.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/includes/javascript/authoring.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/includes/javascript/authoring.js 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,24 @@ + +function init() { + // open the current tab + var tag = document.getElementById("currentTab"); + if (tag.value != "") { + selectTab(tag.value); + } else { + selectTab(1); + } +} +function doSelectTab(tabId) { + var tag = document.getElementById("currentTab"); + tag.value = tabId; + selectTab(tabId); +} +function doSubmit(method) { + document.authoringForm.dispatch.value = method; + document.authoringForm.submit(); +} +function deleteAttachment(dispatch, uuid) { + document.authoringForm.dispatch.value = dispatch; + document.authoringForm.deleteFileUuid.value = uuid; + document.authoringForm.submit(); +} Index: lams_tool_kaltura/web/includes/javascript/instantedit.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/includes/javascript/Attic/instantedit.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/includes/javascript/instantedit.js 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,202 @@ + \ No newline at end of file Index: lams_tool_kaltura/web/includes/javascript/kaltura.min.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/includes/javascript/Attic/kaltura.min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/includes/javascript/kaltura.min.js 15 Nov 2012 14:39:32 -0000 1.1 @@ -0,0 +1,1513 @@ + +var MD5=function(string){function RotateLeft(lValue,iShiftBits){return(lValue<>>(32-iShiftBits));} +function AddUnsigned(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=(lX&0x80000000);lY8=(lY&0x80000000);lX4=(lX&0x40000000);lY4=(lY&0x40000000);lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);if(lX4&lY4){return(lResult^0x80000000^lX8^lY8);} +if(lX4|lY4){if(lResult&0x40000000){return(lResult^0xC0000000^lX8^lY8);}else{return(lResult^0x40000000^lX8^lY8);}}else{return(lResult^lX8^lY8);}} +function F(x,y,z){return(x&y)|((~x)&z);} +function G(x,y,z){return(x&z)|(y&(~z));} +function H(x,y,z){return(x^y^z);} +function I(x,y,z){return(y^(x|(~z)));} +function FF(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(F(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function GG(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(G(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function HH(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(H(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function II(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(I(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function ConvertToWordArray(string){var lWordCount;var lMessageLength=string.length;var lNumberOfWords_temp1=lMessageLength+8;var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1%64))/64;var lNumberOfWords=(lNumberOfWords_temp2+1)*16;var lWordArray=Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount>>29;return lWordArray;};function WordToHex(lValue){var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=(lValue>>>(lCount*8))&255;WordToHexValue_temp="0"+lByte.toString(16);WordToHexValue=WordToHexValue+WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);} +return WordToHexValue;};function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);} +else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}} +return utftext;};var x=Array();var k,AA,BB,CC,DD,a,b,c,d;var S11=7,S12=12,S13=17,S14=22;var S21=5,S22=9,S23=14,S24=20;var S31=4,S32=11,S33=16,S34=23;var S41=6,S42=10,S43=15,S44=21;string=Utf8Encode(string);x=ConvertToWordArray(string);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;for(k=0;k-1) +this.url+='&'+args.join('&');else +this.url+='?'+args.join('&');OX.AJAST.call(this.url,this.cb,callback,this.timeout,this.jsonmode);};function http_build_query(formdata,numeric_prefix,arg_separator){var value,key,tmp=[];var _http_build_query_helper=function(key,val,arg_separator){var k,tmp=[];if(val===true){val="1";}else if(val===false){val="0";} +if(val!==null&&typeof(val)==="object"){for(k in val){if(val[k]!==null){tmp.push(_http_build_query_helper(key+"["+k+"]",val[k],arg_separator));}} +return tmp.join(arg_separator);}else if(typeof(val)!=="function"){return key+"="+encodeURIComponent(val);}else{return'';}};if(!arg_separator){arg_separator="&";} +for(key in formdata){value=formdata[key];if(numeric_prefix&&!isNaN(key)){key=String(numeric_prefix)+key;} +tmp.push(_http_build_query_helper(key,value,arg_separator));} +return tmp.join(arg_separator);} +function getFunctionName(func){if(typeof func=="function"||typeof func=="object") +var fName=(""+func).match(/^function\s*([\w\$]*)\s*\(/);if(fName!==null) +return fName[1];return null;} +function getClass(obj,forceConstructor){if(typeof obj=="undefined")return"undefined";if(obj===null)return"null";if(forceConstructor==true&&obj.hasOwnProperty("constructor"))delete obj.constructor;if(forceConstructor!=false&&!obj.hasOwnProperty("constructor"))return getFunctionName(obj.constructor);return Object.prototype.toString.call(obj).match(/^\[object\s(.*)\]$/)[1];} +function addIfNotNull(obj,params,paramName,paramValue) +{if(paramValue!=null){if(paramValue instanceof KalturaObjectBase){params[paramName]=toParams(paramValue);}else{params[paramName]=paramValue;}}} +function toParams(obj) +{var params=new Object();params["objectType"]=getClass(obj);for(var prop in obj){var val=obj[prop];addIfNotNull(obj,params,prop,val);} +return params;} +Function.prototype.inheritsFrom=function(parentClassOrObject){if(parentClassOrObject.constructor==Function) +{this.prototype=new parentClassOrObject;this.prototype.constructor=this;this.prototype.parentClass=parentClassOrObject.prototype;} +else +{this.prototype=parentClassOrObject;this.prototype.constructor=this;this.prototype.parentClass=parentClassOrObject;} +return this;} +function ksort(arr){var sArr=[];var tArr=[];var n=0;for(i in arr) +tArr[n++]=i+"|"+arr[i];tArr=tArr.sort();for(var i=0;i + is released under the MIT License +*/ +var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab
"); + $("#TB_overlay").click(tb_remove); + } + }else{//all others + if(document.getElementById("TB_overlay") === null){ + $("body").append("
"); + $("#TB_overlay").click(tb_remove); + } + } + + if(tb_detectMacXFF()){ + $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash + }else{ + $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity + } + + if(caption===null){caption="";} + $("body").append("
");//add loader to the page + $('#TB_load').show();//show loader + + var baseURL; + if(url.indexOf("?")!==-1){ //ff there is a query string involved + baseURL = url.substr(0, url.indexOf("?")); + }else{ + baseURL = url; + } + + var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; + var urlType = baseURL.toLowerCase().match(urlString); + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); + + + if((!params['TB_iframe'])){//code to show images + + TB_PrevCaption = ""; + TB_PrevURL = ""; + TB_PrevHTML = ""; + TB_NextCaption = ""; + TB_NextURL = ""; + TB_NextHTML = ""; + TB_imageCount = ""; + TB_FoundURL = false; + if(imageGroup){ + TB_TempArray = $("a[@rel="+imageGroup+"]").get(); + for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { + var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); + if (!(TB_TempArray[TB_Counter].href == url)) { + if (TB_FoundURL) { + TB_NextCaption = TB_TempArray[TB_Counter].title; + TB_NextURL = TB_TempArray[TB_Counter].href; + TB_NextHTML = "  Next >"; + } else { + TB_PrevCaption = TB_TempArray[TB_Counter].title; + TB_PrevURL = TB_TempArray[TB_Counter].href; + TB_PrevHTML = "  < Prev"; + } + } else { + TB_FoundURL = true; + TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); + } + } + } + + imgPreloader = new Image(); + imgPreloader.onload = function(){ + imgPreloader.onload = null; + + // Resizing large images - orginal by Christian Montoya edited by me. + var pagesize = tb_getPageSize(); + var x = pagesize[0] - 150; + var y = pagesize[1] - 150; + var imageWidth = (jQuery.browser.msie) ? parseInt(params['dbWidth']) : imgPreloader.width; + var initialImageWidth = imageWidth; + var imageHeight = (jQuery.browser.msie) ? parseInt(params['dbHeight']) : imgPreloader.height; + var initialImageHeight = imageHeight; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + } + } else if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + } + } + // End Resizing + + TB_WIDTH = imageWidth + 30; + TB_HEIGHT = imageHeight + 60; + + if ((initialImageWidth > x) ||(initialImageHeight > y)) { + $("#TB_window").append("" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
close or Esc Key
"); + } else { + $("#TB_window").append(""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
close or Esc Key
"); + } + + $("#TB_closeWindowButton").click(tb_remove); + + if (!(TB_PrevHTML === "")) { + function goPrev(){ + if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} + $("#TB_window").remove(); + $("body").append("
"); + tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); + return false; + } + $("#TB_prev").click(goPrev); + } + + if (!(TB_NextHTML === "")) { + function goNext(){ + $("#TB_window").remove(); + $("body").append("
"); + tb_show(TB_NextCaption, TB_NextURL, imageGroup); + return false; + } + $("#TB_next").click(goNext); + + } + + document.onkeydown = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } else if(keycode == 190){ // display previous image + if(!(TB_NextHTML == "")){ + document.onkeydown = ""; + goNext(); + } + } else if(keycode == 188){ // display next image + if(!(TB_PrevHTML == "")){ + document.onkeydown = ""; + goPrev(); + } + } + }; + + tb_position(); + $("#TB_load").remove(); + $("#TB_ImageOff").click(tb_remove); + $("#TB_window").css({display:"block"}); //for safari using css instead of show + }; + + imgPreloader.src = url; + }else{//code to show html + + TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL + TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL + ajaxContentW = TB_WIDTH - 30; + ajaxContentH = TB_HEIGHT - 45; + + if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window + urlNoQuery = url.split('TB_'); + $("#TB_iframeContent").remove(); + + var resize = ""; + if(params['resizeIframe']){ + resize = "resizeIframe();" + } + if(params['modal'] != "true"){//iframe no modal + $("#TB_window").append("
"+caption+"
close or Esc Key
"); + }else{//iframe modal + $("#TB_overlay").unbind(); + $("#TB_window").append(""); + } + }else{// not an iframe, ajax + if($("#TB_window").css("display") != "block"){ + if(params['modal'] != "true"){//ajax no modal + $("#TB_window").append("
"+caption+"
close or Esc Key
"); + }else{//ajax modal + $("#TB_overlay").unbind(); + $("#TB_window").append("
"); + } + }else{//this means the window is already up, we are just loading new content via ajax + $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; + $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; + $("#TB_ajaxContent")[0].scrollTop = 0; + $("#TB_ajaxWindowTitle").html(caption); + } + } + + $("#TB_closeWindowButton").click(tb_remove); + + if(url.indexOf('TB_inline') != -1){ + $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); + $("#TB_window").unload(function () { + $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished + }); + tb_position(); + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + }else if(url.indexOf('TB_iframe') != -1){ + tb_position(); + if($.browser.safari){//safari needs help because it will not fire iframe onload + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + } + }else{ + $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method + tb_position(); + $("#TB_load").remove(); + tb_init("#TB_ajaxContent a.thickbox"); + $("#TB_window").css({display:"block"}); + }); + } + + } + + if(!params['modal']){ + document.onkeyup = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } + }; + } + + } catch(e) { + //nothing here + } +} + +//helper functions below +function tb_showIframe(){ + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); +} + +function tb_remove() { + $("#TB_imageOff").unbind("click"); + $("#TB_closeWindowButton").unbind("click"); + $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); + $("#TB_load").remove(); + if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 + $("body","html").css({height: "auto", width: "auto"}); + $("html").css("overflow",""); + } + document.onkeydown = ""; + document.onkeyup = ""; + return false; +} + +function tb_position() { + jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); + var version = jQuery.browser.version; + if (version instanceof Object) + version=version.number(); + if ( !(jQuery.browser.msie6)) { // take away IE6; fixed according to: http://jamazon.co.uk/web/2008/03/14/jquerybrowserversion-doesnt-recognise-ie7/ + $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); + } +} + +function tb_parseQuery ( query ) { + var Params = {}; + if ( ! query ) {return Params;}// return empty object + var Pairs = query.split(/[;&]/); + for ( var i = 0; i < Pairs.length; i++ ) { + var KeyVal = Pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) {continue;} + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ); + val = val.replace(/\+/g, ' '); + Params[key] = val; + } + return Params; +} + +function tb_getPageSize(){ + var de = document.documentElement; + var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; + arrayPageSize = [w,h]; + return arrayPageSize; +} + +function tb_detectMacXFF() { + var userAgent = navigator.userAgent.toLowerCase(); + if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { + return true; + } +} + + Index: lams_tool_kaltura/web/layouts/defaultLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/layouts/defaultLayout.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/layouts/defaultLayout.jsp 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,22 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + +
+ + +

+ +

+
+
+ +
+ +
+ +
Index: lams_tool_kaltura/web/layouts/learningLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/layouts/learningLayout.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/layouts/learningLayout.jsp 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,13 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + Index: lams_tool_kaltura/web/layouts/mobileLearningLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/layouts/mobileLearningLayout.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/layouts/mobileLearningLayout.jsp 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,33 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + + + + + + + +
+ +
+ +
Index: lams_tool_kaltura/web/layouts/tabLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/layouts/tabLayout.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/layouts/tabLayout.jsp 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,17 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + +
+ + +

+ +

+ +
+ +
Index: lams_tool_kaltura/web/pages/authoring/advanced.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/advanced.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/advanced.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,112 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ +

+ + Index: lams_tool_kaltura/web/pages/authoring/authoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/authoring.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/authoring.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,67 @@ +<%@ include file="/common/taglibs.jsp"%> + +<%@ page import="org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants"%> + + + + + + + + + + + + + + +
+ + + + +
+ + + + +

+ +
+
+

+
+
+ + + + <%-- Page tabs --%> + + + + + + + +
+
+ + + Index: lams_tool_kaltura/web/pages/authoring/basic.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/basic.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/basic.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,279 @@ +<%@ include file="/common/taglibs.jsp"%> + +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> + +<%=Configuration.get(ConfigurationKeys.KALTURA_SERVER)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_USER_SECRET)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KCW_UI_CONF_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KDP_UI_CONF_ID)%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ +
+
+
+ + +
+
+ <%@ include file="/pages/authoring/itemlist.jsp"%> +
+
Index: lams_tool_kaltura/web/pages/authoring/headItems.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/headItems.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/headItems.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,15 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + Index: lams_tool_kaltura/web/pages/authoring/instructions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/Attic/instructions.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/instructions.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,187 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + <%-- Online Instructions --%> + + + + + <%-- Online Attachments --%> + + + + + + + <%-- Online Attachments Upload --%> + + + + + + + + + <%-- Offline Instructions --%> + + + + + <%-- Offline Attachments --%> + + + + + + + <%--Offline Attachments Upload --%> + + + + +
+
+ +
+ +
+
+
    + + <%-- Online Saved Files --%> + +
  • + + + + + + +   + + + + + + +   + + + + +
  • +
    + + <%-- Online Unsaved Files --%> + +
  • + + * + + + + + +   + + + + + + +   + + + + +
  • +
    + +
+
+
+
+ +
+ + + + + + +
+
+
+
+ +
+ +
+
+
    + + <%-- Offline Saved Attachments --%> + +
  • + + + + + +   + + + + + + +   + + + + +
  • +
    + + <%-- Offline Unsaved Attachments --%> + +
  • + + * + + + + + +   + + + + + + +   + + + + +
  • +
    + +
+
+
+
+ +
+ + + + + + +
Index: lams_tool_kaltura/web/pages/authoring/itemlist.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/itemlist.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/itemlist.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,74 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> +<%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> + + + + +
+
+ + +
+ + + + + + + + + + + + + + + +
+ + ?dispatch=preview&sessionMapID=${sessionMapID}&itemIndex=${status.index}&KeepThis=true&TB_iframe=true&height=340&width=650 + + + "> + Video + + + "> + ${item.title} + + + "> + + + + + " + onclick="upItem(${status.index})"> + + "> + + + + + + "> + + + " + onclick="downItem(${status.index})"> + + + " + onclick="deleteItem(${status.index})" /> +
+
+ + Index: lams_tool_kaltura/web/pages/authoring/pedagogicalPlannerForm.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/pedagogicalPlannerForm.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/pedagogicalPlannerForm.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,36 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + <%@ include file="/common/messages.jsp"%> +

+ + + + + +
+ + + + +
+ +
Index: lams_tool_kaltura/web/pages/authoring/preview.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/authoring/preview.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/authoring/preview.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,92 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> + + <%=Configuration.get(ConfigurationKeys.KALTURA_SERVER)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_USER_SECRET)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_KCW_UI_CONF_ID)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_KDP_UI_CONF_ID)%> + + + + + + + + + + + + + + +
+

+ ${item.title} +

+ +
+ +
+ + + +
+ +
+ + + + + + + +
+ + + + +
\ No newline at end of file Index: lams_tool_kaltura/web/pages/export/exportPortfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/export/exportPortfolio.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/export/exportPortfolio.jsp 15 Nov 2012 14:39:33 -0000 1.1 @@ -0,0 +1,27 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + +
+ +

+ +

+ +
+ + + + + + + + Index: lams_tool_kaltura/web/pages/learning/commentlist.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/commentlist.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/commentlist.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,68 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + +<%@ include file="/common/messages.jsp"%> + + +
+ +
+
+ + + + + + + + + +
class="item-hidden" > + + +
+ + ${comment.createBy.loginName} + - + + +
+
+ + + + + + + + + + + + + + + + + + +
+
+ + +
+ + +
+ + + +
+
+
Index: lams_tool_kaltura/web/pages/learning/defineLater.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/defineLater.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/defineLater.jsp 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,11 @@ +<%@ include file="/common/taglibs.jsp"%> + +
+

+ +

+ +
+ + + Index: lams_tool_kaltura/web/pages/learning/finish.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/finish.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/finish.jsp 15 Nov 2012 14:39:31 -0000 1.1 @@ -0,0 +1,5 @@ + Index: lams_tool_kaltura/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/learning.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/learning.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,443 @@ +<%@ include file="/common/taglibs.jsp"%> + +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> +<%=Configuration.get(ConfigurationKeys.KALTURA_SERVER)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_USER_SECRET)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KCW_UI_CONF_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KDP_UI_CONF_ID)%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ ${kaltura.title} +

+ +

+ ${kaltura.instructions} +

+ + +
+ + + +
+
+ + +
+ + + + + + + + +
+
+ + + +
+ + <%--"Check for new" and "Add new image" buttons---------------%> + +
+ + + + + + + + + + + + + + + + + + + + + + ${itemMark} + + + +
+ + + + + <%@ include file="/pages/learning/ratingStars.jsp"%> + +
+ + <%--Comments area----------------------------------------------%> + + +
+ <%@ include file="/pages/learning/commentlist.jsp"%> +
+
+ + <%--Reflection--------------------------------------------------%> + + +
+

+ ${sessionMap.reflectInstructions} +

+ + + +

+ + + +

+
+ +

+ +

+
+
+ + + + + + +
+
+ + <%--Bottom buttons-------------------------------------------%> + + +
+ + + + + + + + + + + + +
+
+ +
Index: lams_tool_kaltura/web/pages/learning/notebook.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/notebook.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/notebook.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,41 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + +
+

+ ${kaltura.title} +

+ + <%@ include file="/common/messages.jsp"%> + +

+ +

+ + + +
+ + + +
+
+
+ \ No newline at end of file Index: lams_tool_kaltura/web/pages/learning/ratingStars.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/ratingStars.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/ratingStars.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,28 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + +
+
+ +
+ + + + + + + + + ${item.averageRatingDto.numberOfVotes} + + + +
+
\ No newline at end of file Index: lams_tool_kaltura/web/pages/learning/runOffline.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/Attic/runOffline.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/runOffline.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,54 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + +
+

+ ${kaltura.title} +

+ + + +

+ +

+
+ +
+ + + +
+
+
+ + + + + + +
+ + button.finish + +
+
+
+
+ Index: lams_tool_kaltura/web/pages/learning/uploaditem.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/uploaditem.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/uploaditem.jsp 15 Nov 2012 14:39:30 -0000 1.1 @@ -0,0 +1,187 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> + +<%=Configuration.get(ConfigurationKeys.KALTURA_SERVER)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_USER_SECRET)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KCW_UI_CONF_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KDP_UI_CONF_ID)%> + + + + + + + + + + + + +
+ +
+ +
+ +
+
+
+ +
+ + + + + +
+
+ + + + +
Index: lams_tool_kaltura/web/pages/learning/mobile/defineLater.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/mobile/defineLater.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/mobile/defineLater.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,19 @@ +<%@ include file="/common/taglibs.jsp"%> + +
+

+ +

+
+ +
+ +
+ +
+

 

+
+ + + + Index: lams_tool_kaltura/web/pages/learning/mobile/finish.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/mobile/finish.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/mobile/finish.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,5 @@ + Index: lams_tool_kaltura/web/pages/learning/mobile/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/mobile/learning.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/mobile/learning.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,129 @@ +<%@ include file="/common/taglibs.jsp"%> + +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> +<%=Configuration.get(ConfigurationKeys.KALTURA_SERVER)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_USER_SECRET)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KCW_UI_CONF_ID)%> +<%=Configuration.get(ConfigurationKeys.KALTURA_KDP_UI_CONF_ID)%> + + + + + + + + + + + +
+

+ ${kaltura.title} +

+
+ + +
+

+ ${kaltura.instructions} +

+ + +
+ + + +
+
+ + +
+ + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ + + + + button.finish + + + + + +

 

+
+
+
+
Index: lams_tool_kaltura/web/pages/learning/mobile/notebook.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/mobile/notebook.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/mobile/notebook.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,47 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + +
+

+ ${kaltura.title} +

+
+ +
+ + + + + + <%@ include file="/common/messages.jsp"%> + +

+ +

+ + + +
+ + + +
+
+
+ +
+

 

+
Index: lams_tool_kaltura/web/pages/learning/mobile/runOffline.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/learning/mobile/Attic/runOffline.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/learning/mobile/runOffline.jsp 15 Nov 2012 14:39:29 -0000 1.1 @@ -0,0 +1,66 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + +
+

+ ${kaltura.title} +

+
+ +
+ + +

+ +

+
+ +
+ + + +
+
+
+
+ + +
+ + + + + + + + + button.finish + + + + + +
+ + + + + + Index: lams_tool_kaltura/web/pages/monitoring/daterestriction.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/daterestriction.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/daterestriction.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,43 @@ +<%@include file="/common/taglibs.jsp"%> + +

+ + + + + +

+
+ + Index: lams_tool_kaltura/web/pages/monitoring/editActivity.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/editActivity.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/editActivity.jsp 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,41 @@ +<%@ include file="/common/taglibs.jsp"%> + + +

+ +

+
+ + + + + + + + + + + + +
+ + + +
+ + + +
+ +

+ + + + + + + + +

+ + Index: lams_tool_kaltura/web/pages/monitoring/headItems.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/headItems.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/headItems.jsp 15 Nov 2012 14:39:28 -0000 1.1 @@ -0,0 +1,7 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + Index: lams_tool_kaltura/web/pages/monitoring/instructions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/Attic/instructions.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/instructions.jsp 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,94 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+ +
+ + + + + +   + + + + + +
+
+
+
+ +
+
+ +
+
+ +
+ + + + + +   + + + + + +
Index: lams_tool_kaltura/web/pages/monitoring/kalturaDisplay.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/kalturaDisplay.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/kalturaDisplay.jsp 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,65 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + +
+

+ ${userDTO.firstName} ${userDTO.lastName } +

+
+ + + + +
+ + + +
+ + + +
+
+ +
+ +
Index: lams_tool_kaltura/web/pages/monitoring/monitoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/monitoring.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/monitoring.jsp 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,25 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.kaltura.util.KalturaConstants"%> + + + +
+ + + + + + +
+ + Index: lams_tool_kaltura/web/pages/monitoring/statistics.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/statistics.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/statistics.jsp 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,33 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + +
+

+ ${session.sessionName} +

+
+ + + + + + + + + + +
+ heading.totalLearnersInGroup + + ${session.numberOfLearners} +
+ heading.totalFinishedLearnersInGroup + + ${session.numberOfFinishedLearners} +
+
Index: lams_tool_kaltura/web/pages/monitoring/summary.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/pages/monitoring/summary.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_kaltura/web/pages/monitoring/summary.jsp 15 Nov 2012 14:39:27 -0000 1.1 @@ -0,0 +1,206 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + +

+ + + + + +

+
+ + + +<%@include file="daterestriction.jsp"%> + + + + + + + + + + + +
+ +
+ ?dispatch=showGroupLearning&toolSessionID=${session.sessionID}&keepThis=true&TB_iframe=true&height=630&width=800" class="button thickbox" title=""> + ${session.sessionName} + +