Skip to content

Commit

Permalink
cvsimport fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Langhoff committed Aug 29, 2007
1 parent 59aa15d commit 13534ef
Show file tree
Hide file tree
Showing 73 changed files with 451 additions and 19,866 deletions.
12,256 changes: 0 additions & 12,256 deletions CHANGES

This file was deleted.

15 changes: 8 additions & 7 deletions admin/report/question/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
print_heading(page_doc_link(get_string('adminreport', 'question')));

$probstr = '';
if ($CFG->version < 2007081000){
$contextupgradeversion = 2007081000;
if ($CFG->version < $contextupgradeversion){
///cwrqpfs issue
$probstr = print_heading(get_string('cwrqpfs', 'question'), '', 3, 'main', true);

Expand All @@ -34,12 +35,12 @@
}
$probstr .= '<li>'.get_string('changepublishstatuscat', 'question', $categories[$id]);
if ($questions = get_records_sql('SELECT q.*, qui.id as quizid, qui.name as quizname, cm.id as cmid, '
.'qui.course, c.fullname as coursename FROM '.$CFG->prefix.'question as q, '
.$CFG->prefix.'quiz_question_instances as qqi, '
.$CFG->prefix.'quiz as qui, '
.$CFG->prefix.'course_modules as cm, '
.$CFG->prefix.'modules as m, '
.$CFG->prefix.'course as c '
.'qui.course, c.fullname as coursename FROM '.$CFG->prefix.'question q, '
.$CFG->prefix.'quiz_question_instances qqi, '
.$CFG->prefix.'quiz qui, '
.$CFG->prefix.'course_modules cm, '
.$CFG->prefix.'modules m, '
.$CFG->prefix.'course c '
.'WHERE (q.category = '.$id.' AND qqi.question = q.id '
.'AND qqi.quiz = qui.id '
.'AND qui.course = c.id '
Expand Down
2 changes: 1 addition & 1 deletion blocks/admin/block_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function get_content() {

if (($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $context) && ($course->id!==SITEID)) {
$strgroups = get_string('groups');
$this->content->items[]='<a title="'.$strgroups.'" href="'.groups_home_url($this->instance->pageid).'">'.$strgroups.'</a>';
$this->content->items[]='<a title="'.$strgroups.'" href="'.$CFG->wwwroot.'/group/index.php?id='.$this->instance->pageid.'">'.$strgroups.'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/group.gif" class="icon" alt="" />';
}

Expand Down
6 changes: 6 additions & 0 deletions calendar/export_execute.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@
$ical = new iCalendar;
$ical->add_property('method', 'PUBLISH');
foreach($events as $event) {
if (!empty($event->modulename)) {
$cm = get_coursemodule_from_instance($event->modulename, $event->instance);
if (!groups_course_module_visible($cm)) {
continue;
}
}
$ev = new iCalendar_event;
$ev->add_property('summary', $event->name);
$ev->add_property('description', $event->description);
Expand Down
16 changes: 14 additions & 2 deletions calendar/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,19 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y

// Set event course class for course events
if (!empty($events)) {
foreach ($events as $event) {
foreach ($events as $eventid => $event) {
if($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) {
$event->class = 'event_course'.array_search($event->courseid, $courses) % CALENDAR_MAXCOURSES;
}
if (!empty($event->modulename)) {
$cm = get_coursemodule_from_instance($event->modulename, $event->instance);
if (!groups_course_module_visible($cm)) {
unset($events[$eventid]);
}
}
}
}

// This is either a genius idea or an idiot idea: in order to not complicate things, we use this rule: if, after
// possibly removing SITEID from $courses, there is only one course left, then clicking on a day in the month
// will also set the $SESSION->cal_courses_shown variable to that one course. Otherwise, we 'd need to add extra
Expand Down Expand Up @@ -418,6 +424,12 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
if($events !== false) {

foreach($events as $event) {
if(!empty($event->modulename)) {
$mod = get_coursemodule_from_instance($event->modulename, $event->instance);
if (!groups_course_module_visible($mod)) {
continue;
}
}

if($processed >= $display->maxevents) {
break;
Expand Down
12 changes: 11 additions & 1 deletion calendar/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,17 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users, $course
else {
$events = get_records_select('event', $whereclause, 'timestart');
}

if (!empty($events)) {
foreach($events as $eventid => $event) {
if (!empty($event->modulename)) {
$cm = get_coursemodule_from_instance($event->modulename, $event->instance);
if (!groups_course_module_visible($cm)) {
unset($events[$eventid]);
}
}
}
}

// Extract information: events vs. time
calendar_events_by_day($events, $m, $y, $eventsbyday, $durationbyday, $typesbyday, $courses);

Expand Down
4 changes: 4 additions & 0 deletions config-dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@
// called. This option will action disregarding error_reporting setting.
// $CFG->dblogerror = true;
//
// The following setting will log every database query to a table called adodb_logsql.
// Use this setting on a development server only, the table grows quickly!
// $CFG->logsql = true;
//
// The following setting will turn on username logging into Apache log. For full details regarding setting
// up of this function please refer to the install section of the document.
// $CFG->apacheloguser = 0; // Turn this feature off. Default value.
Expand Down
111 changes: 0 additions & 111 deletions course/grade.php

This file was deleted.

Loading

0 comments on commit 13534ef

Please sign in to comment.