Skip to content

Commit

Permalink
MDL-29763 portfolio: add helpful description to the page
Browse files Browse the repository at this point in the history
  • Loading branch information
davosmith committed Jun 19, 2015
1 parent f4bfbd5 commit 1a6448f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lang/en/portfolio.php
Expand Up @@ -107,6 +107,8 @@
$string['instancenotdelete'] = 'Failed to delete portfolio';
$string['instancenotsaved'] = 'Failed to save portfolio';
$string['instancesaved'] = 'Portfolio saved successfully';
$string['intro'] = 'Content which you have created, such as assignment submissions, forum posts and blog entries, can be exported to a portfolio or downloaded.<br>
Any portfolio that you do not wish to use may be hidden so that it is not listed as an option to export content to.';
$string['invalidaddformat'] = 'Invalid add format passed to portfolio_add_button. ({$a}) Must be one of PORTFOLIO_ADD_XXX';
$string['invalidbuttonproperty'] = 'Could not find that property ({$a}) of portfolio_button';
$string['invalidconfigproperty'] = 'Could not find that config property ({$a->property} of {$a->class})';
Expand Down Expand Up @@ -170,6 +172,7 @@
$string['selectedformat'] = 'Selected export format';
$string['selectedwait'] = 'Selected to wait?';
$string['selectplugin'] = 'Select destination';
$string['showhide'] = 'Show / hide';
$string['singleinstancenomultiallowed'] = 'Only a single portfolio plugin instance is available, it doesn\'t support multiple exports per session, and there\'s already an active export in the session using this plugin!';
$string['somepluginsdisabled'] = 'Some entire portfolio plugins have been disabled because they are either misconfigured or rely on something else that is:';
$string['sure'] = 'Are you sure you want to delete \'{$a}\'? This cannot be undone.';
Expand Down
6 changes: 5 additions & 1 deletion user/portfolio.php
Expand Up @@ -51,6 +51,8 @@
$namestr = get_string('name');
$pluginstr = get_string('plugin', 'portfolio');
$baseurl = $CFG->wwwroot . '/user/portfolio.php';
$introstr = get_string('intro', 'portfolio');
$showhide = get_string('showhide', 'portfolio');

$display = true; // Set this to false in the conditions to stop processing.

Expand Down Expand Up @@ -100,12 +102,14 @@
echo $OUTPUT->heading($configstr);
echo $OUTPUT->box_start();

echo html_writer::tag('p', $introstr);

if (!$instances = portfolio_instances(true, false)) {
print_error('noinstances', 'portfolio', $CFG->wwwroot . '/user/view.php');
}

$table = new html_table();
$table->head = array($namestr, $pluginstr, '');
$table->head = array($namestr, $pluginstr, $showhide);
$table->data = array();

foreach ($instances as $i) {
Expand Down

0 comments on commit 1a6448f

Please sign in to comment.