Skip to content

Commit

Permalink
Merge branch 'MDL-36638-master' of git://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Nov 29, 2012
2 parents 4f84718 + c384744 commit 7dd3674
Show file tree
Hide file tree
Showing 33 changed files with 156 additions and 48 deletions.
4 changes: 2 additions & 2 deletions backup/util/ui/backup_ui_setting.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,9 @@ public function get_static_value() {
global $OUTPUT;
// Checkboxes are always yes or no
if ($this->get_value()) {
return $OUTPUT->pix_icon('i/tick_green_big', get_string('yes'));
return $OUTPUT->pix_icon('i/valid', get_string('yes'));
} else {
return $OUTPUT->pix_icon('i/cross_red_big', get_string('no'));
return $OUTPUT->pix_icon('i/invalid', get_string('no'));
}
}

Expand Down
4 changes: 2 additions & 2 deletions backup/util/ui/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public function dependency_notification($message) {
* @return string
*/
public function backup_details($details, $nextstageurl) {
$yestick = $this->output->pix_icon('i/tick_green_big', get_string('yes'));
$notick = $this->output->pix_icon('i/cross_red_big', get_string('no'));
$yestick = $this->output->pix_icon('i/valid', get_string('yes'));
$notick = $this->output->pix_icon('i/valid', get_string('no'));

$html = html_writer::start_tag('div', array('class'=>'backup-restore'));

Expand Down
4 changes: 2 additions & 2 deletions blog/external_blogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@

foreach ($blogs as $blog) {
if ($blog->failedlastsync) {
$validicon = $OUTPUT->pix_icon('i/cross_red_big', get_string('feedisinvalid', 'blog'));
$validicon = $OUTPUT->pix_icon('i/invalid', get_string('feedisinvalid', 'blog'));
} else {
$validicon = $OUTPUT->pix_icon('i/tick_green_big', get_string('feedisvalid', 'blog'));
$validicon = $OUTPUT->pix_icon('i/valid', get_string('feedisvalid', 'blog'));
}

$editurl = new moodle_url('/blog/external_blog_edit.php', array('id' => $blog->id));
Expand Down
6 changes: 3 additions & 3 deletions cache/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function store_instance_summariers(array $stores, array $plugins) {
$row = new html_table_row(array(
$storename,
get_string('pluginname', 'cachestore_'.$store['plugin']),
($store['isready'] && $store['requirementsmet']) ? $this->output->pix_icon('i/tick_green_small', '1') : '',
($store['isready'] && $store['requirementsmet']) ? $this->output->pix_icon('i/valid', '1') : '',
$store['mappings'],
join(', ', $modes),
join(', ', $supports),
Expand Down Expand Up @@ -171,7 +171,7 @@ public function store_plugin_summaries(array $plugins) {

$row = new html_table_row(array(
$plugin['name'],
($plugin['requirementsmet']) ? $this->output->pix_icon('i/tick_green_small', '1') : '',
($plugin['requirementsmet']) ? $this->output->pix_icon('i/valid', '1') : '',
$plugin['instances'],
join(', ', $modes),
join(', ', $supports),
Expand Down Expand Up @@ -321,7 +321,7 @@ public function lock_summaries(array $locks) {
// Useful later: get_string('actions', 'cache').
);
$table->data = array();
$tick = $this->output->pix_icon('i/tick_green_big', '');
$tick = $this->output->pix_icon('i/valid', '');
foreach ($locks as $lock) {
$table->data[] = new html_table_row(array(
new html_table_cell($lock['name']),
Expand Down
2 changes: 1 addition & 1 deletion lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ protected function render_url_select(url_select $select) {
public function doc_link($path, $text = '', $forcepopup = false) {
global $CFG;

$icon = $this->pix_icon('docs', $text, 'moodle', array('class'=>'iconhelp'));
$icon = $this->pix_icon('docs', $text, 'moodle', array('class'=>'iconhelp icon-pre'));

$url = new moodle_url(get_docs_url($path));

Expand Down
2 changes: 1 addition & 1 deletion mod/lti/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function definition() {
'edit_icon_url' => (string)$OUTPUT->pix_url('t/edit'),
'add_icon_url' => (string)$OUTPUT->pix_url('t/add'),
'delete_icon_url' => (string)$OUTPUT->pix_url('t/delete'),
'green_check_icon_url' => (string)$OUTPUT->pix_url('i/tick_green_small'),
'green_check_icon_url' => (string)$OUTPUT->pix_url('i/valid'),
'warning_icon_url' => (string)$OUTPUT->pix_url('warning', 'lti'),
'instructor_tool_type_edit_url' => $editurl->out(false),
'ajax_url' => $ajaxurl->out(true),
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ function quiz_extend_settings_navigation($settings, $quiznode) {
array('cmid'=>$PAGE->cm->id, 'sesskey'=>sesskey()));
$node = navigation_node::create(get_string('preview', 'quiz'), $url,
navigation_node::TYPE_SETTING, null, 'mod_quiz_preview',
new pix_icon('t/preview', ''));
new pix_icon('i/preview', ''));
$quiznode->add_node($node, $beforekey);
}

Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ public function summary_table($attemptobj, $displayoptions) {
$flag = '';
if ($attemptobj->is_question_flagged($slot)) {
$flag = html_writer::empty_tag('img', array('src' => $this->pix_url('i/flagged'),
'alt' => get_string('flagged', 'question'), 'class' => 'questionflag'));
'alt' => get_string('flagged', 'question'), 'class' => 'questionflag icon-post'));
}
if ($attemptobj->can_navigate_to($slot)) {
$row = array(html_writer::link($attemptobj->attempt_url($slot),
Expand Down
15 changes: 7 additions & 8 deletions mod/quiz/report/attemptsreport_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,17 @@ public function make_review_link($data, $attempt, $slot) {

$flag = '';
if ($stepdata->flagged) {
$flag = ' ' . $OUTPUT->pix_icon('i/flagged', get_string('flagged', 'question'),
$flag = $OUTPUT->pix_icon('i/flagged', get_string('flagged', 'question'),
'moodle', array('class' => 'questionflag'));
}

$feedbackimg = '';
if ($state->is_finished() && $state != question_state::$needsgrading) {
$feedbackimg = ' ' . $this->icon_for_fraction($stepdata->fraction);
$feedbackimg = $this->icon_for_fraction($stepdata->fraction);
}

$output = html_writer::tag('span', html_writer::tag('span',
$data . $feedbackimg . $flag,
array('class' => $state->get_state_class(true))), array('class' => 'que'));
$output = html_writer::tag('span', $feedbackimg . html_writer::tag('span',
$data, array('class' => $state->get_state_class(true))) . $flag, array('class' => 'que'));

$url = new moodle_url('/mod/quiz/reviewquestion.php',
array('attempt' => $attempt->attempt, 'slot' => $slot));
Expand All @@ -275,11 +274,11 @@ protected function icon_for_fraction($fraction) {

$state = question_state::graded_state_for_fraction($fraction);
if ($state == question_state::$gradedright) {
$icon = 'i/tick_green_big';
$icon = 'i/grade_correct';
} else if ($state == question_state::$gradedpartial) {
$icon = 'i/tick_amber_big';
$icon = 'i/grade_partiallycorrect';
} else {
$icon = 'i/cross_red_big';
$icon = 'i/grade_incorrect';
}

return $OUTPUT->pix_icon($icon, get_string($state->get_feedback_class(), 'question'),
Expand Down
5 changes: 3 additions & 2 deletions mod/quiz/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ table.quizattemptsummary .noreviewmessage {color: gray;}

/** Mod quiz summary **/
#page-mod-quiz-summary #content {text-align: center;}
#page-mod-quiz-summary .questionflag {width: 16px;height: 16px;vertical-align: middle;}
#page-mod-quiz-summary .questionflag { vertical-align: text-bottom; }
#page-mod-quiz-summary #quiz-timer {text-align: center; margin-top: 1em;}
#page-mod-quiz-summary .submitbtns {margin-top: 1.5em;}
@media print {
Expand Down Expand Up @@ -170,7 +170,8 @@ table.quizreviewsummary td.cell {padding: 1px 1em 1px 0.5em;text-align: left;bac
#page-mod-quiz-report table#attempts.grades span.que,
#page-mod-quiz-report table#attempts span.avgcell {white-space: nowrap;}
#page-mod-quiz-report table#attempts span.que .requiresgrading {white-space: normal;}
#page-mod-quiz-report table#attempts .questionflag {width: 16px; height: 16px; vertical-align: middle;}
#page-mod-quiz-report table#attempts .questionflag { vertical-align: text-bottom; padding-left: 6px; }
.dir-rtl#page-mod-quiz-report table#attempts .questionflag { padding-right: 6px; padding-left: 0; }

#page-mod-quiz-report .graph.flexible-wrap {text-align:center; overflow:auto;}

Expand Down
2 changes: 1 addition & 1 deletion mod/resource/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function resource_get_coursemodule_info($coursemodule) {
}

if ($resource->tobemigrated) {
$info->icon ='i/cross_red_big';
$info->icon ='i/invalid';
return $info;
}
$fs = get_file_storage();
Expand Down
22 changes: 11 additions & 11 deletions mod/workshop/allocation/scheduled/settings_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,23 @@ public function definition() {
if ($current === false) {
$mform->addElement('static', 'infostatus', get_string('currentstatusexecution', 'workshopallocation_scheduled'),
get_string('resultdisabled', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/block'))));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/invalid'))));

} else {
if (!empty($current->timeallocated)) {
$mform->addElement('static', 'infostatus', get_string('currentstatusexecution', 'workshopallocation_scheduled'),
get_string('currentstatusexecution1', 'workshopallocation_scheduled', $strtimeexecuted).' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/tick_green_big'))));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/valid'))));

if ($current->resultstatus == workshop_allocation_result::STATUS_EXECUTED) {
$strstatus = get_string('resultexecuted', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/tick_green_big')));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/valid')));
} else if ($current->resultstatus == workshop_allocation_result::STATUS_FAILED) {
$strstatus = get_string('resultfailed', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/cross_red_big')));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/invalid')));
} else {
$strstatus = get_string('resultvoid', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/cross_red_big')));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/invalid')));
}

if (!empty($current->resultmessage)) {
Expand All @@ -91,7 +91,7 @@ public function definition() {
if ($current->timeallocated < $workshop->submissionend) {
$mform->addElement('static', 'infoexpected', get_string('currentstatusnext', 'workshopallocation_scheduled'),
get_string('currentstatusexecution2', 'workshopallocation_scheduled', $strtimeexpected).' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/tick_amber_big'))));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/caution'))));
$mform->addHelpButton('infoexpected', 'currentstatusnext', 'workshopallocation_scheduled');
} else {
$mform->addElement('checkbox', 'reenablescheduled', get_string('currentstatusreset', 'workshopallocation_scheduled'),
Expand All @@ -102,32 +102,32 @@ public function definition() {
} else if (empty($current->enabled)) {
$mform->addElement('static', 'infostatus', get_string('currentstatusexecution', 'workshopallocation_scheduled'),
get_string('resultdisabled', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/block'))));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/invalid'))));

} else if ($workshop->phase != workshop::PHASE_SUBMISSION) {
$mform->addElement('static', 'infostatus', get_string('currentstatusexecution', 'workshopallocation_scheduled'),
get_string('resultfailed', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/block'))).
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/invalid'))).
html_writer::empty_tag('br').
get_string('resultfailedphase', 'workshopallocation_scheduled'));

} else if (empty($workshop->submissionend)) {
$mform->addElement('static', 'infostatus', get_string('currentstatusexecution', 'workshopallocation_scheduled'),
get_string('resultfailed', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/block'))).
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/invalid'))).
html_writer::empty_tag('br').
get_string('resultfaileddeadline', 'workshopallocation_scheduled'));

} else if ($workshop->submissionend < time()) {
// next cron will execute it
$mform->addElement('static', 'infostatus', get_string('currentstatusexecution', 'workshopallocation_scheduled'),
get_string('currentstatusexecution4', 'workshopallocation_scheduled').' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/tick_amber_big'))));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/caution'))));

} else {
$mform->addElement('static', 'infostatus', get_string('currentstatusexecution', 'workshopallocation_scheduled'),
get_string('currentstatusexecution3', 'workshopallocation_scheduled', $strtimeexpected).' '.
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/tick_amber_big'))));
html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/caution'))));
}
}

Expand Down
Binary file added pix/i/caution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions pix/i/caution.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/i/grade_correct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions pix/i/grade_correct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/i/grade_incorrect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions pix/i/grade_incorrect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/i/grade_partiallycorrect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions pix/i/grade_partiallycorrect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/i/invalid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions pix/i/invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/i/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions pix/i/preview.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/i/valid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7dd3674

Please sign in to comment.