$accesstext = '';
}
if ($linkclasses) {
- $linkcss = 'class="' . trim($linkclasses) . '" ';
+ $linkcss = 'class="activityinstance ' . trim($linkclasses) . '" ';
} else {
- $linkcss = '';
+ $linkcss = 'class="activityinstance"';
}
if ($textclasses) {
$textcss = 'class="' . trim($textclasses) . '" ';
// Display link itself
echo '<a ' . $linkcss . $mod->extra . $onclick .
' href="' . $url . '"><img src="' . $mod->get_icon_url() .
- '" class="activityicon" alt="' . $mod->modfullname . '" /> ' .
+ '" class="iconlarge activityicon" alt="' . $mod->modfullname . '" />' .
$accesstext . '<span class="instancename">' .
$instancename . $altname . '</span></a>';
} else {
$mod->groupmode = false;
}
- echo ' ';
echo make_editing_buttons($mod, $absolute, true, $mod->indent, $sectionreturn);
echo $mod->get_after_edit_icons();
}
if (has_capability('moodle/role:assign', $modcontext)){
$actions[] = new action_link(
new moodle_url('/'.$CFG->admin.'/roles/assign.php', array('contextid' => $modcontext->id)),
- new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall', 'title' => '')),
+ new pix_icon('t/assignroles', $str->assign, 'moodle', array('class' => 'iconsmall', 'title' => '')),
null,
array('class' => 'editing_assign', 'title' => $str->assign)
);
return true;
}
+/**
+ * Returns the sorted list of available course formats, filtered by enabled if necessary
+ *
+ * @param bool $enabledonly return only formats that are enabled
+ * @return array array of sorted format names
+ */
+function get_sorted_course_formats($enabledonly = false) {
+ global $CFG;
+ $formats = get_plugin_list('format');
+
+ if (!empty($CFG->format_plugins_sortorder)) {
+ $order = explode(',', $CFG->format_plugins_sortorder);
+ $order = array_merge(array_intersect($order, array_keys($formats)),
+ array_diff(array_keys($formats), $order));
+ } else {
+ $order = array_keys($formats);
+ }
+ if (!$enabledonly) {
+ return $order;
+ }
+ $sortedformats = array();
+ foreach ($order as $formatname) {
+ if (!get_config('format_'.$formatname, 'disabled')) {
+ $sortedformats[] = $formatname;
+ }
+ }
+ return $sortedformats;
+}
+
/**
* The URL to use for the specified course (with section)
*