2011-02-01 09:57:29 +08:00
|
|
|
<% content_for :page_title do %><%= @section.name %><% end %>
|
|
|
|
|
|
|
|
<% content_for :right_side do %>
|
|
|
|
<div class="rs-margin-all">
|
|
|
|
<a href="#" class="button button-sidebar-wide edit_section_link"><%= image_tag "edit.png" %> Edit Section</a>
|
2011-04-16 14:22:55 +08:00
|
|
|
<% if can_do(@section, @current_user, :update) %>
|
|
|
|
<% if @section.nonxlist_course_id %>
|
|
|
|
<% if can_do(@section.nonxlist_course, @current_user, :manage_admin_users) %>
|
|
|
|
<a href="#" class="button button-sidebar-wide uncrosslist_link"><%= image_tag "move.png" %> De-Cross-List this Section</a>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<a href="#" class="button button-sidebar-wide crosslist_link"><%= image_tag "move.png" %> Cross-List this Section</a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2011-06-01 04:47:28 +08:00
|
|
|
<a href="<%= context_url(@context, :context_details_url) %>" class="button button-sidebar-wide"><%= image_tag "back.png" %> Back to Course Settings</a>
|
2011-02-01 09:57:29 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% content_for :stylesheets do %>
|
|
|
|
<style>
|
|
|
|
#course_form .course_form {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
#course_form.editing .course_form {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
#course_form.editing .course_info {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
#course_form .date_entry {
|
|
|
|
width: 100px;
|
|
|
|
}
|
|
|
|
ul.user_list {
|
|
|
|
list-style: none;
|
|
|
|
padding-left: 0px;
|
|
|
|
margin-top: 0px;
|
|
|
|
max-width: 400px;
|
|
|
|
}
|
|
|
|
ul.user_list li.user {
|
|
|
|
padding-left: 10px;
|
|
|
|
color: #444;
|
|
|
|
line-height: 1.5em;
|
|
|
|
-moz-border-radius: 5px;
|
|
|
|
}
|
|
|
|
ul.user_list li.user:hover {
|
|
|
|
background-color: #eee;
|
|
|
|
}
|
|
|
|
ul.user_list li.user .email {
|
|
|
|
font-size: 0.8em;
|
|
|
|
margin: -5px 10px 5px;
|
|
|
|
}
|
|
|
|
ul.user_list li.user .section {
|
|
|
|
font-size: 0.8em;
|
|
|
|
margin: -5px 10px 5px;
|
|
|
|
}
|
|
|
|
ul.user_list li.user .short_name {
|
|
|
|
font-size: 0.8em;
|
|
|
|
margin: -2px 10px 0px;
|
|
|
|
}
|
|
|
|
ul.user_list li.user .enrollment_type {
|
|
|
|
font-size: 0.8em;
|
|
|
|
margin: -2px 10px 0px;
|
|
|
|
}
|
|
|
|
ul.user_list li.user .links {
|
|
|
|
float: right;
|
|
|
|
padding-right: 20px;
|
|
|
|
padding-top: 5px;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
ul.user_list li.user .links a {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
ul.user_list li.user:hover .links {
|
|
|
|
float: right;
|
|
|
|
padding-right: 20px;
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
ul.user_list li.user.pending {
|
|
|
|
color: #888;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
h3 .tally {
|
|
|
|
font-family: arial,sans-serif;
|
|
|
|
font-size: 12px;
|
|
|
|
padding-left: 5px;
|
|
|
|
}
|
|
|
|
.associated_user {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
#edit_section_form {
|
|
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<% end %>
|
|
|
|
<% form_for @section, :url => context_url(@context, :context_section_url, @section), :html => {:id => "edit_section_form", :style => "display: none;"} do |f| %>
|
|
|
|
<table class="formtable">
|
|
|
|
<tr>
|
2011-02-24 13:26:39 +08:00
|
|
|
<td><%= f.label :name, "Section Name:" %></td>
|
2011-02-01 09:57:29 +08:00
|
|
|
<td><%= f.text_field :name %></td>
|
|
|
|
</tr>
|
2011-06-01 04:47:28 +08:00
|
|
|
<% if @section.sis_source_id || can_do(@context.root_account, @current_user, :manage_sis) %>
|
|
|
|
<tr>
|
|
|
|
<td><%= f.label :sis_source_id, "SIS ID:" %></td>
|
|
|
|
<td>
|
|
|
|
<span class="course_form">
|
|
|
|
<% if can_do(@context.root_account, @current_user, :manage_sis) %>
|
|
|
|
<%= f.text_field :sis_source_id, :style => "width: 50px;", :title => "SIS ID", :value => @section.sis_source_id %>
|
|
|
|
<% else %>
|
|
|
|
<%= @section.sis_source_id %>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
2011-02-24 13:26:39 +08:00
|
|
|
<tr>
|
|
|
|
<td><%= f.label :start_at, "Starts:" %></td>
|
|
|
|
<td><%= f.text_field :start_at, :class => "datetime_field", :value => datetime_string(@section.start_at), :style => 'width: 120px;' %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= f.label :end_at, "Ends:" %></td>
|
|
|
|
<td><%= f.text_field :end_at, :class => "datetime_field", :value => datetime_string(@section.end_at), :style => 'width: 120px;' %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<%= f.check_box :restrict_enrollments_to_section_dates %>
|
|
|
|
<%= f.label :restrict_enrollments_to_section_dates, "Users can only access the course between these dates" %>
|
|
|
|
<div style="font-size: 0.8em; padding-left: 25px;">
|
|
|
|
This will override any term or course date settings.
|
2011-06-01 04:47:28 +08:00
|
|
|
</div>
|
2011-02-24 13:26:39 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
2011-02-01 09:57:29 +08:00
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<div class="button-container">
|
|
|
|
<button type="submit" class="button submit_button">Update Section</button>
|
|
|
|
<button type="button" class="button cancel_button button-secondary">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<% end %>
|
2011-06-01 04:47:28 +08:00
|
|
|
<h2 id="section_name"><%= @section.name %></h2>
|
2011-02-24 13:26:39 +08:00
|
|
|
<div style="margin-bottom: 20px;">
|
|
|
|
<div>
|
|
|
|
<%= pluralize((@current_enrollments + @completed_enrollments).length, 'Enrollment') %>
|
|
|
|
</div>
|
2011-06-01 04:47:28 +08:00
|
|
|
<% if @section && ( @section.sis_source_id || can_do(@context.root_account, @current_user, :manage_sis))%>
|
|
|
|
<div>SIS ID: <span class="sis_source_id"><%= @section.sis_source_id %></span></div>
|
2011-04-09 11:00:46 +08:00
|
|
|
<% end %>
|
2011-02-24 13:26:39 +08:00
|
|
|
<% if @section.start_at || @section.end_at %>
|
|
|
|
<div>
|
|
|
|
Runs from <%= datetime_string(@section.start_at) || 'whenever' %> to <%= datetime_string(@section.end_at) || 'whenever' %>
|
|
|
|
</div>
|
|
|
|
<div style="margin-left: 10px; font-size: 0.8em;">
|
|
|
|
<%= 'Students can only access the course between these dates' if @section.restrict_enrollments_to_section_dates %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2011-02-01 09:57:29 +08:00
|
|
|
<% unless @current_enrollments.empty? %>
|
2011-02-24 13:26:39 +08:00
|
|
|
<h3>Current Enrollments</h3>
|
2011-02-01 09:57:29 +08:00
|
|
|
<ul class="user_list">
|
|
|
|
<% @current_enrollments.each do |enrollment| %>
|
|
|
|
<%= render :partial => "shared/enrollment", :object => enrollment, :locals => {:include_type => true} %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% unless @completed_enrollments.empty? %>
|
|
|
|
<h2>Completed Enrollments</h2>
|
|
|
|
<ul class="user_list">
|
|
|
|
<% @completed_enrollments.each do |enrollment| %>
|
|
|
|
<%= render :partial => "shared/enrollment", :object => enrollment, :locals => {:include_type => true} %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2011-04-16 14:22:55 +08:00
|
|
|
<% jammit_js :section %>
|
|
|
|
|
|
|
|
<div style="display: none;">
|
|
|
|
<% form_tag context_url(@context, :context_section_crosslist_url, @section.id), :id => "crosslist_course_form", :title => "Cross-List this Section", :method => :post do %>
|
|
|
|
<h2>Cross-List Section</h2>
|
|
|
|
<p>
|
|
|
|
Cross-listing allows you to create a section in one account and
|
|
|
|
then move it to a course on a different account.
|
|
|
|
To cross-list this course, you'll need to find the course you
|
|
|
|
want to move it to, either using the search tool or by
|
|
|
|
entering the course's ID.
|
|
|
|
</p>
|
|
|
|
<table class="formtable">
|
|
|
|
<tr>
|
|
|
|
<td><label for="course_autocomplete_id_lookup">Search for Course: </label></td>
|
|
|
|
<td>
|
|
|
|
<a href="<%= context_url(@current_user, :context_courses_url, :format => :json) %>" id="course_autocomplete_url" style="display: none;"> </a>
|
|
|
|
<a href="<%= context_url(@context, :context_section_confirm_crosslist_url, @section.id, "{{ id }}") %>" id="course_confirm_crosslist_url" style="display: none;"> </a>
|
|
|
|
<input type="hidden" name="new_course_id" id="course_autocomplete_id"/>
|
|
|
|
<input type="text" id="course_autocomplete_id_lookup" style="width: 250px;"/>
|
|
|
|
</td>
|
|
|
|
</tr><tr>
|
|
|
|
<td><label for="course_id">Or Enter the Course's ID:</label></td>
|
|
|
|
<td>
|
|
|
|
<input type="text" id="course_id" style="width: 75px;"/>
|
|
|
|
</td>
|
|
|
|
</tr><tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<div id="course_autocomplete_name_holder" style="margin-top: 20px;">
|
|
|
|
Selected Course:
|
|
|
|
<div style="margin-left: 20px;">
|
|
|
|
<div id="course_autocomplete_name" style="font-weight: bold;"></div>
|
|
|
|
<div id="sis_id_holder" style="display: none;">SIS ID: <span class="sis_id"> </span></div>
|
|
|
|
<div id="account_name_holder" style="display: none;">Account: <span class="account_name"></span></div>
|
|
|
|
</div>
|
|
|
|
<div class="button-container">
|
|
|
|
<button type="submit" class="button submit_button">Cross-List This Section</button>
|
|
|
|
<button type="button" class="button button-secondary cancel_button">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% form_tag context_url(@context, :context_section_uncrosslist_url, @section.id), :id => "uncrosslist_form", :title => "De-Cross-List this Section", :method => :delete do %>
|
|
|
|
<h2>De-Cross-List Section</h2>
|
|
|
|
<p>
|
|
|
|
Are you sure you want to de-cross-list this section?
|
|
|
|
<% if @section.nonxlist_course %>
|
|
|
|
This will move the section back to its original course,
|
|
|
|
<strong><%= @section.nonxlist_course.name %></strong>.
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<% if @student_enrollments.length > 0 %>
|
|
|
|
<p>
|
|
|
|
All grades for the <strong><%= pluralize(@student_enrollments.length, "student") %></strong>
|
|
|
|
in this course will no longer be visible. You can retrieve the grades
|
|
|
|
later by re-cross-listing the course, but in the mean time
|
|
|
|
the grades for these students will come from the original course.
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<div class="button-container">
|
|
|
|
<button type="submit" class="button submit_button">De-Cross-List This Section</button>
|
|
|
|
<button type="button" class="button button-secondary cancel_button">Cancel</button>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|