Check out the LimeSurvey source code on GitHub!

improve the way tokens are displayed

More
5 years 7 months ago - 5 years 7 months ago #63451 by simon_d
Hello there,

I haven't submitted a feature request yet
and I hope I am not doing it wrong (forgive me if I do).

When the Tokens for a survey are displayed, the number of them is limited to 50 per page by default, I havent found a way to change this.

So, if you edit a token to change an attribute value afterwards, you always have to scroll down, or, even "worse" ... klick to the next page (and then scroll down) every time a token with a number (!= id) larger than 50 was edited.

Right now I have about 30 more to edit :-(


It would be very cool if there was a Button on each side of the screen, when editing, to edit the previous or the next (if != NULL) ...


I would really like to contribute, since my boss is using your Software,
but, even if I could (I am not so sure about that) ... my time is limited to 24h a day, and I have lots of work to do for my university.

hmm?
replies?
comments?

thank you for reading

simon


EDIT:
well... I just found out that I can sort the ID ... that will work for me (at first) since I don't have "that" much tokens in it. But anyway - that "feature" would be nice ;)

EDIT #2: Wow. the IDs are re-sorted every time the page reloads because of saving a token. so, I have to click "a million times" again. :-/
Last Edit: 5 years 7 months ago by simon_d.

Please Log in to join the conversation.

More
5 years 7 months ago - 5 years 7 months ago #63462 by greg_d
Hi Simon,

If you can change the source code you can try this (treat it as workaround, it is not tested):

For version 1.91+ build 19267

add the following code in file admin/tokens at line 906:
if (isset($_SESSION["BrowseTokenSurveyID"]) && $_SESSION["BrowseTokenSurveyID"] == $surveyid && returnglobal("limit")  && returnglobal("start") )
$_SESSION["BrowseTokenLimit"] = $limit;
$_SESSION["BrowseTokenStart"] = $start;

and the following code at line 2241:
$_SESSION["BrowseTokenSurveyID"] = $surveyid;
$_SESSION["BrowseTokenLimit"] = $limit;
$_SESSION["BrowseTokenStart"] = $start;
Last Edit: 5 years 7 months ago by greg_d.

Please Log in to join the conversation.

More
5 years 7 months ago - 5 years 7 months ago #63529 by simon_d
Hello,
thank you for the reply!

.. I really would like to test that, but... can I break something with this? so that the running surveys "might" have problems?

Simon

EDIT: I just saw that my limesurvey version is lower the one, mentioned by you.
mine is Version 1.91+ Build 10486 .. there are no updates available... how can I update to version 1.91+ build 19267 (mentioned by you)?
Last Edit: 5 years 7 months ago by simon_d. Reason: addon to question

Please Log in to join the conversation.

More
5 years 7 months ago #63553 by greg_d
Oh, I meant version 1.91+ build 10267 not 19267 (it was a typo). Your version (10486) has (almost) the same tokens.php file as 10276, so you can apply this changes.

You can't break running surveys with this changes - they are in places where browsing and editing tokens are done (what is available only for admin). Possible scenario where any bug may occur must involve switching between different token management functionalities and may result only in incorrect display of tokens list. Just back up your original file to be able to restore it if something go wrong (but I don't think it will be necessary).

Greg

Please Log in to join the conversation.

More
5 years 7 months ago #63559 by simon_d
Hej thanks for the reply, I will give it a try...

(good that you mentioned to backup the files. I should have known this but I forgot about that)


simon

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form