Posts made by Itamar Tzadok

Moodle in English -> General developer forum -> One line? -> Re: One line?

by Itamar Tzadok -

By standard styles the label and the element are on the same line if they have enough room. When they will break to two lines depends on the size of the container, the css definitions and how responsive is your the theme you are using. Use the browser inspector to inspect the styles and how they change. smile

This should be quite useful for occasional restrictions on few activities but maybe less so if we need to manage more participants in more activities. In the latter case using access restrictions in the course section level could make things a bit easier. smile

You can further avoid the gradebook extra if you use a Dataorm activity which is set with a completion criterion of 1 entry. This way the helper activity need not be gradable and won't appear in the gradebook. Then as a teacher you can add an entry on behalf of each student who should have access to the target activity to "complete" the activity for the student. Adding an entry on behalf is extremely easy, either by csv import or by a designated Entry author field pattern. The entries display is then a convenient way to see who's in that "access group". smile

The docs you are referring to may be outdated.

You can output an action link directly, e.g.:

$nonpopuplink = $rating->get_view_ratings_url();
$popuplink = $rating->get_view_ratings_url(true);
$popupaction = new popup_action('click', $popuplink, 'ratings', array('height' => 400, 'width' => 600));
                
return $OUTPUT->action_link($nonpopuplink, 'view all', $popupaction);

 

or construct with the required arguments. e.g.:

$url = !empty($options['baseurl']) ? $options['baseurl'] : $PAGE->url;
$str = get_string('multiduplicate', 'dataform');
$actionlink = new action_menu_link($url, new pix_icon('t/copy', $str), $str, true, array('id' => 'id_entry_bulkaction_duplicate'));

return $OUTPUT->render($actionlink);

 

And using the html_writer, e.g:

$editpermlink = html_writer::link(new moodle_url('/admin/roles/permissions.php', $params), $OUTPUT->pix_icon('i/edit', get_string('edit')));

hth smile

Average of ratings: Useful (2)

I've tried WAMP and WIMP on Win 8 and tests are 6 times slower than similar environment on Win 7. There is a considerable amount of discussion about WAMP being slow on Win 8 because it doesn't support IPv6 but disabling the IPv6 seemed to no avail and at any rate WIMP (IIS) is no better.

Has anyone encountered a similar issue?

smile

Average of ratings: -