Skip to content

Commit

Permalink
Merge pull request #86 from TelefonicaED/hotfix-3.8.3
Browse files Browse the repository at this point in the history
Hotfix 3.8.3
  • Loading branch information
jorgeted committed Jul 31, 2019
2 parents 9e53d88 + 65a3118 commit b5d6f8c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docroot/WEB-INF/liferay-plugin-package.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=liferaylms-portlet
module-group-id=com.ted.wemooc
module-incremental-version=3.8.2
module-incremental-version=3.8.3
tags=
short-description=
change-log=
Expand Down
2 changes: 1 addition & 1 deletion docroot/WEB-INF/src/com/liferay/lms/CourseAdmin.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private void showViewCourseTypes(RenderRequest renderRequest,RenderResponse rend

List<CourseType> listCourseTypes = new ArrayList<CourseType>();
try {
listCourseTypes = CourseTypeLocalServiceUtil.getCourseTypes(-1, -1);
listCourseTypes = CourseTypeLocalServiceUtil.getByCompanyId(themeDisplay.getCompanyId());
} catch (SystemException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ private void showViewDefault(RenderRequest request,RenderResponse response) thro
SearchContainer<CourseType> searchContainer = new SearchContainer<CourseType>(request, null, null, SearchContainer.DEFAULT_CUR_PARAM,
SearchContainer.DEFAULT_DELTA, response.createRenderURL(), null, "no-results");
try {
searchContainer.setResults(CourseTypeLocalServiceUtil.getCourseTypes(searchContainer.getStart(), searchContainer.getEnd()));
searchContainer.setTotal(CourseTypeLocalServiceUtil.getCourseTypesCount());
searchContainer.setResults(CourseTypeLocalServiceUtil.getByCompanyId(themeDisplay.getCompanyId(),searchContainer.getStart(), searchContainer.getEnd()));
searchContainer.setTotal(CourseTypeLocalServiceUtil.countByCompanyId(themeDisplay.getCompanyId()));
} catch (SystemException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ public List<CourseType> getByCompanyId(long companyId) throws SystemException{
return courseTypePersistence.findByCompanyId(companyId);
}

public List<CourseType> getByCompanyId(long companyId, int start, int end) throws SystemException{
return courseTypePersistence.findByCompanyId(companyId, start, end);
}

public int countByCompanyId(long companyId) throws SystemException{
return courseTypePersistence.countByCompanyId(companyId);
}

public CourseType getByCourseTypeId(long courseTypeId) throws NoSuchCourseTypeException, SystemException{
return courseTypePersistence.findByCourseTypeId(courseTypeId);
}
Expand Down Expand Up @@ -229,5 +237,4 @@ public CourseType deleteCourseType(long courseTypeId) throws SystemException, No
}
return courseType;
}

}
4 changes: 2 additions & 2 deletions docroot/WEB-INF/src/portal.properties
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ com.liferay.lms.diploma.background.path=Diplomas/Fondos
com.liferay.lms.diploma.additional.type=1,2,3


release.info.build.number=382
release.info.build.number=383

release.info.previous.build.number=372
release.info.previous.build.number=382
upgrade.processes=\com.liferay.lms.upgrade.UpgradeVersion_3_8_0,\com.liferay.lms.upgrade.UpgradeVersion_3_7_0,\com.liferay.lms.upgrade.UpgradeVersion_3_6_0,\com.liferay.lms.upgrade.UpgradeVersion_3_4_0,\com.liferay.lms.upgrade.UpgradeVersion_3_3_0,\com.liferay.lms.upgrade.UpgradeVersion_3_2_0


2 changes: 1 addition & 1 deletion docroot/html/courseadmin/view.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<%
if( permissionChecker.hasPermission(themeDisplay.getScopeGroupId(), "com.liferay.lms.coursemodel",themeDisplay.getScopeGroupId(),"ADD_COURSE")){
String viewParam = "edit-course";
if(CourseTypeLocalServiceUtil.getCourseTypesCount()>0)
if(CourseTypeLocalServiceUtil.countByCompanyId(themeDisplay.getCompanyId())>0)
viewParam = "course-types";
%>

Expand Down

0 comments on commit b5d6f8c

Please sign in to comment.