Skip to content

Commit

Permalink
MDL-20636 qtype admin MDL-25987 also allow question type settings to …
Browse files Browse the repository at this point in the history
…be on an admin_externalpage.
  • Loading branch information
timhunt committed Jan 14, 2011
1 parent 2086d94 commit 04bbc70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion admin/qtypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@
}

// Settings link, if available.
if (file_exists($qtype->plugin_dir() . '/settings.php')) {
$settings = admin_get_root()->locate('qtypesetting' . $qtypename);
if ($settings instanceof admin_externalpage) {
$row[] = '<a href="' . $settings->url .
'">' . get_string('settings') . '</a>';
} else if ($settings instanceof admin_settingpage) {
$row[] = '<a href="' . admin_url('settings.php?section=qtypesetting' . $qtypename) .
'">' . get_string('settings') . '</a>';
} else {
Expand Down

0 comments on commit 04bbc70

Please sign in to comment.