From 71e7db62c672f1876782853642cb5714687bcc39 Mon Sep 17 00:00:00 2001 From: Yung Han Khoe Date: Thu, 5 Feb 2009 22:29:36 +0000 Subject: [PATCH] Adding/fixing Survey i18n and Help --- docs/changelog/7.x.x.txt | 1 + ...ot_import_survey_default-answer-edit.wgpkg | Bin 0 -> 1586 bytes ..._import_survey_default-question-edit.wgpkg | Bin 0 -> 1721 bytes lib/WebGUI/Help/Asset_Survey.pm | 154 +++++++++++ lib/WebGUI/i18n/English/Asset_Survey.pm | 243 ++++++++++++++++-- 5 files changed, 379 insertions(+), 19 deletions(-) create mode 100644 docs/upgrades/packages-7.6.11/root_import_survey_default-answer-edit.wgpkg create mode 100644 docs/upgrades/packages-7.6.11/root_import_survey_default-question-edit.wgpkg diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 0fd591e0b..0802eefa8 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,7 @@ - fixed #9603: moving wiki page - fixed #9302: Spectre Problem... - fixed #9635: Matrix - Add attributes not working + - fixed #9597: Survey 2.0 Help not complete - fixed: Many child assets, including WikiPage, Post and Event, will no longer let you add or paste them in places where they do not belong. - fixed: Hardcoded extras url in templates and in extra head tags in assets were replaced with the Extras macro. - fixed: Fixed bad gateway macros in the Matrix templates. diff --git a/docs/upgrades/packages-7.6.11/root_import_survey_default-answer-edit.wgpkg b/docs/upgrades/packages-7.6.11/root_import_survey_default-answer-edit.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..7606690f121d6ea96e27f31d8ba3fae45ad33f4b GIT binary patch literal 1586 zcmV-22F>{&iwFP!000001MOICZ`(Ey_UHZzLBOC5Xlu!@wQGCG(zjr(8#L)MblwVD zVk{;SrID0hI`qHqNJ^G$$(@}#`xJdhWK#F=?ztm*cTa2g|Jb(OZMSPR+jhEbr&eor z^<%6byXH7f%jq`SPNz{b9NTGiYX*qi|C4Zm7^t?u(^*39z8)9}k2F&MzdO?ZDyg(}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ZXx^}xwl#16#T{gXmLhgL2zm|3RAM%05_GZ zY0%Az`lcH(b=fM0R7E$l%z|11&CX27yt(T1%8asg8&==04iq|%m4rY literal 0 HcmV?d00001 diff --git a/docs/upgrades/packages-7.6.11/root_import_survey_default-question-edit.wgpkg b/docs/upgrades/packages-7.6.11/root_import_survey_default-question-edit.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..3900118e2f5bc73785c301f41e90937d8c308650 GIT binary patch literal 1721 zcmV;q21fZGiwFP!000001MOK|SKBri&UJr}wgk}Jtc)1ChJ>BEYZI5Y`_Uf~Ncmh^r-@B2!6cv89l$M^kqt5vD^e$Z|Ol}e*+ z9x!|SN)QCi`tEMC5wt5H@Pk&f0_2kWe=;s0lcr73V3^_C>yu8(M>%PJ-(J#pU8$`N zil2>+e(yZ_$SK*9B~s#Uvw0K#K{N2{3-~vhtwsgNXx{&GU-&<{f77?2;lD?+2&-IB z28XB$_QBu(Jl3C5MpMKDMqGW>)6~q6At+Gv%T#@>HmZ8E8i*kmN1s#59q1 z%L^grNaTwqhhY z^C?4IU`lpSghjCu^J5%Ei0I{k`~8ejLB%vRv2a`+GMc3)(UFp)LL1bJWdbE>Y~$CB z@EG9ez_Yr&-X*&v`g15z;0N9)@_PTC5P=wh$~qYT=%q1&908=h0=pDoaz$C9CwY&( zLlvA4=h{W@r>EVTR8h=2*pSsPv?PsH^TgNbcZyZn#Ja=v~*SAg{-nA(Ya07 zm8kWDKFd6{49aGdM^hUllgA>W{+39nUx#wmJSeNYlaOMSlv?(d+?b zBQg}DgGLK*`~@8ZzR4=(VL6YiwqBlX_HVPczE(IGlr1@tx&S16f*8MBBue7e4}t|< zw;Z=97>qEr1vOJ}n46o2CCCdEUxCFbJrIsic#R?;Q$?i?zUq}4#1t*@{B9=sxk(v` z5$CJTGV{u&5xN8uxBaZjbk&%ah`3c9OHrFc+U2s7g(9zF+t~ZctfG-=Xktp!*~XRiq0WigHjG;Mv)s%wjP7tLZd=|5U0pZ8=uRn_vk8nd_;?D5J|O2%ok0c@?)82k z1D-xLKf%)bMM&c%TfTF{T6w8Z64u8vKji6Kf=cK7lvdu%a!;N~>Govjegew(OR>}^ zMkjalNl94WCkunxNz}8ckAFyQ3qI;k@}#DK)%&k>b&bQ0JUinglh;&zSp@WIJLlOO z#jYQtQcOzsL8&A^&DvNLUp6|+qfZ%T@|+vP0gCU|w3wB(_D$K%1=nY9{`{WHwGF~K zPFR(t#<1l+W%XDS7PcBYTry*m{uJWtKxeQJt4(k1P1PMT^dNH9!Bh+*-T#V;65WHXn$uV%^|5-r9A z)Vt4eNBSx@Aoa|Hcw$b8$mL>iT`{>BYcG= zvuOytMq{sCZ|!vojRK3HCX1a1V@Et~m6KxkVFjrF*Jz>-oBm5et zr&LH2Le1zcMn|4kvi`ajD8e?={Am@Yk_;ZZgso;#&m}dWRkZx3Lj8JDpa$?qmf+W6UL;_uNvbK|P0N zuLvIIXE40B$>VUg>cD+MUdRMB(Qt+o@hLZ>(1gM8rnPw>5eeBe6=znkW0ru!oQVGT z=6HI1#P$Zw{`K^)Xv~jZUA&pNww+J8B!L&5*N)kExn#V|5lzJ}%M#7t&qt%a>-(ME zmSdX)QI=P3UTZ*3zX){No-|I$@15jD^F4kxtg3$#e0}tF8~=rPkns?KhX_1G;2{Fv PI|Ba$XGd7S03rYY_!d)> literal 0 HcmV?d00001 diff --git a/lib/WebGUI/Help/Asset_Survey.pm b/lib/WebGUI/Help/Asset_Survey.pm index 2da12e5b5..3aa6e4543 100644 --- a/lib/WebGUI/Help/Asset_Survey.pm +++ b/lib/WebGUI/Help/Asset_Survey.pm @@ -26,6 +26,15 @@ our $HELP = { { tag => 'statistical overview report template', namespace => 'Asset_Survey' }, + { tag => 'survey section edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey question edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey answer edit template', + namespace => 'Asset_Survey' + }, ] }, @@ -80,6 +89,15 @@ our $HELP = { { tag => 'statistical overview report template', namespace => 'Asset_Survey' }, + { tag => 'survey section edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey question edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey answer edit template', + namespace => 'Asset_Survey' + }, ] }, @@ -138,6 +156,142 @@ our $HELP = { { tag => 'gradebook report template', namespace => 'Asset_Survey' }, + { tag => 'survey section edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey question edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey answer edit template', + namespace => 'Asset_Survey' + }, + ] + }, + + 'survey section edit template' => { + title => 'survey section edit template title', + body => '', + fields => [], + isa => [], + variables => [ + { 'name' => 'id' }, + { 'name' => 'displayed_id' }, + { 'name' => 'text' }, + { 'name' => 'everyPageText' }, + { 'name' => 'title' }, + { 'name' => 'everyPageTitle' }, + { 'name' => 'variable' }, + { 'name' => 'goto' }, + { 'name' => 'randomizeQuestions' }, + { 'name' => 'terminal' }, + { 'name' => 'terminalUrl' }, + { 'name' => 'questionsOnSectionPage' }, + { 'name' => 'questionsPerPage', + 'variables' => [ + { 'name' => 'index' }, + { 'name' => 'selected' }, + ] + } + ], + related => [ + { tag => 'survey template', + namespace => 'Asset_Survey' + }, + { tag => 'survey question edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey answer edit template', + namespace => 'Asset_Survey' + }, + { tag => 'gradebook report template', + namespace => 'Asset_Survey' + }, + { tag => 'statistical overview report template', + namespace => 'Asset_Survey' + }, + ] + }, + + 'survey question edit template' => { + title => 'survey question edit template title', + body => '', + fields => [], + isa => [], + variables => [ + { 'name' => 'id' }, + { 'name' => 'displayed_id' }, + { 'name' => 'text' }, + { 'name' => 'variable' }, + { 'name' => 'randomizeAnswers' }, + { 'name' => 'questionType' , + 'variables' => [ + { 'name' => 'selected' }, + ] + }, + { 'name' => 'textInButton' }, + { 'name' => 'required' }, + { 'name' => 'allowComment' }, + { 'name' => 'verticalDisplay' }, + { 'name' => 'commentCols' }, + { 'name' => 'commentRows' }, + { 'name' => 'maxAnswers' }, + { 'name' => 'value' }, + ], + related => [ + { tag => 'survey template', + namespace => 'Asset_Survey' + }, + { tag => 'survey section edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey answer edit template', + namespace => 'Asset_Survey' + }, + { tag => 'gradebook report template', + namespace => 'Asset_Survey' + }, + { tag => 'statistical overview report template', + namespace => 'Asset_Survey' + }, + ] + }, + + 'survey answer edit template' => { + title => 'survey answer edit template title', + body => '', + fields => [], + isa => [], + variables => [ + { 'name' => 'id' }, + { 'name' => 'displayed_id' }, + { 'name' => 'text' }, + { 'name' => 'goto' }, + { 'name' => 'value' }, + { 'name' => 'isCorrect' }, + { 'name' => 'textCols' }, + { 'name' => 'textRows' }, + { 'name' => 'min' }, + { 'name' => 'max' }, + { 'name' => 'step' }, + { 'name' => 'verbatim' }, + { 'name' => 'recordedAnswer' }, + ], + related => [ + { tag => 'survey template', + namespace => 'Asset_Survey' + }, + { tag => 'survey section edit template', + namespace => 'Asset_Survey' + }, + { tag => 'survey question edit template', + namespace => 'Asset_Survey' + }, + { tag => 'gradebook report template', + namespace => 'Asset_Survey' + }, + { tag => 'statistical overview report template', + namespace => 'Asset_Survey' + }, ] }, diff --git a/lib/WebGUI/i18n/English/Asset_Survey.pm b/lib/WebGUI/i18n/English/Asset_Survey.pm index 337048dd2..007dd0529 100644 --- a/lib/WebGUI/i18n/English/Asset_Survey.pm +++ b/lib/WebGUI/i18n/English/Asset_Survey.pm @@ -227,19 +227,12 @@ our $I18N = { context => q|Description of the 'question type' field, used as hoverhelp in the edit question dialog.|, lastUpdated => 0 }, - 'randomized words' => { - message => q|Randomized words:|, - lastUpdated => 1224686319 - }, - 'randomized words description' => { - message => q||, - context => q|Description of the 'randomized words' field, used as hoverhelp in the edit question dialog.|, - lastUpdated => 0 - }, + 'vertical display' => { message => q|Vertical display:|, lastUpdated => 1224686319 }, + 'vertical display description' => { message => q|This property controls whether buttons of a multiple choice question are laid out horizontally or vertically.|, context => q|Description of the 'vertical display' field, used as hoverhelp in the edit question dialog.|, @@ -290,7 +283,7 @@ our $I18N = { context => q|Description of the 'maximum number of answers' field, used as hoverhelp in the edit question dialog.|, lastUpdated => 0 }, - 'required' => { + 'required label' => { message => q|Required|, lastUpdated => 1224686319 }, @@ -327,7 +320,7 @@ our $I18N = { lastUpdated => 1224686319 }, 'answer text description' => { - message => q|Enter a text for this answer.|, + message => q|Enter a text for this answer. For multiple choice questions this answer will be displayed above the buttons.|, context => q|Description of the 'answer text' field, used as hoverhelp in the edit answer dialog.|, lastUpdated => 0 }, @@ -336,7 +329,7 @@ our $I18N = { lastUpdated => 1224686319 }, 'recorded answer description' => { - message => q|The answer that will be recorded in the database.|, + message => q|The answer that will be recorded in the database. The recorded answer will be displayed in a multiple choice question's buttons, only if the question's 'Show text in button' property is set to yes. Otherwise the multiple choice buttons will be empty. |, context => q|Description of the 'recorded answer' field, used as hoverhelp in the edit answer dialog.|, lastUpdated => 0 }, @@ -379,7 +372,7 @@ our $I18N = { context => q|Description of the 'min' field, used as hoverhelp in the edit answer dialog.|, lastUpdated => 0 }, - 'max' => { + 'max label' => { message => q|Max|, lastUpdated => 1224686319 }, @@ -388,7 +381,7 @@ our $I18N = { context => q|Description of the 'max' field, used as hoverhelp in the edit answer dialog.|, lastUpdated => 0 }, - 'step' => { + 'step label' => { message => q|Step|, lastUpdated => 1224686319 }, @@ -397,7 +390,7 @@ our $I18N = { context => q|Description of the 'step' field, used as hoverhelp in the edit answer dialog.|, lastUpdated => 0 }, - 'verbatim' => { + 'verbatim label' => { message => q|Verbatim|, lastUpdated => 1224686319 }, @@ -841,13 +834,19 @@ directly inside the answer_loop for other types of questions.|, }, 'id' => { - message => q|The ID of this question/answer.|, + message => q|The ID of this section/question/answer.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'displayed_id' => { + message => q|The displayed ID of this section/question/answer.|, context => q|Description of a template variable for a template Help page.|, lastUpdated => 0, }, 'text' => { - message => q|The text of this question/answer.|, + message => q|The text of this section/question/answer.|, context => q|Description of a template variable for a template Help page.|, lastUpdated => 0, }, @@ -942,12 +941,218 @@ directly inside the answer_loop for other types of questions.|, lastUpdated => 0, }, - 'answers' => { - message => q|A loop containing the answers to this question.|, + 'survey section edit template title' => { + message => q|Survey Section Edit Template|, + context => q|The title of a template Help page.|, + lastUpdated => 0, + }, + + 'survey question edit template title' => { + message => q|Survey Question Edit Template|, + context => q|The title of a template Help page.|, + lastUpdated => 0, + }, + + 'survey answer edit template title' => { + message => q|Survey Answer Edit Template|, + context => q|The title of a template Help page.|, + lastUpdated => 0, + }, + + 'title' => { + message => q|The section's title.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'text' => { + message => q|The text of this section/question/answer.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'variable' => { + message => q|A variable name to identify a section/question, so that it can be entered as a goto variable name +in another section.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'goto' => { + message => q|The section or question with this variable name will be the next to be displayed after this +section/answer.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'questionsPerPage' => { + message => q|The number loop containing a number/index for each question in this section.|, context => q|Description of a template loop for a template Help page.|, lastUpdated => 0, }, + 'index' => { + message => q|The index/number of a question in this section.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'selected' => { + message => q|A boolean indicating whether this is the selected number of questions per page.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'questionsOnSectionPage' => { + message => q|A boolean indicating whether question are displayed on the initial page of this section or on the next page.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'randomizeQuestions' => { + message => q|A boolean indicating whether the order of the questions in this section should be randomized.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'everyPageTitle' => { + message => q|A boolean indicating whether the title should be displayed on every page of this section.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'everyPageText' => { + message => q|A boolean indicating whether the text should be displayed on every page of this section.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'terminal' => { + message => q|A boolean indicating whether this is a terminal section.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'terminalUrl' => { + message => q|The url to which the Survey should redirect if this is a terminal section.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'randomizeAnswers' => { + message => q|A boolean indicating wether this question's answers should be randomized.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'questionType' => { + message => q|A loop containing the possible question types.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'selected' => { + message => q|A boolean indicating whether this is the selected question type.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'value' => { + message => q|The value of this question/answer.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'maxAnswers' => { + message => q|The maximum number of answers that can be given to this question.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'commentRows' => { + message => q|The number of rows for the comment textarea.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'commentCols' => { + message => q|The number of columns for the comment textarea.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'verticalDisplay' => { + message => q|A boolean indicating whether the answers to this question should be displayed vertically.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'textInButton' => { + message => q|A boolean indicating whether the buttons for answers to multiple choice questions should display the answer's text.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'allowComment' => { + message => q|A boolean indicating whether adding a comment about this question is allowed.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'required' => { + message => q|A boolean indicating whether this question is required.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'isCorrect' => { + message => q|A boolean indicating whether this answer is correct.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'verbatim' => { + message => q|A boolean indicating whether this answer shows an extra text input, where the user can enter a single line of text.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'min' => { + message => q|The min value of this answer for slider type questions.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'max' => { + message => q|The max value of this answer for slider type questions..|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'step' => { + message => q|The step value of this answer for slider type questions..|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'recordedAnswer' => { + message => q|The value that gets recorded for this answer in the database.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'textCols' => { + message => q|The number of columns for textarea answers.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + + 'textRows' => { + message => q|The number of rows for textarea answers.|, + context => q|Description of a template variable for a template Help page.|, + lastUpdated => 0, + }, + 'answers' => { message => q|A loop containing the answers to this question.|, context => q|Description of a template loop for a template Help page.|,