Moodle

yes/no dialogs should have the action in the buttons

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Portfolio API
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

"You already have an active portfolio export in this session. Before continuing, you must either complete this export, or cancel it. Would you like to continue it? (No will cancel it)

YES NO"

Should be:

"You already have an active portfolio export in this session. Before continuing, you must either complete this export, or cancel it."

COMPLETE CANCEL

I'm pretty sure one of the yesno functions allows custom button names

Cheers!

Activity

Hide
Penny Leach added a comment -

Actually it doesn't;

function notice_yesno ($message, $linkyes, $linkno, $optionsyes=NULL, $optionsno=NULL, $methodyes='post', $methodno='post') {

print_single_button($linkyes, $optionsyes, get_string('yes'), $methodyes, $CFG->framename);
print_single_button($linkno, $optionsno, get_string('no'), $methodno, $CFG->framename);

Show
Penny Leach added a comment - Actually it doesn't; function notice_yesno ($message, $linkyes, $linkno, $optionsyes=NULL, $optionsno=NULL, $methodyes='post', $methodno='post') { print_single_button($linkyes, $optionsyes, get_string('yes'), $methodyes, $CFG->framename); print_single_button($linkno, $optionsno, get_string('no'), $methodno, $CFG->framename);
Hide
Martin Dougiamas added a comment -

After seeing this I hit "yes" and got:

Failed to package up your data for export: original error was Can not create file "1/portfolio_exporter/5///post.html"

I went back and tried to export something else (another post text from the same discussion, different post) but got:

A required parameter (callbackfile) was missing

...

Reloading the discussion fixed those "Add to Portfolio " links. I'm think the URLs for these should not change for the version of the link , and the checking for them should take place at the destination script (not just in the code to generate the link).

Show
Martin Dougiamas added a comment - After seeing this I hit "yes" and got: Failed to package up your data for export: original error was Can not create file "1/portfolio_exporter/5///post.html" I went back and tried to export something else (another post text from the same discussion, different post) but got: A required parameter (callbackfile) was missing ... Reloading the discussion fixed those "Add to Portfolio " links. I'm think the URLs for these should not change for the version of the link , and the checking for them should take place at the destination script (not just in the code to generate the link).
Hide
Penny Leach added a comment -

Was that after you reinstalled? I tested this and it was fine for me (and that's the same error you got before you reinstalled)

Regarding your comment about the ! links - There's a lot of work that goes into generating the HTML if everything is ok (the non !) version and it doesn't make sense to do that if you can't do the export.

And when you say, 'the checking for them should take place at the destination script' - that's .. kind of impossible. The destination script will wake up the existing transfer and continue it.

Show
Penny Leach added a comment - Was that after you reinstalled? I tested this and it was fine for me (and that's the same error you got before you reinstalled) Regarding your comment about the ! links - There's a lot of work that goes into generating the HTML if everything is ok (the non !) version and it doesn't make sense to do that if you can't do the export. And when you say, 'the checking for them should take place at the destination script' - that's .. kind of impossible. The destination script will wake up the existing transfer and continue it.
Hide
Penny Leach added a comment -

closing as now supporting multiple exports per session.

Show
Penny Leach added a comment - closing as now supporting multiple exports per session.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: