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

View File

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

View File

@ -433,7 +433,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
$pagingdisabled . ' />'; $pagingdisabled . ' />';
$reordercontrols2top = '<div class="moveselectedonpage">' . $reordercontrols2top = '<div class="moveselectedonpage">' .
get_string('moveselectedonpage', 'quiz', $a) . '<label>' . get_string('moveselectedonpage', 'quiz', $a) . '</label>' .
'<input type="submit" name="savechanges" value="' . '<input type="submit" name="savechanges" value="' .
$strmove . '" ' . $pagingdisabled . ' />' . ' $strmove . '" ' . $pagingdisabled . ' />' . '
<br /><input type="submit" name="savechanges" value="' . <br /><input type="submit" name="savechanges" value="' .
@ -441,7 +441,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
$reordercontrols2bottom = '<div class="moveselectedonpage">' . $reordercontrols2bottom = '<div class="moveselectedonpage">' .
'<input type="submit" name="savechanges" value="' . '<input type="submit" name="savechanges" value="' .
$strreorderquestions . '" /><br />' . $strreorderquestions . '" /><br />' .
get_string('moveselectedonpage', 'quiz', $b) . '<label>' . get_string('moveselectedonpage', 'quiz', $b) . '</label>' .
'<input type="submit" name="savechanges" value="' . '<input type="submit" name="savechanges" value="' .
$strmove . '" ' . $pagingdisabled . ' /> ' . '</div>'; $strmove . '" ' . $pagingdisabled . ' /> ' . '</div>';
@ -650,7 +650,10 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
?> ?>
<div class="qorder"> <div class="qorder">
<?php <?php
echo '<label class="accesshide" for="o' . $question->id . '">' .
get_string('questionposition', 'quiz', $qnodisplay) . '</label>';
echo '<input type="text" name="o' . $question->id . echo '<input type="text" name="o' . $question->id .
'" id="o' . $question->id . '"' .
'" size="2" value="' . (10*$count + 10) . '" size="2" value="' . (10*$count + 10) .
'" tabindex="' . ($lastindex + $qno) . '" />'; '" 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['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['questionnotloaded'] = 'Question {$a} has not been loaded from the database';
$string['questionorder'] = 'Question order'; $string['questionorder'] = 'Question order';
$string['questionposition'] = 'New position in order for question {$a}';
$string['questions'] = 'Questions'; $string['questions'] = 'Questions';
$string['questionsinclhidden'] = 'Questions (including hidden)'; $string['questionsinclhidden'] = 'Questions (including hidden)';
$string['questionsinthisquiz'] = 'Questions in this quiz'; $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['detailedanalysis'] = 'More detailed analysis of the responses to this question';
$string['discrimination_index'] = 'Discrimination index'; $string['discrimination_index'] = 'Discrimination index';
$string['discriminative_efficiency'] = 'Discriminative efficiency'; $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['duration'] = 'Open for';
$string['effective_weight'] = 'Effective weight'; $string['effective_weight'] = 'Effective weight';
$string['errordeleting'] = 'Error deleting old {$a} records.'; $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() { protected function everything_download_options() {
$downloadoptions = $this->table->get_download_menu(); $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 = '<form action="'. $this->table->baseurl .'" method="post">';
$output .= '<div class="mdl-align">'; $output .= '<div class="mdl-align">';
$output .= '<input type="hidden" name="everything" value="1"/>'; $output .= '<input type="hidden" name="everything" value="1"/>';
$output .= '<input type="submit" value="' . $output .= html_writer::tag('label', get_string('downloadeverything', 'quiz_statistics', $downloadelements));
get_string('downloadeverything', 'quiz_statistics') . '"/>';
$output .= html_writer::select($downloadoptions, 'download',
$this->table->defaultdownloadformat, false);
$output .= '</div></form>'; $output .= '</div></form>';
return $output; return $output;