Merge branch 'wip-mdl-34568' of git://github.com/rajeshtaneja/moodle

This commit is contained in:
Sam Hemelryk 2012-09-12 11:00:31 +12:00
commit 6aa130499b
6 changed files with 27 additions and 16 deletions

View File

@ -23,10 +23,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['downloadas'] = 'Download table data as';
$string['downloadcsv'] = 'a comma separated values text file';
$string['downloadexcel'] = 'a Microsoft Excel spreadsheet';
$string['downloadods'] = 'an OpenDocument Spreadsheet (ODS)';
$string['downloadas'] = 'Download table data as {$a->formatsmenu} {$a->downloadbutton}';
$string['downloadcsv'] = 'Comma separated values text file';
$string['downloadexcel'] = 'Excel spreadsheet';
$string['downloadods'] = 'OpenDocument spreadsheet';
$string['downloadoptions'] = 'Select download options';
$string['downloadtsv'] = 'a tab separated values text file';
$string['downloadxhtml'] = 'an unpaged XHTML document';
$string['downloadtsv'] = 'Tab separated values text file';
$string['downloadxhtml'] = 'Unpaged XHTML document';

View File

@ -915,11 +915,15 @@ class flexible_table {
function download_buttons() {
if ($this->is_downloadable() && !$this->is_downloading()) {
$downloadoptions = $this->get_download_menu();
$downloadelements = new stdClass();
$downloadelements->formatsmenu = html_writer::select($downloadoptions,
'download', $this->defaultdownloadformat, false);
$downloadelements->downloadbutton = '<input type="submit" value="'.
get_string('download').'"/>';
$html = '<form action="'. $this->baseurl .'" method="post">';
$html .= '<div class="mdl-align">';
$html .= '<input type="submit" value="'.get_string('downloadas', 'table').'"/>';
$html .= html_writer::label(get_string('downloadoptions', 'table'), 'menudownload', false, array('class' => 'accesshide'));
$html .= html_writer::select($downloadoptions, 'download', $this->defaultdownloadformat, false);
$html .= html_writer::tag('label', get_string('downloadas', 'table', $downloadelements));
$html .= '</div></form>';
return $html;

View File

@ -433,7 +433,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
$pagingdisabled . ' />';
$reordercontrols2top = '<div class="moveselectedonpage">' .
get_string('moveselectedonpage', 'quiz', $a) .
'<label>' . get_string('moveselectedonpage', 'quiz', $a) . '</label>' .
'<input type="submit" name="savechanges" value="' .
$strmove . '" ' . $pagingdisabled . ' />' . '
<br /><input type="submit" name="savechanges" value="' .
@ -441,7 +441,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
$reordercontrols2bottom = '<div class="moveselectedonpage">' .
'<input type="submit" name="savechanges" value="' .
$strreorderquestions . '" /><br />' .
get_string('moveselectedonpage', 'quiz', $b) .
'<label>' . get_string('moveselectedonpage', 'quiz', $b) . '</label>' .
'<input type="submit" name="savechanges" value="' .
$strmove . '" ' . $pagingdisabled . ' /> ' . '</div>';
@ -650,7 +650,10 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
?>
<div class="qorder">
<?php
echo '<label class="accesshide" for="o' . $question->id . '">' .
get_string('questionposition', 'quiz', $qnodisplay) . '</label>';
echo '<input type="text" name="o' . $question->id .
'" id="o' . $question->id . '"' .
'" size="2" value="' . (10*$count + 10) .
'" tabindex="' . ($lastindex + $qno) . '" />';
?>

View File

@ -582,6 +582,7 @@ $string['questionnonav'] = '<span class="accesshide">Question </span>{$a->number
$string['questionnonavinfo'] = '<span class="accesshide">Information </span>{$a->number}<span class="accesshide"> {$a->attributes}</span>';
$string['questionnotloaded'] = 'Question {$a} has not been loaded from the database';
$string['questionorder'] = 'Question order';
$string['questionposition'] = 'New position in order for question {$a}';
$string['questions'] = 'Questions';
$string['questionsinclhidden'] = 'Questions (including hidden)';
$string['questionsinthisquiz'] = 'Questions in this quiz';

View File

@ -40,7 +40,7 @@ $string['coursename'] = 'Course name';
$string['detailedanalysis'] = 'More detailed analysis of the responses to this question';
$string['discrimination_index'] = 'Discrimination index';
$string['discriminative_efficiency'] = 'Discriminative efficiency';
$string['downloadeverything'] = 'Download full report as';
$string['downloadeverything'] = 'Download full report as {$a->formatsmenu} {$a->downloadbutton}';
$string['duration'] = 'Open for';
$string['effective_weight'] = 'Effective weight';
$string['errordeleting'] = 'Error deleting old {$a} records.';

View File

@ -966,13 +966,16 @@ class quiz_statistics_report extends quiz_default_report {
protected function everything_download_options() {
$downloadoptions = $this->table->get_download_menu();
$downloadelements = new stdClass();
$downloadelements->formatsmenu = html_writer::select($downloadoptions, 'download',
$this->table->defaultdownloadformat, false);
$downloadelements->downloadbutton = '<input type="submit" value="' .
get_string('download') . '"/>';
$output = '<form action="'. $this->table->baseurl .'" method="post">';
$output .= '<div class="mdl-align">';
$output .= '<input type="hidden" name="everything" value="1"/>';
$output .= '<input type="submit" value="' .
get_string('downloadeverything', 'quiz_statistics') . '"/>';
$output .= html_writer::select($downloadoptions, 'download',
$this->table->defaultdownloadformat, false);
$output .= html_writer::tag('label', get_string('downloadeverything', 'quiz_statistics', $downloadelements));
$output .= '</div></form>';
return $output;