From aa4d83d3844b116169ac0884f854ef6c70d74697 Mon Sep 17 00:00:00 2001 From: ana Date: Tue, 20 Apr 2021 18:27:53 +0200 Subject: [PATCH 1/9] =?UTF-8?q?[FIXED]=20#199137=20-=20Si=20las=20fechas?= =?UTF-8?q?=20inicio/fin=20de=20ejecuci=C3=B3n=20est=C3=A1n=20a=20null,=20?= =?UTF-8?q?se=20setean=20las=20fechas=20de=20inicio/fin=20de=20inscripci?= =?UTF-8?q?=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/liferay/lms/service/impl/CourseLocalServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java b/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java index 26c65f02a..8d9d5213a 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java +++ b/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java @@ -359,8 +359,8 @@ public Course addCourse (Map titleMap, String description,String course.setModifiedDate(createDate); course.setStartDate(startDate); course.setEndDate(endDate); - course.setExecutionStartDate(executionStartDate); - course.setExecutionEndDate(executionEndDate); + course.setExecutionStartDate(Validator.isNotNull(executionStartDate)?executionStartDate:startDate); + course.setExecutionEndDate(Validator.isNotNull(executionEndDate)?executionEndDate:endDate); course.setStatus(WorkflowConstants.STATUS_APPROVED); course.setExpandoBridgeAttributes(serviceContext); course.setCourseEvalId(CourseEvalId); From 490968c8d2ea1dc1e2eab97e41a3a9bd3183a5b5 Mon Sep 17 00:00:00 2001 From: ana Date: Wed, 21 Apr 2021 17:36:33 +0200 Subject: [PATCH 2/9] =?UTF-8?q?[UPDATED]=20#199137=20-=20Se=20a=C3=B1aden?= =?UTF-8?q?=20servicios=20para:=20-=20Crear=20cursos=20con=20descripci?= =?UTF-8?q?=C3=B3n=20y=20summary=20en=20multiidioma=20-=20Crear=20cursos?= =?UTF-8?q?=20cuyo=20asset=20asociado=20tenga=20t=C3=ADtulo,=20descripci?= =?UTF-8?q?=C3=B3n=20y=20summary=20en=20multiidioma=20-=20Crear=20cursos?= =?UTF-8?q?=20cuyo=20asset=20asociado=20est=C3=A9=20o=20no=20visible=20(qu?= =?UTF-8?q?eda=20visible=20por=20defecto)=20-=20Crear=20m=C3=B3dulos=20con?= =?UTF-8?q?=20t=C3=ADtulo=20y=20descripci=C3=B3n=20en=20multiidioma=20-=20?= =?UTF-8?q?Crear=20m=C3=B3dulos=20con=20campos=20personalizados=20(service?= =?UTF-8?q?Context)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CourseLocalServiceImpl.java | 59 ++++++++++++++++--- .../service/impl/ModuleLocalServiceImpl.java | 21 ++++++- 2 files changed, 71 insertions(+), 9 deletions(-) diff --git a/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java b/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java index 8d9d5213a..69a538751 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java +++ b/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java @@ -26,7 +26,6 @@ import javax.portlet.PortletPreferences; -import com.liferay.lms.asset.LearningActivityBaseAssetRenderer; import com.liferay.lms.auditing.AuditConstants; import com.liferay.lms.auditing.AuditingLogFactory; import com.liferay.lms.learningactivity.courseeval.CourseEval; @@ -81,7 +80,6 @@ import com.liferay.portal.kernel.workflow.WorkflowConstants; import com.liferay.portal.model.Group; import com.liferay.portal.model.GroupConstants; -import com.liferay.portal.model.Layout; import com.liferay.portal.model.LayoutSet; import com.liferay.portal.model.LayoutSetPrototype; import com.liferay.portal.model.MembershipRequestConstants; @@ -98,7 +96,6 @@ import com.liferay.portal.service.ClassNameLocalServiceUtil; import com.liferay.portal.service.CompanyLocalServiceUtil; import com.liferay.portal.service.GroupLocalServiceUtil; -import com.liferay.portal.service.LayoutServiceUtil; import com.liferay.portal.service.LayoutSetPrototypeLocalServiceUtil; import com.liferay.portal.service.MembershipRequestLocalServiceUtil; import com.liferay.portal.service.PortalPreferencesLocalServiceUtil; @@ -301,6 +298,50 @@ public Course addCourse (Map titleMap, String description,String long courseTypeId) throws SystemException, PortalException { + Map descriptionMap = new HashMap(); + descriptionMap.put(locale, description); + Map summaryMap = new HashMap(); + summaryMap.put(locale, summary); + + return addCourse(titleMap, descriptionMap, summaryMap, friendlyURL, locale, createDate, startDate, endDate, + executionStartDate, executionEndDate, layoutSetPrototypeId, typesite, CourseEvalId, calificationType, + maxUsers, serviceContext, isfromClone, 0); + } + + public Course addCourse (Map titleMap, String description,String summary,String friendlyURL, Locale locale, + Date createDate,Date startDate,Date endDate, Date executionStartDate, Date executionEndDate, long layoutSetPrototypeId,int typesite, + long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext,boolean isfromClone, + long courseTypeId, boolean assetIsVisible) + throws SystemException, PortalException { + + Map descriptionMap = new HashMap(); + descriptionMap.put(locale, description); + Map summaryMap = new HashMap(); + summaryMap.put(locale, summary); + + return addCourse(titleMap, descriptionMap, summaryMap, friendlyURL, locale, createDate, startDate, endDate, + executionStartDate, executionEndDate, layoutSetPrototypeId, typesite, CourseEvalId, calificationType, + maxUsers, serviceContext, isfromClone, 0, assetIsVisible); + } + + public Course addCourse (Map titleMap, Map descriptionMap, Map summaryMap,String friendlyURL, Locale locale, + Date createDate,Date startDate,Date endDate, Date executionStartDate, Date executionEndDate, long layoutSetPrototypeId,int typesite, + long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext,boolean isfromClone, + long courseTypeId) + throws SystemException, PortalException { + + return addCourse(titleMap, descriptionMap, summaryMap, friendlyURL, locale, createDate, startDate, endDate, + executionStartDate, executionEndDate, layoutSetPrototypeId, typesite, CourseEvalId, calificationType, + maxUsers, serviceContext, isfromClone, 0, true); + + } + + public Course addCourse (Map titleMap, Map descriptionMap, Map summaryMap,String friendlyURL, Locale locale, + Date createDate,Date startDate,Date endDate, Date executionStartDate, Date executionEndDate, long layoutSetPrototypeId,int typesite, + long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext,boolean isfromClone, + long courseTypeId, boolean assetIsVisible) + throws SystemException, PortalException { + log.debug("courseTypeId:: " + courseTypeId); LmsPrefs lmsPrefs=lmsPrefsLocalService.getLmsPrefsIni(serviceContext.getCompanyId()); @@ -353,7 +394,7 @@ public Course addCourse (Map titleMap, String description,String course.setUserId(userId); course.setUserName(userLocalService.getUser(userId).getFullName()); course.setFriendlyURL(friendlyURL); - course.setDescription(description,locale, locale); + course.setDescriptionMap(descriptionMap); course.setTitleMap(titleMap); course.setCreateDate(createDate); course.setModifiedDate(createDate); @@ -389,7 +430,7 @@ public Course addCourse (Map titleMap, String description,String log.debug("groupName: " + groupName); Group group = groupLocalService.addGroup(userLocalService.getDefaultUser(serviceContext.getCompanyId()).getUserId(), - null, 0, groupName,summary,typesite,friendlyURL,true,true,serviceContext); + null, 0, groupName, summaryMap.get(locale),typesite,friendlyURL,true,true,serviceContext); course.setGroupCreatedId(group.getGroupId()); course.setFriendlyURL(group.getFriendlyURL()); course.setIsLinked(false); @@ -399,8 +440,12 @@ public Course addCourse (Map titleMap, String description,String resourceLocalService.addResources(serviceContext.getCompanyId(), serviceContext.getScopeGroupId(), userId,Course.class.getName(), course.getPrimaryKey(), false,true, true); AssetEntry assetEntry=assetEntryLocalService.updateEntry(userId, course.getGroupId(), Course.class.getName(), course.getCourseId(), course.getUuid(),courseTypeId, serviceContext.getAssetCategoryIds(), - serviceContext.getAssetTagNames(), true, executionStartDate, executionEndDate,new java.util.Date(System.currentTimeMillis()), null, - ContentTypes.TEXT_HTML, course.getTitle(), course.getDescription(locale), summary, null, null, 0, 0,null, false); + serviceContext.getAssetTagNames(), assetIsVisible, executionStartDate, executionEndDate,new java.util.Date(System.currentTimeMillis()), null, + ContentTypes.TEXT_HTML, course.getTitle(), course.getDescription(locale), summaryMap.get(locale), null, null, 0, 0,null, false); + assetEntry.setTitleMap(course.getTitleMap()); + assetEntry.setDescriptionMap(course.getDescriptionMap()); + assetEntry.setSummaryMap(summaryMap); + assetEntry = assetEntryLocalService.updateAssetEntry(assetEntry); assetLinkLocalService.updateLinks( userId, assetEntry.getEntryId(), serviceContext.getAssetLinkEntryIds(), diff --git a/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java b/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java index a7e08e9b7..14c300812 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java +++ b/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java @@ -16,7 +16,10 @@ import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Locale; +import java.util.Map; import javax.portlet.ActionRequest; import javax.portlet.PortletRequest; @@ -409,6 +412,19 @@ public Module addModule(Long companyId, Long groupId, Long userId, public Module addModule(Long companyId, Long groupId, Long userId, String title, String description, Date startDate, Date endDate, Long ordern, ServiceContext serviceContext) throws SystemException, PortalException { + + Map titleMap = new HashMap(); + titleMap.put(serviceContext.getLocale(), title); + + Map descriptionMap = new HashMap(); + descriptionMap.put(serviceContext.getLocale(), description); + + return addModule(companyId, groupId, userId, titleMap, descriptionMap, startDate, endDate, ordern, serviceContext); + } + @Indexable(type=IndexableType.REINDEX) + public Module addModule(Long companyId, Long groupId, Long userId, + Map titleMap, Map descriptionMap, + Date startDate, Date endDate, Long ordern, ServiceContext serviceContext) throws SystemException, PortalException { Module fileobj = modulePersistence.create(CounterLocalServiceUtil.increment(Module.class.getName())); fileobj.setCompanyId(companyId); @@ -425,9 +441,10 @@ public Module addModule(Long companyId, Long groupId, Long userId, fileobj.setModifiedDate(new java.util.Date(System.currentTimeMillis())); fileobj.setStartDate(startDate); fileobj.setEndDate(endDate); - fileobj.setTitle(title); - fileobj.setDescription(description); + fileobj.setTitleMap(titleMap); + fileobj.setDescriptionMap(descriptionMap); fileobj.setOrdern(ordern != null ? ordern : fileobj.getModuleId()); + fileobj.setExpandoBridgeAttributes(serviceContext); try { From 6fbe30958c78ea0c1b6de328f3cac18b94d6ac83 Mon Sep 17 00:00:00 2001 From: ana Date: Wed, 21 Apr 2021 18:44:58 +0200 Subject: [PATCH 3/9] =?UTF-8?q?[UPDATED]=20#199137=20-=20Se=20a=C3=B1aden?= =?UTF-8?q?=20servicios=20para:=20-=20Crear=20cursos=20con=20descripci?= =?UTF-8?q?=C3=B3n=20y=20summary=20en=20multiidioma=20-=20Crear=20cursos?= =?UTF-8?q?=20cuyo=20asset=20asociado=20tenga=20t=C3=ADtulo,=20descripci?= =?UTF-8?q?=C3=B3n=20y=20summary=20en=20multiidioma=20-=20Crear=20cursos?= =?UTF-8?q?=20cuyo=20asset=20asociado=20est=C3=A9=20o=20no=20visible=20(qu?= =?UTF-8?q?eda=20visible=20por=20defecto)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CourseLocalServiceImpl.java | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java b/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java index 69a538751..a5fa5e410 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java +++ b/docroot/WEB-INF/src/com/liferay/lms/service/impl/CourseLocalServiceImpl.java @@ -264,19 +264,42 @@ public List getPublicCoursesByCompanyId(Long companyId, int start, int e return null; } + - public Course addCourse (String title, String description,String summary,String friendlyURL, Locale locale, + public Course addCourse (Map titleMap, Map descriptionMap,Map summaryMap,String friendlyURL, Locale locale, Date createDate,Date startDate,Date endDate,long layoutSetPrototypeId,int typesite, long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext,boolean isfromClone) throws SystemException, PortalException { - Course course = addCourse (title, description,summary,friendlyURL, locale, + Course course = addCourse (titleMap, descriptionMap,summaryMap,friendlyURL, locale, createDate,startDate,endDate,null,null,layoutSetPrototypeId,typesite, CourseEvalId, calificationType, maxUsers, - serviceContext, isfromClone); - + serviceContext, isfromClone, 0); return course; } + public Course addCourse (Map titleMap, Map descriptionMap,Map summaryMap,String friendlyURL, Locale locale, + Date createDate,Date startDate,Date endDate,long layoutSetPrototypeId,int typesite, long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext, + boolean isfromClone, boolean assetVisible) + throws SystemException, PortalException { + + Course course = addCourse (titleMap, descriptionMap,summaryMap,friendlyURL, locale, + createDate,startDate,endDate,null,null,layoutSetPrototypeId,typesite, CourseEvalId, calificationType, maxUsers, + serviceContext, isfromClone, 0, assetVisible); + + return course; + } + + public Course addCourse (String title, String description,String summary,String friendlyURL, Locale locale, + Date createDate,Date startDate,Date endDate,long layoutSetPrototypeId,int typesite, long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext,boolean isfromClone) + throws SystemException, PortalException { + + Course course = addCourse (title, description,summary,friendlyURL, locale, + createDate,startDate,endDate,null,null,layoutSetPrototypeId,typesite, CourseEvalId, calificationType, maxUsers, + serviceContext, isfromClone); + + return course; + } + public Course addCourse (String title, String description,String summary,String friendlyURL, Locale locale, Date createDate,Date startDate,Date endDate, Date executionStartDate, Date executionEndDate, long layoutSetPrototypeId,int typesite, long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext,boolean isfromClone) throws SystemException, PortalException { @@ -289,7 +312,8 @@ public Course addCourse (String title, String description,String summary,String public Course addCourse (Map titleMap, String description,String summary,String friendlyURL, Locale locale, Date createDate,Date startDate,Date endDate, Date executionStartDate, Date executionEndDate, long layoutSetPrototypeId,int typesite, long CourseEvalId, long calificationType, int maxUsers,ServiceContext serviceContext,boolean isfromClone) throws SystemException, PortalException { - return addCourse(titleMap, description, summary, friendlyURL, locale, createDate, startDate, endDate, executionStartDate, executionEndDate, layoutSetPrototypeId, typesite, CourseEvalId, calificationType, maxUsers, serviceContext, isfromClone, 0); + return addCourse(titleMap, description, summary, friendlyURL, locale, createDate, startDate, endDate, executionStartDate, executionEndDate, layoutSetPrototypeId, + typesite, CourseEvalId, calificationType, maxUsers, serviceContext, isfromClone, 0); } public Course addCourse (Map titleMap, String description,String summary,String friendlyURL, Locale locale, @@ -305,7 +329,7 @@ public Course addCourse (Map titleMap, String description,String return addCourse(titleMap, descriptionMap, summaryMap, friendlyURL, locale, createDate, startDate, endDate, executionStartDate, executionEndDate, layoutSetPrototypeId, typesite, CourseEvalId, calificationType, - maxUsers, serviceContext, isfromClone, 0); + maxUsers, serviceContext, isfromClone, courseTypeId); } public Course addCourse (Map titleMap, String description,String summary,String friendlyURL, Locale locale, @@ -321,7 +345,7 @@ public Course addCourse (Map titleMap, String description,String return addCourse(titleMap, descriptionMap, summaryMap, friendlyURL, locale, createDate, startDate, endDate, executionStartDate, executionEndDate, layoutSetPrototypeId, typesite, CourseEvalId, calificationType, - maxUsers, serviceContext, isfromClone, 0, assetIsVisible); + maxUsers, serviceContext, isfromClone, courseTypeId, assetIsVisible); } public Course addCourse (Map titleMap, Map descriptionMap, Map summaryMap,String friendlyURL, Locale locale, @@ -332,7 +356,7 @@ public Course addCourse (Map titleMap, Map descrip return addCourse(titleMap, descriptionMap, summaryMap, friendlyURL, locale, createDate, startDate, endDate, executionStartDate, executionEndDate, layoutSetPrototypeId, typesite, CourseEvalId, calificationType, - maxUsers, serviceContext, isfromClone, 0, true); + maxUsers, serviceContext, isfromClone, courseTypeId, true); } From 4141dad72bf7e447d314078c12c9d06aec91ad70 Mon Sep 17 00:00:00 2001 From: ana Date: Thu, 22 Apr 2021 12:50:55 +0200 Subject: [PATCH 4/9] =?UTF-8?q?[UPDATED]=20#199137=20-=20Se=20a=C3=B1aden?= =?UTF-8?q?=20servicios=20para=20a=C3=B1adir=20t=C3=ADtulo=20en=20multiidi?= =?UTF-8?q?oma=20al=20crear=20un=20m=C3=B3dulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../liferay/lms/service/impl/ModuleLocalServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java b/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java index 14c300812..8025c27f3 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java +++ b/docroot/WEB-INF/src/com/liferay/lms/service/impl/ModuleLocalServiceImpl.java @@ -409,6 +409,12 @@ public Module addModule(Long companyId, Long groupId, Long userId, return addModule(companyId, groupId, userId, title, description, startDate, endDate, ordern, null); } @Indexable(type=IndexableType.REINDEX) + public Module addModule(Long companyId, Long groupId, Long userId, + Map titleMap, Map descriptionMap, + Date startDate, Date endDate, Long ordern) throws SystemException, PortalException{ + return addModule(companyId, groupId, userId, titleMap, descriptionMap, startDate, endDate, ordern, null); + } + @Indexable(type=IndexableType.REINDEX) public Module addModule(Long companyId, Long groupId, Long userId, String title, String description, Date startDate, Date endDate, Long ordern, ServiceContext serviceContext) throws SystemException, PortalException { @@ -444,7 +450,6 @@ public Module addModule(Long companyId, Long groupId, Long userId, fileobj.setTitleMap(titleMap); fileobj.setDescriptionMap(descriptionMap); fileobj.setOrdern(ordern != null ? ordern : fileobj.getModuleId()); - fileobj.setExpandoBridgeAttributes(serviceContext); try { From 0a20f8568da15f7f9d050098c3f9722ebc2d3456 Mon Sep 17 00:00:00 2001 From: je10400 Date: Thu, 22 Apr 2021 12:56:53 +0200 Subject: [PATCH 5/9] =?UTF-8?q?[ADDED]=20#190136=20En=20las=20actividades?= =?UTF-8?q?=20Recurso=20interno=20se=20ha=20a=C3=B1adido=20un=20campo=20en?= =?UTF-8?q?=20el=20extradata=20de=20la=20actividad=20en=20el=20que=20se=20?= =?UTF-8?q?guarda=20un=20valor=20boolean=20para=20en=20caso=20afirmativo,?= =?UTF-8?q?=20se=20muestre=20si=20se=20ha=20visualizado=20o=20no=20la=20ac?= =?UTF-8?q?tividad=20y=20si=20ese=20campo=20no=20est=C3=A1=20en=20la=20act?= =?UTF-8?q?ividad,=20no=20se=20muestra=20el=20mensaje.=20En=20cuanto=20a?= =?UTF-8?q?=20las=20actividades=20de=20recurso=20externo,=20al=20igual=20e?= =?UTF-8?q?n=20que=20en=20las=20internas,=20se=20ha=20metido=20otro=20camp?= =?UTF-8?q?o=20para=20pintar=20o=20no=20el=20avance=20que=20lleva=20la=20a?= =?UTF-8?q?ctividad.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../liferay/lms/ResourceExternalActivity.java | 9 ++++++++- .../ResourceExternalLearningActivityType.java | 15 ++++++++++++++- .../ResourceInternalLearningActivityType.java | 13 +++++++++++++ .../WEB-INF/src/content/Language.properties | 7 ++++++- .../src/content/Language_ca.properties | 7 ++++++- .../src/content/Language_de.properties | 7 ++++++- .../src/content/Language_en.properties | 7 ++++++- .../src/content/Language_es.properties | 7 ++++++- .../src/content/Language_eu.properties | 7 ++++++- .../src/content/Language_gl.properties | 7 ++++++- .../src/content/Language_it.properties | 7 ++++++- .../src/content/Language_pt.properties | 7 ++++++- .../src/content/Language_tr.properties | 7 ++++++- .../src/content/Language_zh.properties | 7 ++++++- .../resourceExternalActivity/admin/edit.jsp | 8 ++++++++ .../html/resourceExternalActivity/view.jsp | 4 ++++ .../resourceInternalActivity/admin/edit.jsp | 14 ++++++++++++++ .../html/resourceInternalActivity/view.jsp | 19 +++++++++++++++++++ 18 files changed, 146 insertions(+), 13 deletions(-) diff --git a/docroot/WEB-INF/src/com/liferay/lms/ResourceExternalActivity.java b/docroot/WEB-INF/src/com/liferay/lms/ResourceExternalActivity.java index 8c6750e99..b6521f101 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/ResourceExternalActivity.java +++ b/docroot/WEB-INF/src/com/liferay/lms/ResourceExternalActivity.java @@ -207,9 +207,16 @@ public void render(RenderRequest renderRequest, RenderResponse renderResponse) if(videoControl!=null){ videoControlDisabled = Boolean.parseBoolean(videoControl.getText()); } - renderRequest.setAttribute("controls", videoControlDisabled && !userPassed ? "": "controls"); + boolean showScoreInfo = false; + Element showScoreInfoElement = root.element("show-score-info"); + if(Validator.isNotNull(showScoreInfoElement)){ + showScoreInfo = Boolean.parseBoolean(showScoreInfoElement.getText()); + } + renderRequest.setAttribute("showScoreInfo", showScoreInfo); + + int seekTo = 0; if (videoPosition > 0 && oldScore<100){ DecimalFormat df = new DecimalFormat("#####"); diff --git a/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceExternalLearningActivityType.java b/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceExternalLearningActivityType.java index 098bf4a39..c3122038e 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceExternalLearningActivityType.java +++ b/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceExternalLearningActivityType.java @@ -28,6 +28,7 @@ import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.kernel.util.PropsUtil; import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.WebKeys; import com.liferay.portal.kernel.xml.Document; import com.liferay.portal.kernel.xml.DocumentException; @@ -124,6 +125,7 @@ public String setExtraContent(UploadRequest uploadRequest, PortletResponse portl String youtubecode=ParamUtil.getString(uploadRequest,"youtubecode"); boolean videoControlEnabled=ParamUtil.getBoolean(uploadRequest,"videoControl"); + boolean showScoreInfo=ParamUtil.getBoolean(uploadRequest,"showScoreInfo"); String team = ParamUtil.getString(uploadRequest, "team","0"); long teamId = 0; if(!team.equalsIgnoreCase("0")&&!team.isEmpty()){ @@ -193,7 +195,18 @@ public String setExtraContent(UploadRequest uploadRequest, PortletResponse portl videoControl = SAXReaderUtil.createElement("video-control"); videoControl.setText(String.valueOf(videoControlEnabled)); - rootElement.add(videoControl); + rootElement.add(videoControl); + + Element showScoreInfoElement = rootElement.element("show-score-info"); + if(Validator.isNotNull(showScoreInfoElement)) + { + showScoreInfoElement.detach(); + rootElement.remove(showScoreInfoElement); + } + + showScoreInfoElement = SAXReaderUtil.createElement("show-score-info"); + showScoreInfoElement.setText(String.valueOf(showScoreInfo)); + rootElement.add(showScoreInfoElement); if(files.size()>0){ boolean changes = false; diff --git a/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceInternalLearningActivityType.java b/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceInternalLearningActivityType.java index 5b7717323..d48c56228 100644 --- a/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceInternalLearningActivityType.java +++ b/docroot/WEB-INF/src/com/liferay/lms/learningactivity/ResourceInternalLearningActivityType.java @@ -20,6 +20,7 @@ import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.kernel.util.PrefsPropsUtil; import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.WebKeys; import com.liferay.portal.kernel.xml.Document; import com.liferay.portal.kernel.xml.DocumentException; @@ -107,6 +108,8 @@ public String setExtraContent(UploadRequest uploadRequest, String assetId = ParamUtil.getString(uploadRequest,"assetEntryId","0"); String team = ParamUtil.getString(uploadRequest, "team","0"); long teamId = 0; + boolean showDoneInfo=ParamUtil.getBoolean(uploadRequest,"showDoneInfo"); + ThemeDisplay themeDisplay = (ThemeDisplay) uploadRequest.getAttribute(WebKeys.THEME_DISPLAY); if(!team.equalsIgnoreCase("0")){ teamId = Long.parseLong(team); @@ -205,6 +208,16 @@ public String setExtraContent(UploadRequest uploadRequest, } } + Element doneInfoElement=rootElement.element("show-done-info"); + if(Validator.isNotNull(doneInfoElement)) + { + doneInfoElement.detach(); + rootElement.remove(doneInfoElement); + } + doneInfoElement = SAXReaderUtil.createElement("show-done-info"); + doneInfoElement.setText(String.valueOf(showDoneInfo)); + rootElement.add(doneInfoElement); + learningActivity.setExtracontent(document.formattedString()); return null; diff --git a/docroot/WEB-INF/src/content/Language.properties b/docroot/WEB-INF/src/content/Language.properties index 068dd2a84..ed0c93e0d 100644 --- a/docroot/WEB-INF/src/content/Language.properties +++ b/docroot/WEB-INF/src/content/Language.properties @@ -1969,9 +1969,14 @@ resourceexternalactivity.play-answer-question = Deber responder a resourceexternalactivity.question-feedback = Resultado por pregunta resourceexternalactivity.questions-video.passpuntuation = Porcentaje de visualizaci\u00F3n del v\u00EDdeo o puntuaci\u00F3n por responder a las preguntas para aprobar: resourceexternalactivity.questions-video.passpuntuation.help = Indica, con un n\u00FAmero entero, el porcentaje que es necesario ver el v\u00EDdeo para aprobar en caso de haber seleccionado este m\u00E9todo de evaluaci\u00F3n. Por ejemplo, si indicas 50 es que ser\u00E1 necesario ver el v\u00EDdeo un m\u00EDnimo del 50% de su duraci\u00F3n para superar la actividad. Si has seleccionado puntuaci\u00F3n por responder a las preguntas indica la puntuaci\u00F3n que es necesario sacar para aprobar por haber contestado correctamente a las preguntas. +resourceexternalactivity.scoreinfo.message = La actividad se ha avanzado en un +resourceexternalactivity.showscoreinfo.message = Mostrar avance de la actividad resourceexternalactivity.videocontrol.disabled = Deshabilitar controles de v\u00EDdeo -resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.activitydone.message = La actividad ha sido visualizada +resourceinternalactivity.activitynotdone.message = La actividad no ha sido visualizada +resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.showdoneinfo.message = Mostrar informaci\u00F3n sobre la visualizaci\u00F3n de la actividad result = Resultado diff --git a/docroot/WEB-INF/src/content/Language_ca.properties b/docroot/WEB-INF/src/content/Language_ca.properties index 8f61bb644..ad8506c0d 100644 --- a/docroot/WEB-INF/src/content/Language_ca.properties +++ b/docroot/WEB-INF/src/content/Language_ca.properties @@ -1924,9 +1924,14 @@ resourceexternalactivity.play-answer-question = Abans de continua resourceexternalactivity.question-feedback = Resultat per pregunta resourceexternalactivity.questions-video.passpuntuation = Percentatge de visualitzaci\u00F3 del v\u00EDdeo o puntuaci\u00F3 per respondre les preguntes per aprovar: resourceexternalactivity.questions-video.passpuntuation.help = Indica, amb un nombre sencer, el percentatge que cal veure el v\u00EDdeo per aprovar en cas d'haver seleccionat aquest m\u00E8tode d'avaluaci\u00F3. Per exemple, si indiques 50 \u00E9s que caldr\u00E0 veure el v\u00EDdeo un m\u00EDnim del 50\u00A0% de la seva durada per superar l'activitat. Si has seleccionat puntuaci\u00F3 per respondre les preguntes, indica la puntuaci\u00F3 que cal treure per aprovar per haver contestat les preguntes correctament. +resourceexternalactivity.scoreinfo.message = L'activitat s'ha avan\u00E7at en un +resourceexternalactivity.showscoreinfo.message = Mostra avan\u00E7 de l'activitat resourceexternalactivity.videocontrol.disabled = Deshabilitar controles de v\u00EDdeo -resourceinternalactivity.edit.asserts = Recurs +resourceinternalactivity.activitydone.message = L'activitat ha estat visualitzada +resourceinternalactivity.activitynotdone.message = L'activitat no ha estat visualitzada +resourceinternalactivity.edit.asserts = Recurs +resourceinternalactivity.showdoneinfo.message = Mostra informaci\u00F3 sobre la visualitzaci\u00F3 de l'activitat result = Resultat diff --git a/docroot/WEB-INF/src/content/Language_de.properties b/docroot/WEB-INF/src/content/Language_de.properties index 8ed6c1926..f1940bf15 100644 --- a/docroot/WEB-INF/src/content/Language_de.properties +++ b/docroot/WEB-INF/src/content/Language_de.properties @@ -1353,9 +1353,14 @@ resourceInternalActivity.there-are-no-assets = Es wurden keine Ergebnisse f\u resourceexternalactivity.downloadFile = Dokument herunterladen: {0} resourceexternalactivity.passpuntuation = Percentage video display to pass: resourceexternalactivity.passpuntuation.help = Using a whole number, this indicates the percentage video display required to pass. For example, if you indicate 50, it will be necessary to watch video at least 50 % of its length to pass the activity. +resourceexternalactivity.scoreinfo.message = Die Aktivit\u00E4t ist in a fortgeschritten +resourceexternalactivity.showscoreinfo.message = Aktivit\u00E4tsfortschritt anzeigen resourceexternalactivity.videocontrol.disabled = Disable video controls -resourceinternalactivity.edit.asserts = Ressource +resourceinternalactivity.activitydone.message = Die Aktivit\u00E4t wurde angezeigt +resourceinternalactivity.activitynotdone.message = Die Aktivit\u00E4t wurde nicht angezeigt +resourceinternalactivity.edit.asserts = Ressource +resourceinternalactivity.showdoneinfo.message = Informationen zur Aktivit\u00E4tsanzeige anzeigen result = Ergebnis diff --git a/docroot/WEB-INF/src/content/Language_en.properties b/docroot/WEB-INF/src/content/Language_en.properties index e8db13fe4..ae483773c 100644 --- a/docroot/WEB-INF/src/content/Language_en.properties +++ b/docroot/WEB-INF/src/content/Language_en.properties @@ -1939,9 +1939,14 @@ resourceexternalactivity.play-answer-question = The question must resourceexternalactivity.question-feedback = Results by question resourceexternalactivity.questions-video.passpuntuation = Percentage of video viewed or marks for answering the questions to pass: resourceexternalactivity.questions-video.passpuntuation.help = Indicate, with a whole number, the percentage of the video it is necessary to have viewed to pass when this method of evaluation has been selected. For example, if you indicate 50, this means it will be necessary to watch a minimum of 50% of the total length of the video in order to pass the activity. If you have selected to be marked by answering the questions, indicate the mark that it is necessary to pass by answering the questions correctly. +resourceexternalactivity.scoreinfo.message = The activity has progressed in a +resourceexternalactivity.showscoreinfo.message = Show activity progress resourceexternalactivity.videocontrol.disabled = Disable video controls -resourceinternalactivity.edit.asserts = Resource +resourceinternalactivity.activitydone.message = The activity has been viewed +resourceinternalactivity.activitynotdone.message = The activity has not been viewed +resourceinternalactivity.edit.asserts = Resource +resourceinternalactivity.showdoneinfo.message = Show information about the activity display result = Result diff --git a/docroot/WEB-INF/src/content/Language_es.properties b/docroot/WEB-INF/src/content/Language_es.properties index 7622239f3..b7ae3dfc3 100644 --- a/docroot/WEB-INF/src/content/Language_es.properties +++ b/docroot/WEB-INF/src/content/Language_es.properties @@ -1960,9 +1960,14 @@ resourceexternalactivity.play-answer-question = Deber responder a resourceexternalactivity.question-feedback = Resultado por pregunta resourceexternalactivity.questions-video.passpuntuation = Porcentaje de visualizaci\u00F3n del v\u00EDdeo o puntuaci\u00F3n por responder a las preguntas para aprobar: resourceexternalactivity.questions-video.passpuntuation.help = Indica, con un n\u00FAmero entero, el porcentaje que es necesario ver el v\u00EDdeo para aprobar en caso de haber seleccionado este m\u00E9todo de evaluaci\u00F3n. Por ejemplo, si indicas 50 es que ser\u00E1 necesario ver el v\u00EDdeo un m\u00EDnimo del 50% de su duraci\u00F3n para superar la actividad. Si has seleccionado puntuaci\u00F3n por responder a las preguntas indica la puntuaci\u00F3n que es necesario sacar para aprobar por haber contestado correctamente a las preguntas. +resourceexternalactivity.scoreinfo.message = La actividad se ha avanzado en un +resourceexternalactivity.showscoreinfo.message = Mostrar avance de la actividad resourceexternalactivity.videocontrol.disabled = Deshabilitar controles de v\u00EDdeo -resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.activitydone.message = La actividad ha sido visualizada +resourceinternalactivity.activitynotdone.message = La actividad no ha sido visualizada +resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.showdoneinfo.message = Mostrar informaci\u00F3n sobre la visualizaci\u00F3n de la actividad result = Resultado diff --git a/docroot/WEB-INF/src/content/Language_eu.properties b/docroot/WEB-INF/src/content/Language_eu.properties index 09eb2c8ab..162cb053c 100644 --- a/docroot/WEB-INF/src/content/Language_eu.properties +++ b/docroot/WEB-INF/src/content/Language_eu.properties @@ -1502,9 +1502,14 @@ resourceInternalActivity.there-are-no-assets = Ez dago bilaketarekin bat egit resourceexternalactivity.downloadFile = Dokumentua deskargatu: {0} resourceexternalactivity.passpuntuation = Porcentaje de visualizaci\u00F3n del v\u00EDdeo para aprobar: resourceexternalactivity.passpuntuation.help = Indica, con un n\u00FAmero entero, el porcentaje que es necesario ver el v\u00EDdeo para aprobar. Por ejemplo, si indicas 50 es que ser\u00E1 necesario ver el v\u00EDdeo un m\u00EDnimo del 50% de su duraci\u00F3n para superar la actividad. +resourceexternalactivity.scoreinfo.message = Jarduerak aurrera egin du +resourceexternalactivity.showscoreinfo.message = Erakutsi jardueraren aurrerapena resourceexternalactivity.videocontrol.disabled = Deshabilitar controles de v\u00EDdeo -resourceinternalactivity.edit.asserts = Baliabidea +resourceinternalactivity.activitydone.message = Jarduera ikusi da +resourceinternalactivity.activitynotdone.message = Jarduera ez da ikusi +resourceinternalactivity.edit.asserts = Baliabidea +resourceinternalactivity.showdoneinfo.message = Erakutsi jardueren pantailari buruzko informazioa result = Emaitza diff --git a/docroot/WEB-INF/src/content/Language_gl.properties b/docroot/WEB-INF/src/content/Language_gl.properties index fcbe7671a..2224079db 100644 --- a/docroot/WEB-INF/src/content/Language_gl.properties +++ b/docroot/WEB-INF/src/content/Language_gl.properties @@ -1532,9 +1532,14 @@ resourceInternalActivity.there-are-no-assets = Non hai resultados que coincid resourceexternalactivity.downloadFile = Descargar documento: {0} resourceexternalactivity.passpuntuation = Porcentaje de visualizaci\u00F3n del v\u00EDdeo para aprobar: resourceexternalactivity.passpuntuation.help = Indica, con un n\u00FAmero entero, el porcentaje que es necesario ver el v\u00EDdeo para aprobar. Por ejemplo, si indicas 50 es que ser\u00E1 necesario ver el v\u00EDdeo un m\u00EDnimo del 50% de su duraci\u00F3n para superar la actividad. +resourceexternalactivity.scoreinfo.message = A actividade avanzou nun +resourceexternalactivity.showscoreinfo.message = Mostrar o progreso da actividade resourceexternalactivity.videocontrol.disabled = Deshabilitar controles de v\u00EDdeo -resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.activitydone.message = A actividade foi vista +resourceinternalactivity.activitynotdone.message = A actividade non se viu +resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.showdoneinfo.message = Mostrar informaci\u00F3n sobre a visualizaci\u00F3n da actividade result = Resultado diff --git a/docroot/WEB-INF/src/content/Language_it.properties b/docroot/WEB-INF/src/content/Language_it.properties index aa3afe924..ee84401cc 100644 --- a/docroot/WEB-INF/src/content/Language_it.properties +++ b/docroot/WEB-INF/src/content/Language_it.properties @@ -1924,9 +1924,14 @@ resourceexternalactivity.play-answer-question = Prima di prosegui resourceexternalactivity.question-feedback = Risultato per domanda resourceexternalactivity.questions-video.passpuntuation = Percentuale di visualizzazione del video e voto per le risposte alle domande per l'approvazione: resourceexternalactivity.questions-video.passpuntuation.help = Indicare, con un numero intero, la percentuale di video che \u00E8 necessario visualizzare, in caso si sia selezionato questo metodo di approvazione. Per esempio, se indichi 50 significa che sar\u00E0 necessario vedere il video almeno il 50% della durata per superare l'attivit\u00E0. Selezionando una votazione per le risposte alle domande, indicare il voto che \u00E8 necessario raggiungere per superare la prova, avendo risposto alle domande in maniera corretta. +resourceexternalactivity.scoreinfo.message = L'attivit\u00E0 \u00E8 proseguita in a +resourceexternalactivity.showscoreinfo.message = Mostra l'avanzamento dell'attivit\u00E0 resourceexternalactivity.videocontrol.disabled = Disabilita controller del video -resourceinternalactivity.edit.asserts = Risorsa +resourceinternalactivity.activitydone.message = L'attivit\u00E0 \u00E8 stata visualizzata +resourceinternalactivity.activitynotdone.message = L'attivit\u00E0 non \u00E8 stata visualizzata +resourceinternalactivity.edit.asserts = Risorsa +resourceinternalactivity.showdoneinfo.message = Mostra le informazioni sulla visualizzazione dell'attivit\u00E0 result = Risultato diff --git a/docroot/WEB-INF/src/content/Language_pt.properties b/docroot/WEB-INF/src/content/Language_pt.properties index a2c138830..e6c72eceb 100644 --- a/docroot/WEB-INF/src/content/Language_pt.properties +++ b/docroot/WEB-INF/src/content/Language_pt.properties @@ -2020,9 +2020,14 @@ resourceexternalactivity.play-answer-question = Deve responder a resourceexternalactivity.question-feedback = Resultado por pergunta resourceexternalactivity.questions-video.passpuntuation = Porcentagem de exibi\u00E7\u00E3o ou pontua\u00E7\u00E3o de v\u00EDdeo respondendo \u00E0s perguntas a serem aprovadas: resourceexternalactivity.questions-video.passpuntuation.help = Indica, com um n\u00FAmero inteiro, a porcentagem que \u00E9 necess\u00E1rio ver o v\u00EDdeo para aprovar, caso voc\u00EA tenha selecionado esse m\u00E9todo de avalia\u00E7\u00E3o. Por exemplo, se voc\u00EA indicar 50, ser\u00E1 necess\u00E1rio assistir ao v\u00EDdeo com um m\u00EDnimo de 50% de sua dura\u00E7\u00E3o para superar a atividade. Se voc\u00EA selecionou uma pontua\u00E7\u00E3o para responder \u00E0s perguntas, isso indica a pontua\u00E7\u00E3o que deve ser obtida para passar respondendo corretamente \u00E0s perguntas. +resourceexternalactivity.scoreinfo.message = A atividade progrediu em um +resourceexternalactivity.showscoreinfo.message = Mostrar o progresso da atividade resourceexternalactivity.videocontrol.disabled = Deshabilitar controles de v\u00EDdeo -resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.activitydone.message = A atividade foi visualizada +resourceinternalactivity.activitynotdone.message = A atividade n\u00E3o foi visualizada +resourceinternalactivity.edit.asserts = Recurso +resourceinternalactivity.showdoneinfo.message = Mostrar informa\u00E7\u00F5es sobre a exibi\u00E7\u00E3o de atividades result = Resultado diff --git a/docroot/WEB-INF/src/content/Language_tr.properties b/docroot/WEB-INF/src/content/Language_tr.properties index 39557925c..ee46fc8ae 100644 --- a/docroot/WEB-INF/src/content/Language_tr.properties +++ b/docroot/WEB-INF/src/content/Language_tr.properties @@ -1747,9 +1747,14 @@ resourceexternalactivity.passpuntuation.help = " Tam bir say\u01 resourceexternalactivity.play-answer-question = Videoya devam etmeden \u00F6nce soruyu yan\u0131tlaman\u0131z gerek resourceexternalactivity.questions-video.passpuntuation = Ba\u015Far\u0131l\u0131 olmak i\u00E7in videonun g\u00F6r\u00FCnt\u00FClenmesi ya da sorular\u0131n yan\u0131tlamas\u0131na g\u00F6re puanlama y\u00FCzdesi: resourceexternalactivity.questions-video.passpuntuation.help = Bu de\u011Ferlendirme y\u00F6nteminin se\u00E7ilmesi durumunda ba\u015Far\u0131l\u0131 olmak i\u00E7in gereken video izlenme oran\u0131n\u0131 tam bir rakamla belirtin. \u00D6rne\u011Fin, e\u011Fer 50 yazarsan\u0131z, aktivitede ba\u015Far\u0131l\u0131 olmak i\u00E7in videonun en az %50'sinin izlenmesi gerekir. Sorular\u0131n yan\u0131tlanmas\u0131na g\u00F6re puanlamay\u0131 se\u00E7tiyseniz, sorular\u0131 do\u011Fru bir \u015Fekilde yan\u0131tlayarak ba\u015Far\u0131l\u0131 olmak i\u00E7in al\u0131nmas\u0131 gereken puan\u0131 belirtin. +resourceexternalactivity.scoreinfo.message = Etkinlik bir +resourceexternalactivity.showscoreinfo.message = Aktivite ilerlemesini g\u00F6ster resourceexternalactivity.videocontrol.disabled = Video kontrollerini devre d\u0131\u015F\u0131 b\u0131rak -resourceinternalactivity.edit.asserts = Kaynak +resourceinternalactivity.activitydone.message = Aktivite g\u00F6r\u00FCnt\u00FClendi +resourceinternalactivity.activitynotdone.message = Aktivite g\u00F6r\u00FCnt\u00FClenmedi +resourceinternalactivity.edit.asserts = Kaynak +resourceinternalactivity.showdoneinfo.message = Aktivite ekran\u0131 hakk\u0131nda bilgi g\u00F6ster result = Sonu\u00E7 diff --git a/docroot/WEB-INF/src/content/Language_zh.properties b/docroot/WEB-INF/src/content/Language_zh.properties index 452cea1f5..455d2fc87 100644 --- a/docroot/WEB-INF/src/content/Language_zh.properties +++ b/docroot/WEB-INF/src/content/Language_zh.properties @@ -1748,9 +1748,14 @@ resourceexternalactivity.passpuntuation.help = \u4EE5\u6574\u657 resourceexternalactivity.play-answer-question = \u7EE7\u7EED\u89C6\u9891\u524D\u9700\u8981\u56DE\u7B54\u95EE\u9898 resourceexternalactivity.questions-video.passpuntuation = \u5F85\u6279\u51C6\u89C6\u9891\u6536\u770B\u767E\u5206\u6BD4\u6216\u56DE\u7B54\u95EE\u9898\u7684\u5F97\u5206\uFF1A resourceexternalactivity.questions-video.passpuntuation.help = \u5982\u679C\u9009\u62E9\u4E86\u6B64\u8BC4\u4F30\u65B9\u6CD5\uFF0C\u8BF7\u4EE5\u6574\u6570\u5F62\u5F0F\u6307\u51FA\u901A\u8FC7\u6240\u9700\u7684\u89C6\u9891\u6536\u770B\u767E\u5206\u6BD4\u3002\u4F8B\u5982\uFF0C\u5982\u679C\u6307\u793A50\uFF0C\u9700\u8981\u67E5\u770B\u6700\u5C1150%\u7684\u89C6\u9891\u957F\u5EA6\u624D\u80FD\u901A\u8FC7\u6D3B\u52A8\u3002\u5982\u679C\u9009\u62E9\u56DE\u7B54\u95EE\u9898\u7684\u5F97\u5206\uFF0C\u6307\u51FA\u901A\u8FC7\u6240\u9700\u7684\u6B63\u786E\u56DE\u7B54\u3002 +resourceexternalactivity.scoreinfo.message = \u6D3B\u52D5\u9032\u5C55\u9806\u5229 +resourceexternalactivity.showscoreinfo.message = \u986F\u793A\u6D3B\u52D5\u9032\u5EA6 resourceexternalactivity.videocontrol.disabled = \u7981\u6B62\u89C6\u9891\u63A7\u5236 -resourceinternalactivity.edit.asserts = \u8D44\u6E90 +resourceinternalactivity.activitydone.message = \u8A72\u6D3B\u52D5\u5DF2\u88AB\u67E5\u770B +resourceinternalactivity.activitynotdone.message = \u8A72\u6D3B\u52D5\u5C1A\u672A\u88AB\u67E5\u770B +resourceinternalactivity.edit.asserts = \u8D44\u6E90 +resourceinternalactivity.showdoneinfo.message = \u986F\u793A\u6709\u200B\u200B\u95DC\u6D3B\u52D5\u986F\u793A\u7684\u4FE1\u606F result = \u7ED3\u679C diff --git a/docroot/html/resourceExternalActivity/admin/edit.jsp b/docroot/html/resourceExternalActivity/admin/edit.jsp index 78e8648a3..1d995cbb1 100644 --- a/docroot/html/resourceExternalActivity/admin/edit.jsp +++ b/docroot/html/resourceExternalActivity/admin/edit.jsp @@ -35,6 +35,7 @@ <% boolean defaultValueCheckBox=false; + boolean defaultShowScoreInfo = false; Integer maxfile = ResourceExternalLearningActivityType.DEFAULT_FILENUMBER; PortletSession psession= renderRequest.getPortletSession(); @@ -86,6 +87,11 @@ Element video=root.element("video"); if(video!=null) youtubecode=video.getText(); + Element showScoreInfo = root.element("show-score-info"); + if(Validator.isNotNull(showScoreInfo)){ + + defaultShowScoreInfo = Boolean.parseBoolean(showScoreInfo.getText()); + } Element videoControlEnabled = root.element("video-control"); if(videoControlEnabled!=null) defaultValueCheckBox= Boolean.parseBoolean(videoControlEnabled.getText()); @@ -167,6 +173,8 @@ <% } %> + +
${activity.getDescriptionFiltered(themeDisplay.locale,true)}
+ +
${oldScore}%
+
+ diff --git a/docroot/html/resourceInternalActivity/admin/edit.jsp b/docroot/html/resourceInternalActivity/admin/edit.jsp index 31d9fdfed..cae841516 100644 --- a/docroot/html/resourceInternalActivity/admin/edit.jsp +++ b/docroot/html/resourceInternalActivity/admin/edit.jsp @@ -1,3 +1,6 @@ +<%@page import="com.liferay.portal.kernel.xml.Element"%> +<%@page import="com.liferay.portal.kernel.xml.SAXReaderUtil"%> +<%@page import="com.liferay.portal.kernel.xml.Document"%> <%@page import="com.liferay.lms.service.LearningActivityTryLocalServiceUtil"%> <%@page import="com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil"%> <%@page import="com.liferay.portal.kernel.dao.orm.Criterion"%> @@ -21,6 +24,7 @@ long resModuleId = ParamUtil.getLong(request, "resModuleId"); long assetId=ParamUtil.getLong(request, "assertId"); String assetTitle=StringPool.BLANK; String disabled = "disabled=\"disabled\""; +boolean showDoneInfo = false; @@ -38,6 +42,14 @@ LearningActivity learningActivity=(LearningActivity)request.getAttribute("activi if(learningActivity!=null) { if ((learningActivity.getExtracontent()!=null)&&(learningActivity.getExtracontent().trim().length()!=0)) { try{ + Document document = SAXReaderUtil.read(learningActivity.getExtracontent()); + Element root=document.getRootElement(); + Element doneInfoElement=root.element("show-done-info"); + if(Validator.isNotNull(doneInfoElement)){ + + showDoneInfo = Boolean.parseBoolean(doneInfoElement.getText()); + } + if(assetId==0){ AssetEntry entry=AssetEntryLocalServiceUtil.getEntry( GetterUtil.getLong(LearningActivityLocalServiceUtil.getExtraContentValue(learningActivity.getActId(),"assetEntry"))); @@ -80,6 +92,8 @@ if(LearningActivityLocalServiceUtil.canBeEdited(learningActivity, user.getUserId " label="true" /> + +