Bugzilla – Attachment 41213 Details for
Bug 14608
HEA : add possibility of sharing usage statistics in Administration page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14608 : Add Hea activation in Koha Web Installer
Bug-14608--Add-Hea-activation-in-Koha-Web-Installe.patch (text/plain), 5.30 KB, created by
Julian FIOL
on 2015-07-28 12:31:23 UTC
(
hide
)
Description:
Bug 14608 : Add Hea activation in Koha Web Installer
Filename:
MIME Type:
Creator:
Julian FIOL
Created:
2015-07-28 12:31:23 UTC
Size:
5.30 KB
patch
obsolete
>From 3e5ecc3885592816296ede64687497bb72e65061 Mon Sep 17 00:00:00 2001 >From: Julian FIOL <julian.fiol@biblibre.com> >Date: Tue, 28 Jul 2015 11:18:40 +0200 >Subject: [PATCH] Bug 14608 : Add Hea activation in Koha Web Installer > >This patch add the possibility to share your usage >statistics to hea.koha-community.org in the web installer. > >If you click on : > >'Yes' : It set the 'UsageStats' syspref to 1 (activate sharing) >and the 'UsageStatsLastDisplay' syspref to 0. > >'Later' : It set the 'UsageStats' syspref to 0 >and the 'UsageStatsLastDisplay' syspref to the today's date. >A message on the Administration page will offer you again >the possibility of sharing your stats in 7 days. > >'No' : It set the 'UsageStats' syspref to 0 >and the 'UsageStatsLastDisplay' syspref to 0. >--- > installer/data/mysql/sysprefs.sql | 2 +- > installer/install.pl | 16 ++++++++++ > .../prog/en/modules/installer/step3.tt | 34 +++++++++++++++++----- > 3 files changed, 43 insertions(+), 9 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index c2b7e46..6dc4c45 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -458,7 +458,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('UsageStatsLibraryName', '', NULL, 'The library name to be shown on Hea Koha community website', 'Free'), > ('UsageStatsLibraryType', 'public', 'public|school|academic|research|private|societyAssociation|corporate|government|religiousOrg|subscription', 'The library type to be shown on the Hea Koha community website', 'Choice'), > ('UsageStatsLibraryUrl', '', NULL, 'The library URL to be shown on Hea Koha community website', 'Free'), >-('UsageStatsLastDisplay', '', NULL, 'The last time we propose you to share your statistics', 'Free'), >+('UsageStatsLastDisplay', '', NULL, 'The last time we offered you to share your statistics', 'Free'), > ('UseAuthoritiesForTracings','1','0','Use authority record numbers for subject tracings instead of heading strings.','YesNo'), > ('UseBranchTransferLimits','0','','If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.','YesNo'), > ('UseControlNumber','0','','If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','YesNo'), >diff --git a/installer/install.pl b/installer/install.pl >index cc67557..ef57b53 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -193,6 +193,22 @@ elsif ( $step && $step == 3 ) { > elsif ( $op && $op eq 'finish' ) { > $installer->set_version_syspref(); > >+ # >+ # Share usage stats with Hea >+ # >+ if($query->param('hea') eq "1"){ >+ C4::Context->set_preference('UsageStats', 1); >+ C4::Context->set_preference('UsageStatsLastDisplay', 0); >+ } >+ elsif($query->param('hea') eq "-1"){ >+ C4::Context->set_preference('UsageStats', 0); >+ C4::Context->set_preference('UsageStatsLastDisplay', ((DateTime->now->epoch) * 1000)); >+ } >+ elsif($query->param('hea') eq "0"){ >+ C4::Context->set_preference('UsageStats', 0); >+ C4::Context->set_preference('UsageStatsLastDisplay', 0); >+ } >+ > # Installation is finished. > # We just deny anybody access to install > # And we redirect people to mainpage. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >index 3ae276f..23d8ac1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -171,15 +171,33 @@ > [% END %] > </ul> > [% END %] >- <h3>All done!</h3> >- <p>Installation complete.<br /> >- <p>Click on 'Finish' to complete and load the Koha Staff Interface. >- <form name="finish"> >- <input type="hidden" name="step" value="3" /> >- <input type="hidden" name="op" value="finish" /> >- <input type="submit" value="Finish" /></form> >+ >+ <form name="finish"> >+ >+ <div id="activate_UsageStats" class="dialog message"> >+ <h3>Activate Hea ?</h3> >+ <p>Please help us improve your user experience by sharing your statistics with community. >+ <br>We share sharing data anonymously, please see which data are sent <a href=http://wiki.koha-community.org/wiki/KohaUsageStat_RFC>here</a>. >+ </p> >+ <input type="radio" name="hea" value="1" checked /> Yes, I want to share my statistics <br/> >+ <input type="radio" name="hea" value="-1" /> Later <br/> >+ <input type="radio" name="hea" value="0" /> No, I don't want to share my statistics <br/> >+ >+ <p>If you want to see the statistics generated, go to <a href=http://hea.koha-community.org/>hea.koha-community.org</a></p> >+ </div> >+ >+ <h3>All done!</h3> >+ <p>Installation complete.<br /> >+ <p>Click on 'Finish' to complete and load the Koha Staff Interface. >+ >+ <input type="hidden" name="step" value="3" /> >+ <input type="hidden" name="op" value="finish" /> >+ <input type="submit" value="Finish" /> >+ </p> > </p> >- </p> >+ </form> >+ >+ > [% END %] > > >-- >2.4.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14608
:
41212
|
41213
|
41712
|
41713
|
55773
|
58340
|
58341
|
58342
|
58968
|
58969
|
58970
|
58971
|
59949
|
59950
|
59951
|
59952
|
61031
|
61201
|
61202
|
61203
|
61204
|
61205