<commit_before>
<h2>{{ courseAssignments.pageName }}</h2>
<div class="row" restrict access="INSTRUCTOR">
    <div class="col-xs-12">
        <a ui-sref="app.course.assignments_add_edit({moduleId:'new', isNew : true})"><button class="btn btn-primary">+ New Assignment</button></a>
    </div>
</div>
<div class="row" restrict access="INSTRUCTOR">
    <div class="col-xs-12">
        <div class="alert alert-danger top-buffer" ng-if="courseAssignments.error">
            {{ courseAssignments.error }}
        </div>
        <div class="alert alert-success top-buffer" ng-if="courseAssignments.created_updated" >
            <strong>Success!</strong> Created/Updated the assignment!
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <table class="table table-hover">
        <thead>
            <tr>
            <th>Name</th>
            <th restrict access="INSTRUCTOR">Open Date</th>
            <th>Due Date</th>
            <th>Max Students</th>
            <th restrict access="INSTRUCTOR">Action</th>
            <th restrict access="INSTRUCTOR"></th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="assignment in courseAssignments.assignments | orderBy: '-openTimestamp'">
                <td><a ui-sref="app.course.assignment({moduleId:'{{ assignment.id }}'})">{{ assignment.moduleTitle }}</a> </td>
                <td restrict access="INSTRUCTOR"> {{ assignment.openTimestamp | date:'MMM d, y h:mm a' }} </td>
                <td> {{ assignment.closeTimestamp | date:'MMM d, y h:mm a' }} </td>
                <td> {{ assignment.maxStudents }} </td>
                <td restrict access="INSTRUCTOR">
                    <a ui-sref="app.course.assignments_add_edit({moduleId: '{{ assignment.id }}', isNew : false})">
                        <button type="button" class="btn btn-xs btn-default">
                            <span class="glyphicon glyphicon-pencil"></span>
                        </button>
                    </a> |
                    <a ui-sref="app.course.assignments_add_edit_pages({moduleId: '{{ assignment.id }}'})" >
                    Edit Questions
                    </a> |
                    <a ui-sref="app.course.assignment.groups({moduleId: '{{ assignment.id }}'})">
                        Grade
                    </a>
                </td>
                <td restrict access="INSTRUCTOR">
                    <button type="button" class="btn btn-xs btn-warning"
                    ng-click="courseAssignments.dropAssignment(assignment.id)">
                      <span class="glyphicon glyphicon-trash"></span>
                    </button>
                </td>
            </tr>
        </tbody>
        </table>
    </div>
</div>




<commit_msg>ADD: restricting access to certain edit links based on date<commit_after>
<h2>{{ courseAssignments.pageName }}</h2>
<div class="row" restrict access="INSTRUCTOR">
    <div class="col-xs-12">
        <a ui-sref="app.course.assignments_add_edit({moduleId:'new', isNew : true})"><button class="btn btn-primary">+ New Assignment</button></a>
    </div>
</div>
<div class="row" restrict access="INSTRUCTOR">
    <div class="col-xs-12">
        <div class="alert alert-danger top-buffer" ng-if="courseAssignments.error">
            {{ courseAssignments.error }}
        </div>
        <div class="alert alert-success top-buffer" ng-if="courseAssignments.created_updated" >
            <strong>Success!</strong> Created/Updated the assignment!
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <table class="table table-hover">
        <thead>
            <tr>
            <th>Name</th>
            <th restrict access="INSTRUCTOR">Open Date</th>
            <th>Due Date</th>
            <th>Max Students</th>
            <th restrict access="INSTRUCTOR">Action</th>
            <th restrict access="INSTRUCTOR"></th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="assignment in courseAssignments.assignments | orderBy: '-openTimestamp'">
                <td><a ui-sref="app.course.assignment({moduleId:'{{ assignment.id }}'})">{{ assignment.moduleTitle }}</a> </td>
                <td restrict access="INSTRUCTOR"> {{ assignment.openTimestamp | date:'MMM d, y h:mm a' }} </td>
                <td> {{ assignment.closeTimestamp | date:'MMM d, y h:mm a' }} </td>
                <td> {{ assignment.maxStudents }} </td>
                <td restrict access="INSTRUCTOR">
                    <a ui-sref="app.course.assignments_add_edit({moduleId: '{{ assignment.id }}', isNew : false})" ng-if="courseAssignments.currentDate < assignment.openTimestamp">
                        <button type="button" class="btn btn-xs btn-default">
                            <span class="glyphicon glyphicon-pencil"></span>
                        </button>
                    </a> |
                    <a ui-sref="app.course.assignments_add_edit_pages({moduleId: '{{ assignment.id }}'})"
                       ng-if="courseAssignments.currentDate < assignment.openTimestamp">
                    Edit Questions
                    </a> |
                    <a ui-sref="app.course.assignment.groups({moduleId: '{{ assignment.id }}'})" ng-if="courseAssignments.currentDate > assignment.closeTimestamp">
                        Grade
                    </a>
                </td>
                <td restrict access="INSTRUCTOR">
                    <button type="button" class="btn btn-xs btn-warning"
                    ng-click="courseAssignments.dropAssignment(assignment.id)">
                      <span class="glyphicon glyphicon-trash"></span>
                    </button>
                </td>
            </tr>
        </tbody>
        </table>
    </div>
</div>





{'fraction_non_alphanumeric': 0.1572218382861092, 'fraction_numerical': 0.0027643400138217, 'mean_word_length': 1.8800995024875622, 'pattern_counts': {'":': 0, '<': 153, '<?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': '4219154', 'n_tokens_mistral': 1694, 'n_tokens_neox': 1612, 'n_words': 323}