<commit_before><% if !curr_user_course.id %>
  <div class="page-header">
    <h1><%= @course.title %></h1>
    <% if current_user %>
      <div class="pull-right">
        <a href="<%= new_course_enroll_request_path(@course) %>" class="btn btn-primary">Request to Enroll</a>
        <% if can? :manage, Course %>
          <br/>
          <br/>
          <a href="<%= new_course_enroll_request_path(@course) %>" class="btn btn-info">Request to Share</a>
        <% end %>
      </div>
    <% end %>
    <div class="media">
      <a class="pull-left activity-icon" href="#">
        <img class="media-object activity-icon"
          src="<%= @course.creator.profile_photo_url %>" >
      </a>
      <div class="media-body">
        <%= @course.creator.name %>
      </div>
    </div>
    <div class="clearfix"></div>
  </div>
  <p><%= @course.description %></p>
<% end %>

<% if curr_user_course.id %>
  <div class="page-header">
    <h1>Updates</h1>
  </div>
<% else %>
  <h2>Updates</h2>
  <br/>
<% end %>

<table class="activities">
<% @activities.each do |act| %>
  <tr>
    <td width="25px">
      <a class="pull-left activity-icon" href="<%= course_user_course_path(@course, act.actor_course) %>">
        <img class="media-object"
          src="<%= act.actor_course.user.profile_photo_url %>">
      </a>
    </td>
    <td>
        <a href="<%= course_user_course_path(@course, act.actor_course) %>">
          <%= act.actor_course.user.name %>
        </a> <%= act.action.text %>
        <a href="<%= act.obj.get_path %>"><%= act.obj.get_title %></a>
        <br/>
        <span class="time-small"><%= time_ago_in_words(act.created_at) %> ago</span>
      </div>
    </td>
  </tr>
<% end %>
</table>

<commit_msg>fix the request to share link in admin view.<commit_after><% if !curr_user_course.id %>
  <div class="page-header">
    <h1><%= @course.title %></h1>
    <% if current_user %>
      <div class="pull-right">
        <a href="<%= new_course_enroll_request_path(@course) %>" class="btn btn-primary">Request to Enroll</a>
        <% if can? :manage, Course %>
          <br/>
          <br/>
          <%= link_to new_course_enroll_request_path(@course, role: Role.shared.first.name),
            class:"btn btn-info" do %>
              Request to<br/>Share content</a>
          <% end %>
        <% end %>
      </div>
    <% end %>
    <div class="media">
      <a class="pull-left activity-icon" href="#">
        <img class="media-object activity-icon"
          src="<%= @course.creator.profile_photo_url %>" >
      </a>
      <div class="media-body">
        <%= @course.creator.name %>
      </div>
    </div>
    <div class="clearfix"></div>
  </div>
  <p><%= @course.description %></p>
<% end %>

<% if curr_user_course.id %>
  <div class="page-header">
    <h1>Updates</h1>
  </div>
<% else %>
  <h2>Updates</h2>
  <br/>
<% end %>

<table class="activities">
<% @activities.each do |act| %>
  <tr>
    <td width="25px">
      <a class="pull-left activity-icon" href="<%= course_user_course_path(@course, act.actor_course) %>">
        <img class="media-object"
          src="<%= act.actor_course.user.profile_photo_url %>">
      </a>
    </td>
    <td>
        <a href="<%= course_user_course_path(@course, act.actor_course) %>">
          <%= act.actor_course.user.name %>
        </a> <%= act.action.text %>
        <a href="<%= act.obj.get_path %>"><%= act.obj.get_title %></a>
        <br/>
        <span class="time-small"><%= time_ago_in_words(act.created_at) %> ago</span>
      </div>
    </td>
  </tr>
<% end %>
</table>


{'fraction_non_alphanumeric': 0.21358405837777153, 'fraction_numerical': 0.004490597810833568, 'mean_word_length': 2.5113300492610837, 'pattern_counts': {'":': 0, '<': 152, '<?xml version=': 0, '>': 152, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3604417', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1271, 'n_words': 236}