Skip to content

Commit

Permalink
MDL-37009 Display course info as a page instead of popup
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Apr 1, 2013
1 parent 09ae7ee commit ddbf9b6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
5 changes: 2 additions & 3 deletions course/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@
print_error('coursehidden', '', $CFG->wwwroot .'/');
}

$PAGE->set_context($context);
$PAGE->set_pagelayout('popup');
$PAGE->set_course($course);
$PAGE->set_pagelayout('course');
$PAGE->set_url('/course/info.php', array('id' => $course->id));
$PAGE->set_title(get_string("summaryof", "", $course->fullname));
$PAGE->set_heading(get_string('courseinfo'));
$PAGE->set_course($course);
$PAGE->navbar->add(get_string('summary'));

echo $OUTPUT->header();
Expand Down
7 changes: 3 additions & 4 deletions course/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1069,13 +1069,12 @@ protected function coursecat_coursebox(coursecat_helper $chelper, $course, $addi

// If we display course in collapsed form but the course has summary or course contacts, display the link to the info page.
$content .= html_writer::start_tag('div', array('class' => 'moreinfo'));
if ($course->has_summary() || $course->has_course_contacts()) {
if ($chelper->get_show_courses() < self::COURSECAT_SHOW_COURSES_EXPANDED) {
if ($chelper->get_show_courses() < self::COURSECAT_SHOW_COURSES_EXPANDED) {
if ($course->has_summary() || $course->has_course_contacts()) {
$url = new moodle_url('/course/info.php', array('id' => $course->id));
$image = html_writer::empty_tag('img', array('src' => $this->output->pix_url('i/info'),
'alt' => $this->strings->summary));
$content .= $this->action_link($url, $image, new popup_action('click', $url, 'courseinfo'),
array('title' => $this->strings->summary));
$content .= html_writer::link($url, $image, array('title' => $this->strings->summary));
}
}
$content .= html_writer::end_tag('div'); // .moreinfo
Expand Down
2 changes: 1 addition & 1 deletion theme/afterburner/style/afterburner_styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ textarea {
/*
Courses and categories lists
----------------------------*/
.courses .coursebox .summary {
.coursebox .summary {
width: 100%;
float: left;
}
Expand Down
4 changes: 2 additions & 2 deletions theme/base/style/course.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ li.section.hidden span.commands a.editing_show {cursor:default;}
.coursebox .enrolmenticons img,
.coursebox .moreinfo img {margin:0 .2em;}
.coursebox .content {clear:both;}
.courses .coursebox .summary,
.coursebox .summary,
.coursebox .coursecat {float:right;width: 55%;}
.coursebox .coursecat {text-align:right;clear:right;}
.coursebox.remotecoursebox .remotecourseinfo {float:left;width: 40%;}
Expand All @@ -133,7 +133,7 @@ li.section.hidden span.commands a.editing_show {cursor:default;}
.dir-rtl .coursebox .teachers {float:right;}
.dir-rtl .coursebox .enrolmenticons,
.dir-rtl .coursebox .moreinfo {float:left;}
.dir-rtl .courses .coursebox .summary,
.dir-rtl .coursebox .summary,
.dir-rtl .coursebox .coursecat {float:left;}
.dir-rtl .coursebox .coursecat {text-align:left;clear:left;}

Expand Down
12 changes: 6 additions & 6 deletions theme/magazine/style/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -904,26 +904,26 @@ div.coursebox h3.name a {
font-weight: 400;
}

.courses .coursebox div.summary {
.coursebox div.summary {
font-size: 14px;
color: #666666;
font-style: italic;
}

.courses .coursebox ul.teachers {
.coursebox ul.teachers {
display: block;
padding-left: 5px !important;
padding-left: 5px;
}

.dir-rtl .courses .coursebox ul.teachers {
.dir-rtl .coursebox ul.teachers {
padding-right: 5px;
}

.courses .coursebox ul.teachers li {
.coursebox ul.teachers li {
font-size: 10px;
}

.courses .coursebox ul.teachers li a {
.coursebox ul.teachers li a {
font-size: 11px;
}

Expand Down

0 comments on commit ddbf9b6

Please sign in to comment.