hoaivan / QuizMarker

0 stars 0 forks source link

code review #3

Closed hoaivan closed 12 years ago

hoaivan commented 12 years ago
  1. Cho hàm biến javascript vào 1 namespace để tránh conflict, kiểu này: var wpCourse = {}; wpCourse.abc = 1; wpCourse.startCourse = function(){ };

=>Pending

  1. Question question = new QuestionImpl(); Không bao h dùng trực tiếp bất cứ lớp Impl nào!!!!!!!! Muốn tạo entity mới thì qua QuestionLocalServiceUtil.getQuestion(CounterLocalServiceUtil.increment(Quesion.class.getName())) =>Done
  2. Cấu trúc include các file thì có /docroot/init.jspf để khai báo 1 số biến chung, taglib, references đến class. File nào để include thì end width .jspf. File nào là view trực tiếp thì end widths jsp. =:>Done
  3. Khi thực hiện action thì check permission kiểu này: themeDisplay.getPermissionChecker().hasPermission(themeDisplay.getScopeGroupId(), WpConstants.PORTLET_NAME_STUDENT, (long)0, WpConstants.PERM_EDIT_STUDENT)) các permisson khai báo trong /src/resource-actions/default.xml

=> Code Review #6

  1. Giữa view và action ko truyền tham số kiểu này đâu: Question question = (Question)request.getAttribute("question"); có gì truyền qua renderParameter. Truyền question thì setRenderParameter cái Id rồi trong view jsp sẽ load => Pending