Skip to content

Commit 591dd2b

Browse files
Merge remote-tracking branch 'origin/master'
Conflicts: .idea/workspace.xml
2 parents 05300d4 + 6f0a1a8 commit 591dd2b

File tree

8 files changed

+761
-40
lines changed

8 files changed

+761
-40
lines changed

.idea/workspace.xml

Lines changed: 456 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

application/controllers/preference.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
class Preference extends MY_Controller
44
{
5+
6+
7+
58
public function rank_preference()
69
{
710

11+
812
$userInterests = $this -> user_interest_categories -> getWithCondition(
913
array(
1014
'user_id' => $this -> session -> userdata('user_id'),
@@ -15,7 +19,7 @@ public function rank_preference()
1519

1620
if(count($userInterests) >= 5)
1721
{
18-
22+
1923
$i = 1;
2024
foreach($userInterests as $interest)
2125
{

application/models/course_review.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,27 @@ public function __construct() {
1111
public $course_id;
1212
public $review;
1313
public $submittion_date;
14-
14+
public $marked_by_teacher;
15+
public $marks;
16+
17+
public function getPendingReviewsCourses()
18+
{
19+
$courses = array();
20+
$reviews = $this-> course_review -> getWithCondition(array('marked_by_teacher' => 0));
21+
foreach ($reviews as $review) {
22+
$course = new course();
23+
$course -> load($review -> course_id);
24+
$courses[$course->course_id] =$course;
25+
}
26+
return $courses;
27+
}
28+
public function getUnmarkedReviews($_course_id = NULL, $_user_id = NULL)
29+
{
30+
if($_user_id == NULL) $_user_id = $this -> session -> userdata('user_id');
31+
if($_course_id == NULL) $_course_id = $this -> course_id;
32+
$reviews = $this-> course_review -> getWithCondition(array('marked_by_teacher' => 0, 'course_id' => $_course_id));
33+
return $reviews;
34+
}
1535
public function reviewSubmittedByUser( $_course_id = NULL,$_user_id = NULL)
1636
{
1737
if($_user_id == NULL) $_user_id = $this -> session -> userdata('user_id');

application/views/pages/track-explore.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,21 @@
3737
<section class="clear"></section>
3838
<section id="track-description">
3939
<h3>Description</h3>
40-
<p><?=$track -> track_description;?></p>
40+
<p><?=$track -> track_description;?></p>
41+
<?php
42+
43+
if(strlen($track -> additional_file_path) > 2 && strlen($track -> additional_file_title) > 2)
44+
{
45+
?>
46+
<h3>Additional Information</h3>
47+
<p><a href="<?=base_url($track -> additional_file_path);?>"><?=$track->additional_file_title;?></a></p>
48+
49+
<?php
50+
}
51+
52+
?>
53+
54+
4155
</section>
4256
<section class="course-progress">
4357
<?php
25.5 KB
Binary file not shown.

upload/Thumbs.db

43 KB
Binary file not shown.
25.5 KB
Binary file not shown.

vitdb.sql

Lines changed: 264 additions & 36 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)