mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-10870 All files updated to new build_navigation() method.
This commit is contained in:
parent
5bf243d131
commit
73c24ef80b
12 changed files with 161 additions and 98 deletions
|
@ -64,16 +64,15 @@
|
|||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
/// If it's hidden then it's don't show anything. :)
|
||||
/// If it's hidden then it doesn't show anything. :)
|
||||
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities', $context)) {
|
||||
$strdatabases = get_string("modulenameplural", "data");
|
||||
$navigation = "<a href=\"index.php?id=$course->id\">$strdatabases</a> ->";
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
||||
print_header_simple(format_string($data->name), "", $navigation, "", "", true, '', navmenu($course, $cm));
|
||||
notice(get_string("activityiscurrentlyhidden"));
|
||||
}
|
||||
|
@ -161,7 +160,7 @@
|
|||
if (!has_capability('mod/data:approve', $context)) {
|
||||
$record->approved = 0;
|
||||
}
|
||||
|
||||
|
||||
$record->groupid = $currentgroup;
|
||||
$record->timemodified = time();
|
||||
update_record('data_records',$record);
|
||||
|
|
|
@ -37,8 +37,8 @@ if (!isset($form->create_sequence_url)) {
|
|||
<center>
|
||||
<span id="message"><p>Please wait .......</p></span>
|
||||
<table cellpadding="5">
|
||||
<tr valign=top>
|
||||
<td align=right><b><?php print_string("workspace", "lams") ?>:</b></td>
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php print_string("workspace", "lams") ?>:</b></td>
|
||||
<td>
|
||||
<select id="workspace" name="workspace"></select>
|
||||
</td>
|
||||
|
@ -55,7 +55,8 @@ if (!isset($form->create_sequence_url)) {
|
|||
<input type="text" id="name" name="name" size="30" />
|
||||
</td>
|
||||
</tr>
|
||||
<td align=right><p><b><?php print_string("introduction", "lams") ?>:</b></p>
|
||||
<tr>
|
||||
<td align="right"><p><b><?php print_string("introduction", "lams") ?>:</b></p>
|
||||
<br />
|
||||
<font size="1">
|
||||
<?php
|
||||
|
@ -87,8 +88,10 @@ print_textarea($usehtmleditor, 20, 50, 680, 400, "introduction", $form->introduc
|
|||
<input type="hidden" name="learning_session_id"/>
|
||||
<input type="hidden" name="create_sequence_url" id="create_sequence_url"/>
|
||||
<input type="submit" id="save" name="save" value="<?php print_string("useSequence","lams") ?>" onClick="return validate();">
|
||||
<input type="button" id="edit" name"edit" value="<?php print_string("editSequence","lams") ?>" onClick="openAuthor(<?php echo "'".$form->create_sequence_url."&".$LAMSCONSTANTS->param_ldid."=".$form->sequence."'";?>);">
|
||||
<input type="button" id="create" name="create" value="<?php print_string("createSequence","lams") ?>" onClick="openAuthor(<?php echo "'".$form->create_sequence_url."'";?>);">
|
||||
<input type="button" id="edit" name="edit" value="<?php print_string("editSequence","lams") ?>" onClick="openAuthor(<?php
|
||||
echo "'".$form->create_sequence_url."&".$LAMSCONSTANTS->param_ldid."=".$form->sequence."'";?>);">
|
||||
<input type="button" id="create" name="create" value="<?php print_string("createSequence","lams") ?>" onClick="openAuthor(<?php
|
||||
echo "'".$form->create_sequence_url."'";?>);">
|
||||
<input type="button" id="refresh" name="refresh" value="<?php print_string("refreshSequenceList","lams")?>" onclick="refreshLists();">
|
||||
<input type="submit" id="cancel" name=cancel value="<?php print_string("cancel") ?>">
|
||||
|
||||
|
|
|
@ -12,11 +12,7 @@
|
|||
|
||||
if ($course->id != SITEID) {
|
||||
require_login($course->id);
|
||||
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
|
||||
} else {
|
||||
$navigation = '';
|
||||
}
|
||||
|
||||
add_to_log($course->id, "resource", "view all", "index.php?id=$course->id", "");
|
||||
|
||||
$strresource = get_string("modulename", "resource");
|
||||
|
@ -26,12 +22,12 @@
|
|||
$strname = get_string("name");
|
||||
$strsummary = get_string("summary");
|
||||
$strlastmodified = get_string("lastmodified");
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strresources, 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
print_header("$course->shortname: $strresources", $course->fullname, $navigation,
|
||||
print_header("$course->shortname: $strresources", $course->fullname, $navigation,
|
||||
"", "", true, "", navmenu($course));
|
||||
|
||||
if (! $resources = get_all_instances_in_course("resource", $course)) {
|
||||
|
@ -73,12 +69,12 @@
|
|||
$extra = "";
|
||||
}
|
||||
if (!$resource->visible) { // Show dimmed if the mod is hidden
|
||||
$table->data[] = array ($printsection,
|
||||
$table->data[] = array ($printsection,
|
||||
"<a class=\"dimmed\" $extra href=\"view.php?id=$resource->coursemodule\">".format_string($resource->name,true)."</a>",
|
||||
format_text($resource->summary, FORMAT_MOODLE, $options) );
|
||||
|
||||
} else { //Show normal if the mod is visible
|
||||
$table->data[] = array ($printsection,
|
||||
$table->data[] = array ($printsection,
|
||||
"<a $extra href=\"view.php?id=$resource->coursemodule\">".format_string($resource->name,true)."</a>",
|
||||
format_text($resource->summary, FORMAT_MOODLE, $options) );
|
||||
}
|
||||
|
@ -89,6 +85,6 @@
|
|||
print_table($table);
|
||||
|
||||
print_footer($course);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue