Merge branch 'MDL-29763_portfolio_description' of git://github.com/davosmith/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2015-06-23 01:39:55 +02:00
commit 06ec3e57f1
2 changed files with 8 additions and 1 deletions

View File

@ -107,6 +107,8 @@ $string['instanceismisconfigured'] = 'Portfolio instance is misconfigured, skipp
$string['instancenotdelete'] = 'Failed to delete portfolio'; $string['instancenotdelete'] = 'Failed to delete portfolio';
$string['instancenotsaved'] = 'Failed to save portfolio'; $string['instancenotsaved'] = 'Failed to save portfolio';
$string['instancesaved'] = 'Portfolio saved successfully'; $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['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['invalidbuttonproperty'] = 'Could not find that property ({$a}) of portfolio_button';
$string['invalidconfigproperty'] = 'Could not find that config property ({$a->property} of {$a->class})'; $string['invalidconfigproperty'] = 'Could not find that config property ({$a->property} of {$a->class})';
@ -170,6 +172,7 @@ $string['save'] = 'Save';
$string['selectedformat'] = 'Selected export format'; $string['selectedformat'] = 'Selected export format';
$string['selectedwait'] = 'Selected to wait?'; $string['selectedwait'] = 'Selected to wait?';
$string['selectplugin'] = 'Select destination'; $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['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['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.'; $string['sure'] = 'Are you sure you want to delete \'{$a}\'? This cannot be undone.';

View File

@ -51,6 +51,8 @@ $configstr = get_string('manageyourportfolios', 'portfolio');
$namestr = get_string('name'); $namestr = get_string('name');
$pluginstr = get_string('plugin', 'portfolio'); $pluginstr = get_string('plugin', 'portfolio');
$baseurl = $CFG->wwwroot . '/user/portfolio.php'; $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. $display = true; // Set this to false in the conditions to stop processing.
@ -100,12 +102,14 @@ if ($display) {
echo $OUTPUT->heading($configstr); echo $OUTPUT->heading($configstr);
echo $OUTPUT->box_start(); echo $OUTPUT->box_start();
echo html_writer::tag('p', $introstr);
if (!$instances = portfolio_instances(true, false)) { if (!$instances = portfolio_instances(true, false)) {
print_error('noinstances', 'portfolio', $CFG->wwwroot . '/user/view.php'); print_error('noinstances', 'portfolio', $CFG->wwwroot . '/user/view.php');
} }
$table = new html_table(); $table = new html_table();
$table->head = array($namestr, $pluginstr, ''); $table->head = array($namestr, $pluginstr, $showhide);
$table->data = array(); $table->data = array();
foreach ($instances as $i) { foreach ($instances as $i) {