Revert "MDL-35875 - Users - Fixing RTL support"

This reverts commit fbb31b0f90.
This reverts commit c111b9f3ae.
This reverts commit 8afb9b7c4f.

This issue has failed testing and integration will be delayed.
This commit is contained in:
Damyon Wiese
2013-02-28 10:53:03 +08:00
parent fbb31b0f90
commit 4e516138e9
6 changed files with 59 additions and 109 deletions
+33 -57
View File
@@ -243,53 +243,45 @@ echo '</div>';
// Print all the little details in a list
echo html_writer::start_tag('dl', array('class'=>'list'));
if (!isset($hiddenfields['country']) && $user->country) {
echo html_writer::tag('dt', get_string('country'));
echo html_writer::tag('dd', get_string($user->country, 'countries'));
echo '<table class="list" summary="">';
if (! isset($hiddenfields['country']) && $user->country) {
print_row(get_string('country') . ':', get_string($user->country, 'countries'));
}
if (!isset($hiddenfields['city']) && $user->city) {
echo html_writer::tag('dt', get_string('city'));
echo html_writer::tag('dd', $user->city);
if (! isset($hiddenfields['city']) && $user->city) {
print_row(get_string('city') . ':', $user->city);
}
if (isset($identityfields['address']) && $user->address) {
echo html_writer::tag('dt', get_string('address'));
echo html_writer::tag('dd', $user->address);
print_row(get_string("address").":", "$user->address");
}
if (isset($identityfields['phone1']) && $user->phone1) {
echo html_writer::tag('dt', get_string('phone'));
echo html_writer::tag('dd', $user->phone1);
print_row(get_string("phone").":", "$user->phone1");
}
if (isset($identityfields['phone2']) && $user->phone2) {
echo html_writer::tag('dt', get_string('phone2'));
echo html_writer::tag('dd', $user->phone2);
print_row(get_string("phone2").":", "$user->phone2");
}
if (isset($identityfields['institution']) && $user->institution) {
echo html_writer::tag('dt', get_string('institution'));
echo html_writer::tag('dd', $user->institution);
print_row(get_string("institution").":", "$user->institution");
}
if (isset($identityfields['department']) && $user->department) {
echo html_writer::tag('dt', get_string('department'));
echo html_writer::tag('dd', $user->department);
print_row(get_string("department").":", "$user->department");
}
if (isset($identityfields['idnumber']) && $user->idnumber) {
echo html_writer::tag('dt', get_string('idnumber'));
echo html_writer::tag('dd', $user->idnumber);
print_row(get_string("idnumber").":", "$user->idnumber");
}
if (isset($identityfields['email']) and ($currentuser
or $user->maildisplay == 1
or has_capability('moodle/course:useremail', $context)
or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER)))) {
echo html_writer::tag('dt', get_string('email'));
echo html_writer::tag('dd', obfuscate_mailto($user->email, ''));
print_row(get_string("email").":", obfuscate_mailto($user->email, ''));
}
if ($user->url && !isset($hiddenfields['webpage'])) {
@@ -297,46 +289,30 @@ if ($user->url && !isset($hiddenfields['webpage'])) {
if (strpos($user->url, '://') === false) {
$url = 'http://'. $url;
}
$webpageurl = new moodle_url($url);
echo html_writer::tag('dt', get_string('webpage'));
echo html_writer::tag('dd', html_writer::link($webpageurl, s($user->url)));
print_row(get_string("webpage") .":", '<a href="'.s($url).'">'.s($user->url).'</a>');
}
if ($user->icq && !isset($hiddenfields['icqnumber'])) {
$imurl = new moodle_url('http://web.icq.com/wwp', array('uin'=>$user->icq) );
$iconurl = new moodle_url('http://web.icq.com/whitepages/online', array('icq'=>$user->icq, 'img'=>'5'));
$statusicon = html_writer::tag('img', '', array('src'=>$iconurl, 'class'=>'icon icon-post', 'alt'=>get_string('status')));
echo html_writer::tag('dt', get_string('icqnumber'));
echo html_writer::tag('dd', html_writer::link($imurl, s($user->icq) . $statusicon));
print_row(get_string('icqnumber').':',"<a href=\"http://web.icq.com/wwp?uin=".urlencode($user->icq)."\">".s($user->icq)." <img src=\"http://web.icq.com/whitepages/online?icq=".urlencode($user->icq)."&amp;img=5\" alt=\"\" /></a>");
}
if ($user->skype && !isset($hiddenfields['skypeid'])) {
$imurl = 'skype:'.urlencode($user->skype).'?call';
$iconurl = new moodle_url('http://mystatus.skype.com/smallicon/'.$user->skype);
if (strpos($CFG->httpswwwroot, 'https:') === 0) {
// Bad luck, skype devs are lazy to set up SSL on their servers - see MDL-37233.
$statusicon = '';
} else {
$statusicon = html_writer::empty_tag('img', array('src'=>$iconurl, 'class'=>'icon icon-post', 'alt'=>get_string('status')));
$statusicon = ' '.html_writer::empty_tag('img', array('src'=>'http://mystatus.skype.com/smallicon/'.urlencode($user->skype), 'alt'=>get_string('status')));
}
echo html_writer::tag('dt', get_string('skypeid'));
echo html_writer::tag('dd', html_writer::link($imurl, s($user->skype) . $statusicon));
print_row(get_string('skypeid').':','<a href="skype:'.urlencode($user->skype).'?call">'.s($user->skype).$statusicon.'</a>');
}
if ($user->yahoo && !isset($hiddenfields['yahooid'])) {
$imurl = new moodle_url('http://edit.yahoo.com/config/send_webmesg', array('.target'=>$user->yahoo, '.src'=>'pg'));
$iconurl = new moodle_url('http://opi.yahoo.com/online', array('u'=>$user->yahoo, 'm'=>'g', 't'=>'0'));
$statusicon = html_writer::tag('img', '', array('src'=>$iconurl, 'class'=>'iconsmall icon-post', 'alt'=>get_string('status')));
echo html_writer::tag('dt', get_string('yahooid'));
echo html_writer::tag('dd', html_writer::link($imurl, s($user->yahoo) . $statusicon));
print_row(get_string('yahooid').':', '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.urlencode($user->yahoo).'&amp;.src=pg">'.s($user->yahoo)." <img src=\"http://opi.yahoo.com/online?u=".urlencode($user->yahoo)."&m=g&t=0\" alt=\"\"></a>");
}
if ($user->aim && !isset($hiddenfields['aimid'])) {
$imurl = 'aim:goim?screenname='.urlencode($user->aim);
echo html_writer::tag('dt', get_string('aimid'));
echo html_writer::tag('dd', html_writer::link($imurl, s($user->aim)));
print_row(get_string('aimid').':', '<a href="aim:goim?screenname='.urlencode($user->aim).'">'.s($user->aim).'</a>');
}
if ($user->msn && !isset($hiddenfields['msnid'])) {
echo html_writer::tag('dt', get_string('msnid'));
echo html_writer::tag('dd', s($user->msn));
print_row(get_string('msnid').':', s($user->msn));
}
/// Print the Custom User Fields
@@ -366,8 +342,7 @@ if (!isset($hiddenfields['mycourses'])) {
break;
}
}
echo html_writer::tag('dt', get_string('courseprofiles'));
echo html_writer::tag('dd', rtrim($courselisting,', '));
print_row(get_string('courseprofiles').':', rtrim($courselisting,', '));
}
}
if (!isset($hiddenfields['firstaccess'])) {
@@ -376,8 +351,7 @@ if (!isset($hiddenfields['firstaccess'])) {
} else {
$datestring = get_string("never");
}
echo html_writer::tag('dt', get_string('firstaccess'));
echo html_writer::tag('dd', $datestring);
print_row(get_string("firstaccess").":", $datestring);
}
if (!isset($hiddenfields['lastaccess'])) {
if ($user->lastaccess) {
@@ -385,27 +359,24 @@ if (!isset($hiddenfields['lastaccess'])) {
} else {
$datestring = get_string("never");
}
echo html_writer::tag('dt', get_string('lastaccess'));
echo html_writer::tag('dd', $datestring);
print_row(get_string("lastaccess").":", $datestring);
}
/// Printing tagged interests
if (!empty($CFG->usetags)) {
if ($interests = tag_get_tags_csv('user', $user->id) ) {
echo html_writer::tag('dt', get_string('interests'));
echo html_writer::tag('dd', $interests);
print_row(get_string('interests') .": ", $interests);
}
}
if (!isset($hiddenfields['suspended'])) {
if ($user->suspended) {
echo html_writer::tag('dt', '&nbsp;');
echo html_writer::tag('dd', get_string('suspended', 'auth'));
print_row('', get_string('suspended', 'auth'));
}
}
echo html_writer::end_tag('dl');
echo "</div></div>"; // Closing desriptionbox and userprofilebox.
echo "</table></div></div>";
echo '<div id="region-content" class="block-region"><div class="region-content">';
echo $OUTPUT->blocks_for_region('content');
echo '</div></div>';
@@ -425,4 +396,9 @@ if ($CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) && $currentuser) { //
}
echo '</div>'; // userprofile class
echo $OUTPUT->footer();
echo $OUTPUT->footer();
function print_row($left, $right) {
echo "\n<tr><th class=\"label c0\">$left</th><td class=\"info c1\">$right</td></tr>\n";
}