Skip to content

Loading…

Feature 3269 : Survey : Publication des résultats paramétrable #325

Merged
merged 8 commits into from
Showing with 275 additions and 51 deletions.
  1. +11 −5 config-core/src/main/config/dbRepository/data/mssql/questionContainer-contribution.xml
  2. +11 −5 config-core/src/main/config/dbRepository/data/oracle/questionContainer-contribution.xml
  3. +11 −5 config-core/src/main/config/dbRepository/data/postgres/questionContainer-contribution.xml
  4. +13 −0 config-core/src/main/config/dbRepository/mssql/questionContainer/004/create_constraint.sql
  5. +31 −0 config-core/src/main/config/dbRepository/mssql/questionContainer/004/create_table.sql
  6. +2 −0 config-core/src/main/config/dbRepository/mssql/questionContainer/004/drop_constraint.sql
  7. +2 −0 config-core/src/main/config/dbRepository/mssql/questionContainer/004/drop_table.sql
  8. +0 −1 config-core/src/main/config/dbRepository/mssql/questionContainer/up002/create_table.sql
  9. +7 −0 config-core/src/main/config/dbRepository/mssql/questionContainer/up003/create_table.sql
  10. +14 −0 config-core/src/main/config/dbRepository/oracle/questionContainer/004/create_constraint.sql
  11. +32 −0 config-core/src/main/config/dbRepository/oracle/questionContainer/004/create_table.sql
  12. +2 −0 config-core/src/main/config/dbRepository/oracle/questionContainer/004/drop_constraint.sql
  13. +2 −0 config-core/src/main/config/dbRepository/oracle/questionContainer/004/drop_table.sql
  14. +8 −0 config-core/src/main/config/dbRepository/oracle/questionContainer/up003/create_table.sql
  15. +14 −0 config-core/src/main/config/dbRepository/postgres/questionContainer/004/create_constraint.sql
  16. +32 −0 config-core/src/main/config/dbRepository/postgres/questionContainer/004/create_table.sql
  17. +2 −0 config-core/src/main/config/dbRepository/postgres/questionContainer/004/drop_constraint.sql
  18. +2 −0 config-core/src/main/config/dbRepository/postgres/questionContainer/004/drop_table.sql
  19. +7 −0 config-core/src/main/config/dbRepository/postgres/questionContainer/up003/create_table.sql
  20. +16 −9 ...ntainer/src/main/java/com/stratelia/webactiv/util/questionContainer/ejb/QuestionContainerDAO.java
  21. +35 −22 ...er/src/main/java/com/stratelia/webactiv/util/questionContainer/model/QuestionContainerHeader.java
  22. +2 −0 ...ner/src/test/java/com/stratelia/webactiv/util/questionContainer/ejb/QuestionContainerDAOTest.java
  23. +3 −1 ...ontainer/src/test/resources/com/stratelia/webactiv/util/questionContainer/ejb/create-database.sql
  24. +3 −3 ...rc/test/resources/com/stratelia/webactiv/util/questionContainer/ejb/questioncontainer-dataset.xml
  25. +13 −0 war-core/src/main/webapp/util/styleSheets/globalSP_SilverpeasV5.css
View
16 config-core/src/main/config/dbRepository/data/mssql/questionContainer-contribution.xml
@@ -30,20 +30,26 @@
<requirement>
</requirement>
- <current version="003">
+ <current version="004">
<create_table>
- <file name="mssql\questionContainer\003\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="mssql\questionContainer\004\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</create_table>
<create_constraint>
- <file name="mssql\questionContainer\003\create_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="mssql\questionContainer\004\create_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</create_constraint>
<drop_table>
- <file name="mssql\questionContainer\003\drop_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="mssql\questionContainer\004\drop_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</drop_table>
<drop_constraint>
- <file name="mssql\questionContainer\003\drop_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="mssql\questionContainer\004\drop_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</drop_constraint>
</current>
+
+ <upgrade version="003">
+ <create_table>
+ <file name="mssql\questionContainer\up003\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ </create_table>
+ </upgrade>
<upgrade version="002">
<create_table>
View
16 config-core/src/main/config/dbRepository/data/oracle/questionContainer-contribution.xml
@@ -30,20 +30,26 @@
<requirement>
</requirement>
- <current version="003">
+ <current version="004">
<create_table>
- <file name="oracle\questionContainer\003\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="oracle\questionContainer\004\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</create_table>
<create_constraint>
- <file name="oracle\questionContainer\003\create_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="oracle\questionContainer\004\create_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</create_constraint>
<drop_table>
- <file name="oracle\questionContainer\003\drop_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="oracle\questionContainer\004\drop_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</drop_table>
<drop_constraint>
- <file name="oracle\questionContainer\003\drop_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="oracle\questionContainer\004\drop_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</drop_constraint>
</current>
+
+ <upgrade version="003">
+ <create_table>
+ <file name="oracle\questionContainer\up003\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ </create_table>
+ </upgrade>
<upgrade version="002">
<create_table>
View
16 config-core/src/main/config/dbRepository/data/postgres/questionContainer-contribution.xml
@@ -30,20 +30,26 @@
<requirement>
</requirement>
- <current version="003">
+ <current version="004">
<create_table>
- <file name="postgres\questionContainer\003\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="postgres\questionContainer\004\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</create_table>
<create_constraint>
- <file name="postgres\questionContainer\003\create_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="postgres\questionContainer\004\create_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</create_constraint>
<drop_table>
- <file name="postgres\questionContainer\003\drop_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="postgres\questionContainer\004\drop_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</drop_table>
<drop_constraint>
- <file name="postgres\questionContainer\003\drop_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ <file name="postgres\questionContainer\004\drop_constraint.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
</drop_constraint>
</current>
+
+ <upgrade version="003">
+ <create_table>
+ <file name="postgres\questionContainer\up003\create_table.sql" type="sqlstatementlist" delimiter=";" keepdelimiter="NO"/>
+ </create_table>
+ </upgrade>
<upgrade version="002">
<create_table>
View
13 config-core/src/main/config/dbRepository/mssql/questionContainer/004/create_constraint.sql
@@ -0,0 +1,13 @@
+ALTER TABLE SB_QuestionContainer_Comment WITH NOCHECK ADD
+ CONSTRAINT PK_QuestionContainer_Comment PRIMARY KEY CLUSTERED
+ (
+ commentId
+ )
+;
+
+ALTER TABLE SB_QuestionContainer_QC WITH NOCHECK ADD
+ CONSTRAINT PK_QuestionContainer_QC PRIMARY KEY CLUSTERED
+ (
+ qcId
+ )
+;
View
31 config-core/src/main/config/dbRepository/mssql/questionContainer/004/create_table.sql
@@ -0,0 +1,31 @@
+CREATE TABLE SB_QuestionContainer_Comment
+(
+ commentId int NOT NULL ,
+ commentFatherId int NOT NULL ,
+ userId varchar (100) NOT NULL ,
+ commentComment varchar (2000) NOT NULL ,
+ commentIsAnonymous int NOT NULL ,
+ commentDate varchar (10) NOT NULL
+);
+
+CREATE TABLE SB_QuestionContainer_QC
+(
+ qcId int NOT NULL ,
+ qcTitle varchar (1000) NOT NULL ,
+ qcDescription varchar (2000) NULL ,
+ qcComment varchar (2000) NULL ,
+ qcCreatorId varchar (100) NOT NULL ,
+ qcCreationDate varchar (10) NOT NULL ,
+ qcBeginDate varchar (10) NOT NULL ,
+ qcEndDate varchar (10) NOT NULL ,
+ qcIsClosed int NOT NULL ,
+ qcNbVoters int NOT NULL ,
+ qcNbQuestionsPage int NOT NULL ,
+ qcNbMaxParticipations int NULL ,
+ qcNbTriesBeforeSolution int NULL ,
+ qcMaxTime int NULL ,
+ instanceId varchar (50) NOT NULL ,
+ anonymous int NOT NULL ,
+ resultMode int NOT NULL ,
+ resultView int NOT NULL
+);
View
2 config-core/src/main/config/dbRepository/mssql/questionContainer/004/drop_constraint.sql
@@ -0,0 +1,2 @@
+ALTER TABLE SB_QuestionContainer_Comment DROP CONSTRAINT PK_QuestionContainer_Comment;
+ALTER TABLE SB_QuestionContainer_QC DROP CONSTRAINT PK_QuestionContainer_QC;
View
2 config-core/src/main/config/dbRepository/mssql/questionContainer/004/drop_table.sql
@@ -0,0 +1,2 @@
+drop table SB_QuestionContainer_Comment;
+drop table SB_QuestionContainer_QC;
View
1 config-core/src/main/config/dbRepository/mssql/questionContainer/up002/create_table.sql
@@ -1,4 +1,3 @@
ALTER TABLE SB_QuestionContainer_QC
ADD anonymous int NOT NULL default(1)
-);
;
View
7 config-core/src/main/config/dbRepository/mssql/questionContainer/up003/create_table.sql
@@ -0,0 +1,7 @@
+ALTER TABLE SB_QuestionContainer_QC
+ADD resultMode int NOT NULL default(1)
+;
+
+ALTER TABLE SB_QuestionContainer_QC
+ADD resultView int NOT NULL default(4)
+;
View
14 config-core/src/main/config/dbRepository/oracle/questionContainer/004/create_constraint.sql
@@ -0,0 +1,14 @@
+ALTER TABLE SB_QuestionContainer_Comment ADD
+ CONSTRAINT PK_QuestionContainer_Comment PRIMARY KEY
+ (
+ commentId
+ )
+;
+
+ALTER TABLE SB_QuestionContainer_QC ADD
+ CONSTRAINT PK_QuestionContainer_QC PRIMARY KEY
+ (
+ qcId
+ )
+;
+
View
32 config-core/src/main/config/dbRepository/oracle/questionContainer/004/create_table.sql
@@ -0,0 +1,32 @@
+CREATE TABLE SB_QuestionContainer_Comment
+(
+ commentId int NOT NULL ,
+ commentFatherId int NOT NULL ,
+ userId varchar (100) NOT NULL ,
+ commentComment varchar (2000) NULL,
+ commentIsAnonymous int NOT NULL ,
+ commentDate varchar (10) NOT NULL
+);
+
+CREATE TABLE SB_QuestionContainer_QC
+(
+ qcId int NOT NULL ,
+ qcTitle varchar (1000) NOT NULL ,
+ qcDescription varchar (2000) NULL ,
+ qcComment varchar (2000) NULL ,
+ qcCreatorId varchar (100) NOT NULL ,
+ qcCreationDate varchar (10) NOT NULL ,
+ qcBeginDate varchar (10) NOT NULL ,
+ qcEndDate varchar (10) NOT NULL ,
+ qcIsClosed int NOT NULL ,
+ qcNbVoters int NOT NULL ,
+ qcNbQuestionsPage int NOT NULL ,
+ qcNbMaxParticipations int NULL ,
+ qcNbTriesBeforeSolution int NULL ,
+ qcMaxTime int NULL ,
+ instanceId varchar (50) NOT NULL ,
+ anonymous int NOT NULL ,
+ resultMode int NOT NULL ,
+ resultView int NOT NULL
+);
+
View
2 config-core/src/main/config/dbRepository/oracle/questionContainer/004/drop_constraint.sql
@@ -0,0 +1,2 @@
+ALTER TABLE SB_QuestionContainer_Comment DROP CONSTRAINT PK_QuestionContainer_Comment;
+ALTER TABLE SB_QuestionContainer_QC DROP CONSTRAINT PK_QuestionContainer_QC;
View
2 config-core/src/main/config/dbRepository/oracle/questionContainer/004/drop_table.sql
@@ -0,0 +1,2 @@
+DROP TABLE SB_QuestionContainer_Comment;
+DROP TABLE SB_QuestionContainer_QC;
View
8 config-core/src/main/config/dbRepository/oracle/questionContainer/up003/create_table.sql
@@ -0,0 +1,8 @@
+ALTER TABLE SB_QuestionContainer_QC
+ADD resultMode int default(1) NOT NULL
+;
+
+
+ALTER TABLE SB_QuestionContainer_QC
+ADD resultView int NOT NULL default(4)
+;
View
14 ...ig-core/src/main/config/dbRepository/postgres/questionContainer/004/create_constraint.sql
@@ -0,0 +1,14 @@
+ALTER TABLE SB_QuestionContainer_Comment ADD
+ CONSTRAINT PK_QuestionContainer_Comment PRIMARY KEY
+ (
+ commentId
+ )
+;
+
+ALTER TABLE SB_QuestionContainer_QC ADD
+ CONSTRAINT PK_QuestionContainer_QC PRIMARY KEY
+ (
+ qcId
+ )
+;
+
View
32 config-core/src/main/config/dbRepository/postgres/questionContainer/004/create_table.sql
@@ -0,0 +1,32 @@
+CREATE TABLE SB_QuestionContainer_Comment
+(
+ commentId int NOT NULL ,
+ commentFatherId int NOT NULL ,
+ userId varchar (100) NOT NULL ,
+ commentComment varchar (2000) NULL,
+ commentIsAnonymous int NOT NULL ,
+ commentDate varchar (10) NOT NULL
+);
+
+CREATE TABLE SB_QuestionContainer_QC
+(
+ qcId int NOT NULL ,
+ qcTitle varchar (1000) NOT NULL ,
+ qcDescription varchar (2000) NULL ,
+ qcComment varchar (2000) NULL ,
+ qcCreatorId varchar (100) NOT NULL ,
+ qcCreationDate varchar (10) NOT NULL ,
+ qcBeginDate varchar (10) NOT NULL ,
+ qcEndDate varchar (10) NOT NULL ,
+ qcIsClosed int NOT NULL ,
+ qcNbVoters int NOT NULL ,
+ qcNbQuestionsPage int NOT NULL ,
+ qcNbMaxParticipations int NULL ,
+ qcNbTriesBeforeSolution int NULL ,
+ qcMaxTime int NULL ,
+ instanceId varchar (50) NOT NULL ,
+ anonymous int NOT NULL ,
+ resultMode int NOT NULL ,
+ resultView int NOT NULL
+);
+
View
2 config-core/src/main/config/dbRepository/postgres/questionContainer/004/drop_constraint.sql
@@ -0,0 +1,2 @@
+ALTER TABLE SB_QuestionContainer_Comment DROP CONSTRAINT PK_QuestionContainer_Comment;
+ALTER TABLE SB_QuestionContainer_QC DROP CONSTRAINT PK_QuestionContainer_QC;
View
2 config-core/src/main/config/dbRepository/postgres/questionContainer/004/drop_table.sql
@@ -0,0 +1,2 @@
+DROP TABLE SB_QuestionContainer_Comment;
+DROP TABLE SB_QuestionContainer_QC;
View
7 config-core/src/main/config/dbRepository/postgres/questionContainer/up003/create_table.sql
@@ -0,0 +1,7 @@
+ALTER TABLE SB_QuestionContainer_QC
+ADD resultMode int NOT NULL default(1)
+;
+
+ALTER TABLE SB_QuestionContainer_QC
+ADD resultView int NOT NULL default(4)
+;
View
25 ...src/main/java/com/stratelia/webactiv/util/questionContainer/ejb/QuestionContainerDAO.java
@@ -45,14 +45,14 @@
import com.stratelia.webactiv.util.questionContainer.model.QuestionContainerRuntimeException;
/**
- * This class is made to access database only (table SB_QuestionContainer_QC et
+ * This class is made to access database only (table SB_QuestionContainer_QC and
* SB_QuestionContainer_Comment)
* @author neysseri
*/
public class QuestionContainerDAO {
public static final String QUESTIONCONTAINERCOLUMNNAMES =
- "qcId, qcTitle, qcDescription, qcComment, qcCreatorId, qcCreationDate, qcBeginDate, qcEndDate, qcIsClosed, qcNbVoters, qcNbQuestionsPage, qcNbMaxParticipations, qcNbTriesBeforeSolution, qcMaxTime, anonymous, instanceId";
+ "qcId, qcTitle, qcDescription, qcComment, qcCreatorId, qcCreationDate, qcBeginDate, qcEndDate, qcIsClosed, qcNbVoters, qcNbQuestionsPage, qcNbMaxParticipations, qcNbTriesBeforeSolution, qcMaxTime, instanceId, anonymous, resultMode, resultView";
public static final String COMMENTCOLUMNNAMES =
"commentId, commentFatherId, userId, commentComment, commentIsAnonymous, commentDate";
@@ -113,8 +113,10 @@ static QuestionContainerHeader getQuestionContainerHeaderFromResultSet(ResultSet
int nbMaxParticipations = rs.getInt(12);
int nbParticipationsBeforeSolution = rs.getInt(13);
int maxTime = rs.getInt(14);
- boolean anonymous = (rs.getInt(15) == 1);
- String instanceId = rs.getString(16);
+ String instanceId = rs.getString(15);
+ boolean anonymous = (rs.getInt(16) == 1);
+ int resultMode = rs.getInt(17);
+ int resultView = rs.getInt(18);
questionContainerPK.setComponentName(instanceId);
@@ -122,7 +124,7 @@ static QuestionContainerHeader getQuestionContainerHeaderFromResultSet(ResultSet
new QuestionContainerPK(id, questionContainerPK), title, description,
comment, creatorId, creationDate, beginDate, endDate, closed, nbVoters,
nbQuestionsPage, nbMaxParticipations, nbParticipationsBeforeSolution,
- maxTime, anonymous);
+ maxTime, anonymous, resultMode, resultView);
return result;
}
@@ -465,7 +467,7 @@ public static QuestionContainerPK createQuestionContainerHeader(
String insertStatement = "insert into "
+ questionContainerHeader.getPK().getTableName()
- + " values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ";
+ + " values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ";
try {
/* Retrieve next sequence identifier */
@@ -515,7 +517,9 @@ public static QuestionContainerPK createQuestionContainerHeader(
} else {
prepStmt.setInt(16, 0);
}
-
+ prepStmt.setInt(17, questionContainerHeader.getResultMode());
+ prepStmt.setInt(18, questionContainerHeader.getResultView());
+
prepStmt.executeUpdate();
} finally {
DBUtil.close(prepStmt);
@@ -542,7 +546,8 @@ public static void updateQuestionContainerHeader(Connection con,
+ " qcDescription = ?," + " qcComment = ?," + " qcBeginDate = ?,"
+ " qcEndDate = ?," + " qcNbVoters = ?," + " qcNbQuestionsPage = ?,"
+ " qcNbMaxParticipations = ?," + " qcNbTriesBeforeSolution = ?,"
- + " qcMaxTime = ?, " + " instanceId = ?, " + " anonymous = ?"
+ + " qcMaxTime = ?, " + " instanceId = ?, " + " anonymous = ?, "
+ + " resultMode = ?, " + " resultView = ?"
+ " where qcId = ?";
PreparedStatement prepStmt = null;
@@ -575,7 +580,9 @@ public static void updateQuestionContainerHeader(Connection con,
} else {
prepStmt.setInt(12, 0);
}
- prepStmt.setInt(13, Integer.parseInt(questionContainerHeader.getPK().getId()));
+ prepStmt.setInt(13, questionContainerHeader.getResultMode());
+ prepStmt.setInt(14, questionContainerHeader.getResultView());
+ prepStmt.setInt(15, Integer.parseInt(questionContainerHeader.getPK().getId()));
prepStmt.executeUpdate();
} finally {
DBUtil.close(prepStmt);
View
57 ...ain/java/com/stratelia/webactiv/util/questionContainer/model/QuestionContainerHeader.java
@@ -54,14 +54,21 @@
private int nbMaxPoints = 0;
private Collection<ScoreDetail> scores = null;
private boolean anonymous;
-
private String iconUrl;
+ private int resultMode; //1 : résultats immédiat | 2 : résultats différés après validation initiateur
+ public static final int IMMEDIATE_RESULTS = 1;
+ public static final int DELAYED_RESULTS = 2;
+ private int resultView; //1 : n'affiche rien | 2 : vue classique | 3 : vue détaillée | 4 : vue classique et vue détaillée
+ public static final int NOTHING_DISPLAY_RESULTS = 1;
+ public static final int CLASSIC_DISPLAY_RESULTS = 2;
+ public static final int DETAILED_DISPLAY_RESULTS = 3;
+ public static final int TWICE_DISPLAY_RESULTS = 4;
public QuestionContainerHeader(QuestionContainerPK questionContainerPK,
String title, String description, String comment, String creatorId,
String creationDate, String beginDate, String endDate, boolean isClosed,
int nbVoters, int nbQuestionsPerPage, int nbMaxParticipations,
- int nbParticipationsBeforeSolution, int maxTime) {
+ int nbParticipationsBeforeSolution, int maxTime, int resultMode, int resultView) {
setPK(questionContainerPK);
setTitle(title);
setDescription(description);
@@ -76,13 +83,16 @@ public QuestionContainerHeader(QuestionContainerPK questionContainerPK,
setNbMaxParticipations(nbMaxParticipations);
setNbParticipationsBeforeSolution(nbParticipationsBeforeSolution);
setMaxTime(maxTime);
+ setResultMode(resultMode);
+ setResultView(resultView);
}
public QuestionContainerHeader(QuestionContainerPK questionContainerPK,
String title, String description, String comment, String creatorId,
String creationDate, String beginDate, String endDate, boolean isClosed,
int nbVoters, int nbQuestionsPerPage, int nbMaxParticipations,
- int nbParticipationsBeforeSolution, int maxTime, boolean anonymous) {
+ int nbParticipationsBeforeSolution, int maxTime, boolean anonymous,
+ int resultMode, int resultView) {
setPK(questionContainerPK);
setTitle(title);
setDescription(description);
@@ -98,30 +108,14 @@ public QuestionContainerHeader(QuestionContainerPK questionContainerPK,
setNbParticipationsBeforeSolution(nbParticipationsBeforeSolution);
setMaxTime(maxTime);
setAnonymous(anonymous);
+ setResultMode(resultMode);
+ setResultView(resultView);
}
- // @deprecated
public QuestionContainerHeader(QuestionContainerPK questionContainerPK,
String title, String description, String creatorId, String creationDate,
String beginDate, String endDate, boolean isClosed, int nbVoters,
- int nbQuestionsPerPage) {
- setPK(questionContainerPK);
- setTitle(title);
- setDescription(description);
- setComment(comment);
- setCreatorId(creatorId);
- setCreationDate(creationDate);
- setBeginDate(beginDate);
- setEndDate(endDate);
- close(isClosed);
- setNbVoters(nbVoters);
- setNbQuestionsPerPage(nbQuestionsPerPage);
- }
-
- public QuestionContainerHeader(QuestionContainerPK questionContainerPK,
- String title, String description, String creatorId, String creationDate,
- String beginDate, String endDate, boolean isClosed, int nbVoters,
- int nbQuestionsPerPage, boolean anonymous) {
+ int nbQuestionsPerPage, boolean anonymous, int resultMode, int resultView) {
setPK(questionContainerPK);
setTitle(title);
setDescription(description);
@@ -134,6 +128,8 @@ public QuestionContainerHeader(QuestionContainerPK questionContainerPK,
setNbVoters(nbVoters);
setNbQuestionsPerPage(nbQuestionsPerPage);
setAnonymous(anonymous);
+ setResultMode(resultMode);
+ setResultView(resultView);
}
public QuestionContainerPK getPK() {
@@ -332,5 +328,22 @@ public boolean isAnonymous() {
public void setAnonymous(boolean anonymous) {
this.anonymous = anonymous;
}
+
+ public int getResultMode() {
+ return this.resultMode;
+ }
+ public void setResultMode(int resultMode) {
+ this.resultMode = resultMode;
+ }
+
+ public int getResultView() {
+ return this.resultView;
+ }
+
+ public void setResultView(int resultView) {
+ this.resultView = resultView;
+ }
+
+
}
View
2 ...test/java/com/stratelia/webactiv/util/questionContainer/ejb/QuestionContainerDAOTest.java
@@ -230,6 +230,8 @@ public void testGetQuestionContainerHeader() throws Exception {
assertEquals(1, result.getNbQuestionsPerPage());
assertEquals(2, result.getNbVoters());
assertEquals("Quiz expression sur les légumes", result.getTitle());
+ assertEquals(1, result.getResultMode());
+ assertEquals(4, result.getResultView());
}
/**
View
4 .../src/test/resources/com/stratelia/webactiv/util/questionContainer/ejb/create-database.sql
@@ -25,7 +25,9 @@ CREATE TABLE SB_QuestionContainer_QC
qcNbTriesBeforeSolution int NULL ,
qcMaxTime int NULL ,
instanceId varchar (50) NOT NULL ,
- anonymous int NOT NULL
+ anonymous int NOT NULL ,
+ resultMode int NOT NULL ,
+ resultView int NOT NULL
);
ALTER TABLE SB_QuestionContainer_Comment ADD
View
6 ...resources/com/stratelia/webactiv/util/questionContainer/ejb/questioncontainer-dataset.xml
@@ -29,13 +29,13 @@
<sb_questioncontainer_qc qcid="1" qctitle="Quiz express" qcdescription="Description express du quiz"
qccomment="Remarque express" qccreatorid="0" qccreationdate="2012-01-13" qcbegindate="2012-01-13"
qcenddate="9999-99-99" qcisclosed="0" qcnbvoters="1" qcnbquestionspage="1" qcnbmaxparticipations="10"
-qcnbtriesbeforesolution="2" qcmaxtime="0" instanceid="quizz83" anonymous="0" />
+qcnbtriesbeforesolution="2" qcmaxtime="0" instanceid="quizz83" anonymous="0" resultMode="1" resultView="4" />
<sb_questioncontainer_qc qcid="2" qctitle="Quiz expression sur les légumes" qcdescription="Expression française sur les fruits et légumes"
qccomment="RAS" qccreatorid="0" qccreationdate="2012-01-12" qcbegindate="2012-01-12"
qcenddate="9999-99-99" qcisclosed="0" qcnbvoters="2" qcnbquestionspage="1" qcnbmaxparticipations="1"
-qcnbtriesbeforesolution="1" qcmaxtime="0" instanceid="quizz83" anonymous="0" />
+qcnbtriesbeforesolution="1" qcmaxtime="0" instanceid="quizz83" anonymous="0" resultMode="1" resultView="4" />
<sb_questioncontainer_qc qcid="3" qctitle="Quiz clos" qcdescription="Description d'un quizz à ouvrir"
qccomment="RAS" qccreatorid="0" qccreationdate="2012-01-12" qcbegindate="2012-01-12"
qcenddate="9999-99-99" qcisclosed="1" qcnbvoters="2" qcnbquestionspage="1" qcnbmaxparticipations="1"
-qcnbtriesbeforesolution="1" qcmaxtime="0" instanceid="quizz83" anonymous="0" />
+qcnbtriesbeforesolution="1" qcmaxtime="0" instanceid="quizz83" anonymous="0" resultMode="1" resultView="4" />
</dataset>
View
13 war-core/src/main/webapp/util/styleSheets/globalSP_SilverpeasV5.css
@@ -5370,6 +5370,19 @@ input.search:focus {
height: 13px;
}
+.ui-dialog .label-ui-dialog {
+ float:left;
+ clear:both;
+ width:30%;
+ margin-bottom:14px;
+}
+
+.ui-dialog .champs-ui-dialog {
+ float:right;
+ width:65%;
+ margin-bottom:14px;
+}
+
/********************************/
/** created action bar **/
/*******************************/
Something went wrong with that request. Please try again.